[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] r3663 - in trunk/pingus: . src/sound
From: |
grumbel at BerliOS |
Subject: |
[Pingus-CVS] r3663 - in trunk/pingus: . src/sound |
Date: |
Fri, 4 Jul 2008 08:59:20 +0200 |
Author: grumbel
Date: 2008-07-04 08:59:19 +0200 (Fri, 04 Jul 2008)
New Revision: 3663
Removed:
trunk/pingus/src/sound/slot_manager.cpp
trunk/pingus/src/sound/slot_manager.hpp
Modified:
trunk/pingus/SConstruct
Log:
Some more cleanup of old cruft
Modified: trunk/pingus/SConstruct
===================================================================
--- trunk/pingus/SConstruct 2008-07-04 06:57:52 UTC (rev 3662)
+++ trunk/pingus/SConstruct 2008-07-04 06:59:19 UTC (rev 3663)
@@ -25,7 +25,6 @@
pingus_sources = [
# # 'gui/buffer_graphic_context.cpp',
# # 'pingus_level_test.cpp',
-# # 'sound/slot_manager.cpp',
# # 'xml_eval.cpp',
'src/action_holder.cpp',
Deleted: trunk/pingus/src/sound/slot_manager.cpp
===================================================================
--- trunk/pingus/src/sound/slot_manager.cpp 2008-07-04 06:57:52 UTC (rev
3662)
+++ trunk/pingus/src/sound/slot_manager.cpp 2008-07-04 06:59:19 UTC (rev
3663)
@@ -1,50 +0,0 @@
-// Pingus - A free Lemmings clone
-// Copyright (C) 2002 Ingo Ruhnke <address@hidden>
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-#include "slot_manager.hpp"
-
-namespace Sound {
-
-SlotEntry&
-SlotManager::find_slot(const std::string& name)
-{
-
-}
-
-void
-SlotManager::play_sound(const std::string& name)
-{
- CL_SoundBuffer * buffer;
- CL_SoundBuffer_Session sess;
-
- try {
- buffer = new CL_SoundBuffer (name.c_str());
- sess = buffer -> prepare();
- } catch (const CL_Error & e) {
- perr(PINGUS_DEBUG_SOUND) << "Can't open file " << filename << " --
skipping\n"
- << " CL_Error: " << e.message << std::endl;
- return;
- }
-
- sess.set_volume(volume);
- sess.set_pan(panning);
- sess.set_looping(false);
- sess.play();
-}
-
-} // namespace Sound
-
-/* EOF */
Deleted: trunk/pingus/src/sound/slot_manager.hpp
===================================================================
--- trunk/pingus/src/sound/slot_manager.hpp 2008-07-04 06:57:52 UTC (rev
3662)
+++ trunk/pingus/src/sound/slot_manager.hpp 2008-07-04 06:59:19 UTC (rev
3663)
@@ -1,67 +0,0 @@
-// Pingus - A free Lemmings clone
-// Copyright (C) 2002 Ingo Ruhnke <address@hidden>
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-#ifndef HEADER_PINGUS_SLOT_MANAGER_HPP
-#define HEADER_PINGUS_SLOT_MANAGER_HPP
-
-#include <string>
-#include <vector>
-#include <map>
-
-#include <ClanLib/sound.h>
-
-namespace Sound {
-
-struct SlotEntry
-{
- /** Name of the sound effect */
- std::string name;
-
- /** Time when the last sound playback started */
- unsigned int last_time;
-
- /** The data of this sound effect */
- CL_SoundBuffer* buffer;
-
- /** Currently active sessinos playing the sound effect */
- std::vector<CL_SoundBuffer_Session> sessions;
-};
-
-/** Manager class for sound slots, if a sound effect gets played it
- will be placed in a slot, if the same effect gets played again and
- the slot is still busy it won't get played again */
-class SlotManager
-{
-private:
- std::map<std::string, SlotEntry> slots;
-
-public:
- SlotManager();
-
- void play_sound(const std::string& name);
-
-private:
- SlotEntry& find_slot(const std::string& name);
-
- SlotManager (const SlotManager&);
- SlotManager& operator= (const SlotManager&);
-};
-
-} // namespace Sound
-
-#endif
-
-/* EOF */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] r3663 - in trunk/pingus: . src/sound,
grumbel at BerliOS <=