Commit Graph

33 Commits

Author SHA1 Message Date
Alyssa Milburn
41d337c549 PARALLACTION: Clean up global variables a bit. 2012-09-27 22:41:51 +02:00
Johannes Schickel
d98b462190 PARALLACTION: Fix delete[] formatting. 2012-07-25 21:10:43 +02:00
Tarek Soliman
921f602ab8 JANITORIAL: Fix whitespace in pointer template arg 2012-02-15 10:07:08 -06:00
Max Horn
88913c0139 ALL: Remove trailing whitespaces
This tries to make our code a bit more compliant with our code formatting
conventions. For future use, this is the command I used:
  git ls-files "*.cpp" "*.h" | xargs sed -i -e 's/[ \t]*$//'
2011-06-20 00:59:48 +02:00
strangerke
69b1485a22 GIT: Clean up: Suppress SVN tags, now useless 2011-05-12 01:16:22 +02:00
Ori Avtalion
9414d7a6e2 JANITORIAL: Reduce header dependencies in shared code
Some backends may break as I only compiled SDL
2011-04-28 15:08:58 +03:00
Max Horn
7949d7c6de AUDIO: Move more common code to Audio::MidiPlayer
This also should fix some regressions from the previous
commits, related to MidiParser's either being leaked,
or being deleted and then used again (i.e., crashing).

I tested as many games as I had available, but further
testing of all affected engines is called for anyway.
2011-03-25 14:15:53 +01:00
Max Horn
9ffc4e0151 PARALLACTION: Move MidiDriver creation into MidiPlayer(_MSC) constructors 2011-03-25 14:15:47 +01:00
Max Horn
7cc04f25ff PARALLACTION: Change MidiPlayer impls to derive from Audio::MidiPlayer 2011-03-24 16:46:47 +01:00
Max Horn
e70fd59b35 ENGINES: Further simplify pseudo MidiDrivers; fix some regressions
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-23 16:49:41 +01:00
Max Horn
29847ea42d AUDIO: Change several fake MidiDrivers to MidiDriver_BASE subclasses
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-23 15:25:47 +01:00
Max Horn
7b02dac3c5 ENGINES: Use Common::StackLock in more places 2011-03-23 15:25:46 +01:00
Max Horn
8982fff1b7 AUDIO: Add pure virtual MidiDriver::isOpen() method
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-03-22 23:51:47 +01:00
Max Horn
42ab839dd6 AUDIO: Rename sound/ dir to audio/
svn-id: r55850
2011-02-09 01:09:01 +00:00
Nicola Mettifogo
9dd0e0f94c PARALLACTION: fix music playback (bug #2879793).
* Do not restart character theme is already playing.
* Play the correct tune in the night club.
* Do not play muisc in the location meant to be silent.

svn-id: r55147
2011-01-07 16:00:08 +00:00
Nicola Mettifogo
75d7ee9bd6 PARALLACTION: remove code duplication in NS sound code.
svn-id: r55146
2011-01-07 15:17:07 +00:00
Max Horn
a1840bd573 AUDIO: Rename Mixer::playInputStream to playStream
svn-id: r48637
2010-04-12 09:14:17 +00:00
Johannes Schickel
a505d32eff Replace use of Audio::makeRawMemoryStream by Audio::makeRawStream.
svn-id: r47716
2010-01-30 15:26:54 +00:00
Max Horn
1565f14bc1 Moved audio stream implementations (for MP3, FLAC, etc.) to new dir sound/decoders/
svn-id: r47579
2010-01-26 22:48:45 +00:00
Max Horn
4b996e7de7 Reorder params to Audio::makeRawMemoryStream
svn-id: r47492
2010-01-23 23:55:35 +00:00
Max Horn
b036392a7b Get rid of deprecated makeRawDiskStream variants; rename deprecated makeRawMemoryStream variant to makeRawMemoryStream_OLD; adapt some code to this change
svn-id: r47472
2010-01-23 13:34:29 +00:00
Max Horn
557bb394de Get rid of Mixer::FLAG_AUTOFREE.
Also fix several recently introduced new/delete vs. malloc/free mismatches.

svn-id: r47369
2010-01-19 00:56:29 +00:00
Max Horn
69be747621 Move raw audio streams to new header sound/raw.h
svn-id: r47368
2010-01-19 00:54:06 +00:00
Max Horn
349fcd1d71 Rename 'Linear' audio streams to 'raw'
svn-id: r47367
2010-01-19 00:52:41 +00:00
Max Horn
f720d99b0a Switch Mixer::playInputStream to use DisposeAfterUse::Flag
svn-id: r47182
2010-01-08 22:09:43 +00:00
Nicola Mettifogo
8e54ce73a5 Moved creation of 'beep' sound buffer to sound manager constructor.
svn-id: r47124
2010-01-07 15:38:29 +00:00
Nicola Mettifogo
c0a4881f5a Start the correct music inside the Hot Sushi. This fixes the part of ticket 2879793 that is actually a bug.
svn-id: r45147
2009-10-16 04:19:16 +00:00
Nicola Mettifogo
657e37985e Cleanup of sound code.
svn-id: r41461
2009-06-12 07:55:44 +00:00
Nicola Mettifogo
df1534ffd0 * Replaced the A8SVXDecoder class with a function to return an AudioStream in trunk/sound/.
* Refactored sound code in Parallaction to use the new Audio::make8SVXStream.

svn-id: r41460
2009-06-12 07:18:01 +00:00
Travis Howell
4979179621 Add sound effects support for PC version of BRA.
svn-id: r39716
2009-03-28 09:56:39 +00:00
Nicola Mettifogo
631e0aaed5 Changed Disk code to provide SeekableReadStream's to sound routines as well.
svn-id: r39608
2009-03-22 15:25:55 +00:00
Nicola Mettifogo
14ced31851 Fixed building on 64-bit architectures.
svn-id: r39395
2009-03-14 15:34:28 +00:00
Nicola Mettifogo
8723afd6f4 * Added a generic sound manager that hides engine-specific managers and allows accessing them through a simplified command/parameter interface.
* Updated client code to use the new manager.
* Moved Nippon Safes sound code from sound.cpp to sound_ns.cpp.

svn-id: r39394
2009-03-14 15:09:31 +00:00