aboutsummaryrefslogtreecommitdiff
path: root/engines/lure/sound.cpp
AgeCommit message (Collapse)Author
2012-03-13JANITORIAL: Simply use *x instead of *x.get() on smart pointers.Christoph Mallon
2012-02-15JANITORIAL: Fix missing whitespace in pointer castTarek Soliman
find -name '*.h' -or -name '*.cpp' | xargs sed -r -i 's@\(([A-Za-z0-9]+)\*\)@(\1 *)@g' This seems to have caught some params as well which is not undesirable IMO. It also caught some strings containing this which is undesirable so I excluded them manually. (engines/sci/engine/kernel_tables.h)
2011-11-16COMMON: Rename Common::set_to to Common::fill.Johannes Schickel
This makes the name match with the name of the STL function with the same behavior.
2011-06-30ALL: Require DECLARE_SINGLETON to be used in the Common namepsaceOri Avtalion
Silences the clang warning: static data member specialization of '_singleton' must originally be declared in namespace 'Common'; accepted as a C++0x extension [-Wc++0x-extensions] Wrapping "namespace Common {}" around the macro assignment causes clang to complain about a spurious semicolon, and removing the semicolon at the end of the macro causes some editors to misbehave. Changing the requirement of using the macro in one namespace (the global) to another (Common) seems a small price to pay to silence a warning.
2011-05-12GIT: Clean up: Suppress SVN tags, now uselessstrangerke
2011-03-23ENGINES: Remove unused MIDI pass-through codeMax Horn
2011-03-23ENGINES: Further simplify pseudo MidiDrivers; fix some regressionsMax Horn
The regression affected AGOS and maybe some others; specifically, the real MidiDriver would have been deleted twice -- I previously missed that the Engine instances takes care of freeing the real MidiDriver, not the MidiPlayer wrapping it. This commit should clarify the ownership of the real MidiDriver for most pseudo MidiDrivers.
2011-03-23AUDIO: Change several fake MidiDrivers to MidiDriver_BASE subclassesMax Horn
Many engines follow the advice in audio/midiparser.h and create a "pseudo-MidiDriver" subclass. But MidiParser really only needs a tiny subset of the MidiDriver capabilities, namely those found in MidiDriver_BASE. So we try to subclass from that whenever possible; this allows us to remove many stub methods, and enables further future simplifications.
2011-03-22AUDIO: Add pure virtual MidiDriver::isOpen() methodMax Horn
This in turn enables modifying MidiDriver_MPU401::close() to allow it to be called on a midi driver that has not yet been opened. The specific issue that triggered me to make these changes was a crash-upon-quit in HUGO, caused by it instantiating a midi driver, then encountering an error (missing hugo.dat) *before* having opened the new midi driver; the general cleanup code then tries to close the (not yet opened) midi driver -> kaboom Also fixed some engines which were leaking MidiDriver instances.
2011-02-09AUDIO: Rename sound/ dir to audio/Max Horn
svn-id: r55850
2010-11-16COMMON: Simplify DECLARE_SINGLETON macroMax Horn
This makes it possible to write DECLARE_SINGLETON(foo); instead of DECLARE_SINGLETON(foo) without causing a warning about an extra semicolon. The extra semicolon helps some editors at parsing the C++ code. svn-id: r54258
2010-09-15MIDI: Send a reset MIDI device signal on startup.Johannes Schickel
This is currently done in the engine code. I adapted AGI, AGOS, DRACI, GROOVIE, LURE, MADE, QUEEN, SAGA, SKY, TINSEL and TOUCHE to send a reset device on startup. The sound output still works fine (started up a game from every engine), so this should hopefully not introduce any regressions. As far as I can tell it seems that SCUMM does send a proper device reset, so I did not touch it. KYRA only sends a proper reset for MT-32 currently. I am not sure about SCI though. This fixes bug #3066826 "SIMON: MIDI notes off when using RTL after SCI". svn-id: r52736
2010-07-21LURE: Make LURE respect the mute settings.Johannes Schickel
svn-id: r51101
2010-06-25AUDIO: get rid of MDT_PREFER_MIDI since it should be sufficient to either ↵Florian Kagerer
select MDT_PREFER_MT32 or MDT_PREFER_GM svn-id: r50288
2010-06-21Patch #1956501: "GUI/LAUNCHER: Midi device selection"Max Horn
svn-id: r50128
2010-03-13Fix our DECLARE_SINGLETON macro to conform to the C++ specs.Johannes Schickel
We need to use a namespace Common { } there to make strict C++ compilers like clang++ and comeau happy. I also added a slight comment about why that is needed to the macro definition and a note that you need to use it from the global namespace. svn-id: r48254
2010-01-25Change some comments to use "AdLib" instead of "adlib".Johannes Schickel
svn-id: r47534
2010-01-23Some more header modifications ("Graphic Adventure Engine" and the legal ↵Arnaud Boutonné
property paragraph) svn-id: r47489
2010-01-19LURE: Remove evil 'using namespace' from header filesMax Horn
svn-id: r47396
2010-01-03Fixed a bunch of cppcheck warnings. Mostly about checking if a pointer is nullTorbjörn Andersson
before freeing it, which isn't necessary. svn-id: r46941
2009-12-09Changed MidiDriver::createMidi to take a MidiDriverType instead of an intMax Horn
svn-id: r46316
2009-10-04Change a couple places from 'end of namespace' to 'End of namespace', for ↵Max Horn
consistency svn-id: r44634
2009-01-01Whoa! Removing trailing spaces.Eugene Sandulenko
svn-id: r35648
2008-08-05Fixed more warningsChristopher Page
svn-id: r33649
2008-07-15Reverted some incorrect changes and fixed sound settings issues for LURE. ↵Christopher Page
Fixed issues with quitting and calling GMM during intro sequences in LURE. Added a KEYCODE_MAINMENU in common/keyboard.h for the GMM. svn-id: r33081
2008-07-07LURE: Made sure to lock _soundMutex in syncSounds()Christopher Page
svn-id: r32934
2008-06-30Fixed some warningsChristopher Page
svn-id: r32857
2008-06-30Sound settings for Lure can be modified through the GMMChristopher Page
svn-id: r32855
2008-06-12LURE: Fixed memory leaks in the LURE engineChristopher Page
svn-id: r32675
2008-04-06Replaced ManagedList with Common::SharedPtr in lure's sound systemFilippos Karapetis
svn-id: r31419
2008-03-19Commit of Hans de Goede's patches to the sound handling codePaul Gilbert
svn-id: r31194
2008-01-27Removed trailing spaces.Jordi Vilalta Prat
svn-id: r30664
2008-01-12Removed old copyright 2005-2006 line from several files so that their ↵Paul Gilbert
headers are consistant with the other files svn-id: r30433
2008-01-05Fix to remove a tab character from the GPL headerPaul Gilbert
svn-id: r30238
2007-12-16The _nativeMT32 in MidiMusic was never initialised. Rather than storing it inTorbjörn Andersson
two different classes, use the value in SoundManager instead. As a consequence the engine now remaps the instruments from MT-32 to General MIDI for me, since isRoland() is true and hasNativeMT32() is false. Earlier, it didn't since the uninitialised _nativeMT32 happened to be true for me. svn-id: r29878
2007-12-16Hooked up the sound code to use the configuration for sfx and music, and ↵Paul Gilbert
added code from the original game that used the high bit of sounds to distinguish between the two svn-id: r29873
2007-11-27- Changed sound creation to automatically reset volume so that introduction ↵Paul Gilbert
sound sequences play correctly - Cleaned up my channel sharing code to allow for either cropping the number of channels used or use the same channel multiple times. Ideally, though, I need to find out if the MidiParser can be set to use less than 8 channels svn-id: r29648
2007-11-18Further fixes to sound code (thanks to eriktorbjorn)Paul Gilbert
svn-id: r29554
2007-11-18Added some extra mutex locks to the sound code to hopefully prevent randomo ↵Paul Gilbert
crashes svn-id: r29553
2007-10-28Added storing of playing sounds to savegame (note: only sounds flagged as ↵Paul Gilbert
restorable are restarted after loading a savegame) svn-id: r29271
2007-10-25Bugfix to make sound toggle work correctly, and added flag state to savegamesPaul Gilbert
svn-id: r29257
2007-09-28Wrapped access to the playing sounds list in a mutexPaul Gilbert
svn-id: r29114
2007-09-24Changes some code to use Common::set_to instead of loops. (as an example on ↵Johannes Schickel
how to use Common::set_to) svn-id: r29081
2007-09-20I'm probably being overly paranoid, but I'm nervous about initializing an arrayTorbjörn Andersson
of boolean with memset(). Maybe it's perfectly fine and healthy, but using a loop is consistent with how we do it in killSounds() anyway. svn-id: r28979
2007-09-20Fixed out-of-bounds writing in killSounds().Torbjörn Andersson
svn-id: r28978
2007-09-16Initial sound implementationPaul Gilbert
svn-id: r28917
2007-09-10Lots of source code formatting correctionsMax Horn
svn-id: r28887
2007-08-12Added part of the framework for playing soundsPaul Gilbert
svn-id: r28545
2007-06-22Initial commitPaul Gilbert
svn-id: r27604