Commit Graph

772 Commits

Author SHA1 Message Date
Max Horn
2664ca7eb1 oops, correct copyright string
svn-id: r16399
2005-01-01 16:20:17 +00:00
Max Horn
47280d9433 Updated copyright
svn-id: r16398
2005-01-01 16:09:25 +00:00
Max Horn
b15d92e470 Fix running ScummVM in plugin-mode
svn-id: r16360
2004-12-28 20:29:42 +00:00
Max Horn
160a28e912 Fixing hasActiveChannelOfType
svn-id: r16354
2004-12-28 11:19:36 +00:00
Max Horn
48e70acbaa Use SoundMixer::kMaxMixerVolume
svn-id: r16351
2004-12-27 23:58:04 +00:00
Max Horn
bc882a1af4 Introduced two new constants SoundMixer::kMaxChannelVolume and SoundMixer::kMaxMixerVolume, for clarity
svn-id: r16348
2004-12-27 23:33:19 +00:00
Max Horn
357eb38b49 Allow premix channels to use a custom sound type
svn-id: r16332
2004-12-27 02:58:55 +00:00
Max Horn
f15f517bb4 Add 'speech' sound type to mixer; make use of that in iMuse Digital
svn-id: r16331
2004-12-27 01:32:40 +00:00
Max Horn
67b311713d Added 'sound types' to the mixer - for now, only plain (for the premixer), SFX and music; volume is now controlled based on the sound type
svn-id: r16330
2004-12-27 00:27:00 +00:00
Max Horn
fec3df2096 Moved the softsynth midi drivers into a sound/softsynth; amongst other things, this fixes bug #1083058
svn-id: r16316
2004-12-25 18:34:44 +00:00
Max Horn
433711be5e Removing this dead code for now, it only leads to confusion
svn-id: r16314
2004-12-25 18:22:55 +00:00
Max Horn
59b6a07826 Evil workaround for bug #1083058
svn-id: r16045
2004-12-14 01:02:55 +00:00
Max Horn
3891c0fa39 change loadVOCFromStream to take a reference instead of a pointer (to a stream)
svn-id: r16035
2004-12-11 23:34:34 +00:00
Max Horn
5d5a13eec7 Moved MidiDriver creation code into the MidiDriver class (as static methods), same for some other MIDI related stuff
svn-id: r15968
2004-12-02 00:33:42 +00:00
Max Horn
d6d3e5422b cleanup
svn-id: r15955
2004-11-28 23:24:32 +00:00
Max Horn
10dd548b85 Changed parameter order of SoundMixer::playInputStream to match that of playRaw
svn-id: r15950
2004-11-28 23:02:28 +00:00
Jerome Fisher
45d92a02f4 Added a "permanent" field to Channels, which simply prevents them from being deleted during stopAll().
I hope this doesn't step on anyone's toes; it was quite urgent, since loading a saved game stopped MT-32 emulation audio forever.

svn-id: r15946
2004-11-28 22:15:09 +00:00
Max Horn
f6b495c8bc Assume for now that the premixer is always used for music playback (as opposed to being used for SFX); this affects the volume (see bug #1049375)
svn-id: r15940
2004-11-28 13:57:49 +00:00
Max Horn
c51b1266c0 Removed the (highly SCUMM specific) 'appendable stream' API from SoundMixer; SCUMM now uses the appendable stream directly
svn-id: r15919
2004-11-27 17:09:05 +00:00
Max Horn
573e02bb4c Removed the old setupPremix version, it is not needed anymore. Also fixed some doxygen comments (they were being assigned to the wrong things)
svn-id: r15918
2004-11-27 16:26:54 +00:00
Max Horn
ba74a8e7f6 Added some more mixer doxygen docs; cleaned up Mixer API a bit, removing some very specialised methods
svn-id: r15914
2004-11-27 15:58:18 +00:00
Max Horn
1a7ca2dc2a AudioStream::read() has been removed quite some time ago, now making sure that change is reflected everywhere
svn-id: r15911
2004-11-27 13:54:09 +00:00
Max Horn
96804652a2 cleanup
svn-id: r15863
2004-11-22 22:52:48 +00:00
James Brown
4aa5649c1e Erm, this was never meant to be commited. I might as well leave the .h change for now, until kyra is investigated further.
svn-id: r15788
2004-11-11 14:19:38 +00:00
James Brown
cb4b3c1f7e Prevent infinite loop by displaying the launcher after a game start FAILURE too.
svn-id: r15787
2004-11-11 14:01:11 +00:00
Eugene Sandulenko
805b21181a Major MT-32 emu overhaul based on KingGuppy's code.
o added configure option
 o mi2 intro doesn't freeze anymore and has no sound glitches
 o missing instruments in many titles are fixed
 o numerous memory overwrite bugs are fixed
 o code is cleaned a lot and splitted into many smaller files
 o mt32.cpp went to backends/midi
 o synced with upstream code
 o reverberation fixed

 * don't complain about File class wrapper :)
 * all custom types are back
 * #pragmas are to do
 * maybe some indentation is wrong too

I prefer smaller commits, but this thing came in one piece.

svn-id: r15715
2004-11-06 01:41:32 +00:00
Eugene Sandulenko
775bd838c7 Delegate channel functions to any MidiDriver. This is useful for the
MT-32 emulation and quite possibly other MidiDrivers in future.

svn-id: r15711
2004-11-04 21:34:17 +00:00
Max Horn
5f4575ccd0 Doxygen fixes
svn-id: r15699
2004-10-30 21:52:57 +00:00
Paweł Kołodziejski
c10cce6af1 fixed warnings
svn-id: r15665
2004-10-23 13:39:03 +00:00
Chris Apers
dc02e95cd7 Prepare true AdLib support on PalmOS
svn-id: r15649
2004-10-22 12:11:24 +00:00
Eugene Sandulenko
9d0b746aaa Patch #1048326 Better MT-32 support
svn-id: r15635
2004-10-21 22:37:37 +00:00
Max Horn
697da0eb9b Add comment
svn-id: r15595
2004-10-17 19:39:54 +00:00
Max Horn
9f4bf02c1e Fix playback of MP3 files till EOF in some cases
svn-id: r15587
2004-10-17 13:49:11 +00:00
Max Horn
1036e88aa6 Implement premix proc via an AudioStream / Channel (eventually we'll remove the setupPremix method which takes a proc pointer)
svn-id: r15522
2004-10-11 22:01:21 +00:00
Eugene Sandulenko
ae7421ae2b Make AppendableAudioStream endianness-aware.
svn-id: r15491
2004-10-09 22:51:00 +00:00
Max Horn
ce8c99bf62 Rename remaining OSystem methods to match our coding guidelines
svn-id: r15332
2004-09-28 20:19:37 +00:00
Max Horn
f66960c4b9 Remove obsolete path param
svn-id: r15278
2004-09-25 23:33:34 +00:00
Max Horn
61b7e2155a Fix doxygen warnings
svn-id: r15277
2004-09-25 23:26:46 +00:00
Max Horn
9ec7b57f9b Fix potential race condition
svn-id: r15191
2004-09-19 13:54:24 +00:00
Travis Howell
e22230e223 Actually check if a sound is active, if the sound is outside music engine.
Add some more HE differences

svn-id: r15188
2004-09-19 12:22:47 +00:00
Paweł Kołodziejski
0e9967afe1 smush tracks are not music channel, removed outdated dimuse comment
svn-id: r15167
2004-09-18 14:31:36 +00:00
Paweł Kołodziejski
3a19ca1be3 fixde bug IMUSE+DEBUG
svn-id: r14892
2004-09-04 13:13:23 +00:00
Max Horn
3511e688ab Fix for bug #1022265 (Memory leak in vorbis.cpp?)
svn-id: r14889
2004-09-04 10:12:22 +00:00
Max Horn
759cd67de5 cleanup of TimerProc mess
svn-id: r14683
2004-08-22 13:27:34 +00:00
Max Horn
cebd4a24cb Remove orphaned TODO
svn-id: r14517
2004-08-08 15:22:47 +00:00
Travis Howell
5e7d2494bb Update comment
svn-id: r14456
2004-08-03 10:11:54 +00:00
Travis Howell
2b1c98b6ea Add comment
svn-id: r14455
2004-08-03 09:46:38 +00:00
Travis Howell
fd2e14f33c Add invalid version used by French Simon2
svn-id: r14453
2004-08-03 03:18:51 +00:00
Max Horn
4b6dae31eb changed loadVOCFile to work on a generic ReadStream instead of a File, and renamed it to loadVOCFromStream; removed readVOCFromMemory as it isn't used anymore, and in the future, a MemoryReadstream plus loadVOCFromStream can achieve the same effect
svn-id: r14383
2004-07-31 11:46:58 +00:00
Torbjörn Andersson
70f8f689a1 Applied patch #957544 to make output sample rate configurable at runtime.
svn-id: r14225
2004-07-16 10:24:29 +00:00
James Brown
9756a420a3 Use extrapath in Sword1 engine (from 0.6.0 branch). More verbose errors to go with the forthcoming new manual. Sword1 CD swapping doesn't work as expected HERE, either :)
svn-id: r14188
2004-07-11 04:41:48 +00:00
Paweł Kołodziejski
c7133de879 getFreeSpace() is not longer used
svn-id: r14136
2004-07-01 04:43:32 +00:00
Max Horn
4f80e2f36b Fix for bug #981991 (VORBIS: Crash when using Ogg Vorbis CD tracks)
svn-id: r14128
2004-06-29 23:27:18 +00:00
Max Horn
e0eab01e63 Make use of new File refcount code; also fixed long standing bug in vorbis code (ov_clear was not being called, resulting in a file not being closed)
svn-id: r14107
2004-06-28 22:35:22 +00:00
Torbjörn Andersson
51b373eb6f Fixed a typo in a comment.
svn-id: r13948
2004-06-09 06:30:49 +00:00
Torbjörn Andersson
6dc0191e03 Make allNotesOff() also turn off all "hanging notes". Without this change,
I wasn't able to fully stop ITE's XMIDI music - there would always be a
couple of notes hanging even after unloading it. Apparently this music
doesn't use the "active notes" mechanism at all, and I guess the ALSA
driver doesn't support the "All Note Off" event.

I'm still not 100% sure this is the correct fix, but unless someone has any
better idea...

svn-id: r13910
2004-05-31 08:51:10 +00:00
Nicolas Bacca
ab9598e2f5 Config sample switch for WinCE
svn-id: r13815
2004-05-09 14:26:01 +00:00
Max Horn
90cced2a5b Remove odd sample rate hack (for DOTT demo); instead, be slightly less strict about VOC headers, since DOTT demo (and maybe others) use buggy VOC headers
svn-id: r13787
2004-05-05 10:58:07 +00:00
Max Horn
151d92e8cd Explain a bit what getSampleRateFromVOCRate() does; mark a hack in it more clearly; disable warning
svn-id: r13756
2004-05-02 22:33:28 +00:00
Torbjörn Andersson
3ebb895e9a Doubled the buffer size to prevent crashes with the Inherit the Earth
MIDIs. This is a temporary fix - Jamieson630 said something about making a
better fix later - but it will have to do for now.

svn-id: r13719
2004-05-01 16:42:58 +00:00
Jamieson Christian
72568a8b43 Fix for [945497] Possible bug in midiparser_smf.cpp
Corrected Type 0 SMF compression to properly account
for command lengths when Running Status is being used.
Also increased buffer size for Type 0 output since
Running Status can result in the Type 0 output being
larger than the source data. Needs some more work,
but at least the Wyrmkeep people can keep going in
the meantime.

svn-id: r13707
2004-05-01 13:16:45 +00:00
Torbjörn Andersson
182cbf7091 Changed printf() to warning()
svn-id: r13684
2004-04-30 17:48:20 +00:00
Torbjörn Andersson
a0623e6012 Changed printf() to warning(). (Even in the case where the message used to
say "ERROR".)

svn-id: r13677
2004-04-29 11:57:25 +00:00
Torbjörn Andersson
92407c56b3 Changed printf() to warning(), plus some formatting changes.
svn-id: r13676
2004-04-29 11:51:11 +00:00
Paweł Kołodziejski
d2fa7bbcc7 synced code free space with buffer changes
svn-id: r13646
2004-04-26 20:48:09 +00:00
Jamieson Christian
f7084c20e9 MIDI control change 18 is no longer transmitted.
It is not a valid MIDI control change message.
It is used internally in the SCUMM MIDI tracks
to indicate part priority.
The only MidiDriver that needs it is Adlib.
It should be noted that the priority values are
out of bounds for a regular MIDI message anyway.
Valid control change values are 0-127, but the
priority value ranges from 0-255.

This fixes a crash with a certain software MT-32
emulator running under Linux. Thanks to olki for
bringing up this issue.

svn-id: r13645
2004-04-26 20:34:59 +00:00
Jamieson Christian
4ee0365a23 Tweaked a few things to accommodate
MSVC6's idiosyncracies.

svn-id: r13644
2004-04-26 20:28:34 +00:00
Paweł Kołodziejski
43979c9012 delete CustomProcInputStream and add getFreeSpace for appendable audiostream
svn-id: r13629
2004-04-25 18:43:46 +00:00
Paweł Kołodziejski
6680c5368d added CustomProcInputStream
svn-id: r13570
2004-04-13 05:57:52 +00:00
Max Horn
6bf0cce89c Clean up VOC code, and fix potential out-of-bounds access
svn-id: r13535
2004-04-10 22:34:07 +00:00
Max Horn
56b5b9f7df Fix for bug #885490 (FT: Ben stops talking mid-scentence @ the gorge) -> this only works for monster.sou files; compressed audio is incomplete, and we have to fix the extract tool to correct that
svn-id: r13531
2004-04-10 01:46:38 +00:00
Torbjörn Andersson
86a5466526 Changed the UNIX line breaks.
Fixed the problem where the lookout music didn't play in the MI1CD intro.
At least, I *think* I fixed it. It worked at home, but I can't test it on
this particular computer.

svn-id: r13515
2004-04-09 07:24:08 +00:00
Max Horn
650dc2117c seems it is 'endianness' and not 'endianess'
svn-id: r13504
2004-04-08 22:46:46 +00:00
Torbjörn Andersson
0fb1d56589 Format string fix.
svn-id: r13408
2004-03-28 15:04:48 +00:00
Torbjörn Andersson
3f99723423 When I played an Ogg Vorbis-encoded FotAQ I noticed that whenever a sound
effect happened during a line of speech there was a chance - not a
certainty - that the speech would get cut off prematurely.

As far as I can tell, this is because the Vorbis decoder isn't the only one
who's accessing the same file. Now the Vorbis decoder will explicitly seek
to the position where it expects the file to be at before reading from it.
I hope this is the correct fix. It does fix the problem for me, at least.

I don't know if any of the other decoders needs a similar patch. I couldn't
reproduce the problem with my MP3-encoded FotAQ, but there are other
possible explanations for that, e.g. the bug gets harder to trigger the
more sound data that is decoded in each pass.

svn-id: r13353
2004-03-21 16:59:10 +00:00
Max Horn
1b537be8d4 Patch #902111: Change remaining random function calls to use RandomSource
svn-id: r13262
2004-03-13 18:44:10 +00:00
Max Horn
c6752cccf5 renamed more OSystem methods to follow our naming scheme; renamed NewGuiColor to OverlayColor; fixed some calls to error() in the SDL backend
svn-id: r13087
2004-02-28 12:58:13 +00:00
Max Horn
d158280425 the OSystem changes we discussed on the ML (note: renaming of the existing OSystem API is not yet finished); porters will have to fix their ports to get them to compile again
svn-id: r13036
2004-02-24 22:39:42 +00:00
Max Horn
aa6ec62e9d Patch #885904 (Flac Support) with some tweaks by me
svn-id: r12984
2004-02-22 14:11:16 +00:00
Paweł Kołodziejski
abdb4fbe87 fixed bug #892426 - improved FT sound loops
svn-id: r12886
2004-02-14 15:14:30 +00:00
Torbjörn Andersson
a8f8ceee0f Removed now obsolete getSamplesPlayed() function. It was only ever used for
the Broken Sword cutscenes, where it didn't work very well, and was never
fully implemented.

svn-id: r12832
2004-02-12 17:31:33 +00:00
Torbjörn Andersson
9003dbbcb3 With no comments from fingolfin, and a go-ahead from ender, I've committed
patch #892455 ("getElapsedTime() for sounds") despite its current
shortcomings. It should be good enough for the Broken Sword cutscenes
anyway, which is what I'll be looking at next.

svn-id: r12829
2004-02-12 16:25:28 +00:00
James Brown
9301f0b0ff Change AppendableMemoryStream overflows to debug messages, so people stop believing them to be the cause of errors in bug reports :P
svn-id: r12775
2004-02-08 17:19:09 +00:00
Torbjörn Andersson
7ae1cc0f96 Fixed "no newline at end of file" warning.
svn-id: r12746
2004-02-06 08:35:24 +00:00
Chris Apers
2420bf2900 Prepare Zodiac MIDI support
svn-id: r12734
2004-02-05 13:56:39 +00:00
Max Horn
f36710f8b4 Act more gracefully when failing to load a (VOC) sound (should help bug #889442)
svn-id: r12719
2004-02-03 08:53:13 +00:00
Max Horn
da76ac5890 Various changes to the build system which allow building ScummVM in an external directory (and as such, allow you to have a debug, a profiling, and a release build from the same set of source files in parallel). Work in progress
svn-id: r12680
2004-01-30 21:54:28 +00:00
Max Horn
176aa74827 Renamed the 'pan' effect of the mixer to 'balance', since that is what we actually do; applied patch #886786 which corrects a bug in the balance code
svn-id: r12665
2004-01-29 18:15:27 +00:00
Chris Apers
f05654662c No more needed
svn-id: r12559
2004-01-20 14:39:38 +00:00
Chris Apers
65d2e4e718 Enable those drivers (still no sound on PalmOS)
svn-id: r12558
2004-01-20 14:38:15 +00:00
Max Horn
aa0ad9b491 Patch #878883: Fix for Ogg Vorbis playback
svn-id: r12503
2004-01-18 20:57:45 +00:00
James Brown
04f2bc0276 Update BS2 cutscene player with changes from roever: overlay support (default, 8bit backends should define BACKEND_8BIT for fast colour remapping) and sound syncronisation.
svn-id: r12456
2004-01-17 14:20:32 +00:00
Max Horn
033ff78ae9 updated copyright notice
svn-id: r12176
2004-01-06 12:45:34 +00:00
Max Horn
e049e24a2c no need to specify game data path here: File::setDefaultDirectory() took care of that
svn-id: r12135
2004-01-04 14:06:06 +00:00
Max Horn
bfea71b0c4 renamed AudioInputStream -> AudioStream
svn-id: r12110
2004-01-03 14:10:13 +00:00
Max Horn
1805b07a48 simplification (possible since read() doesn't have to be efficient anymore)
svn-id: r12103
2004-01-03 02:30:34 +00:00
Max Horn
d212b2c2e1 replace read() by readBuffer() in CopyRateConverter
svn-id: r12102
2004-01-03 02:29:48 +00:00
Max Horn
81481ad6da more MAD MP3 / Ogg Vorbis cleanup: try not to expose anything about the libs used for MP3/Vorbis support -> this eases changing the implementations, and reduces header dependencies (and thus compile time) :-)
svn-id: r12097
2004-01-03 01:25:45 +00:00
Max Horn
96e2c239c4 removed SoundMixer::playMP3CDTrack; simplified makeMP3Stream (special variant with mad_timer_t was really only needed for MP3TrackInfo class)
svn-id: r12095
2004-01-03 00:55:28 +00:00
Max Horn
d335bce62d added makeVOCStream() (convenience function)
svn-id: r12094
2004-01-03 00:33:14 +00:00
Paweł Kołodziejski
7bf0cc2a98 FT sounds have loops in voc data: 65536, that could be max loops or unfinite loops
svn-id: r11992
2003-12-28 09:14:00 +00:00
Max Horn
d52280ab01 cleanup
svn-id: r11981
2003-12-27 21:31:49 +00:00
Max Horn
fabcb25a68 paranoia
svn-id: r11980
2003-12-27 21:31:41 +00:00
Paweł Kołodziejski
25a7b9ef33 fixed compilation
svn-id: r11976
2003-12-27 18:29:21 +00:00
Max Horn
0aa7993218 renamed VOC functions
svn-id: r11962
2003-12-27 14:10:45 +00:00
Paweł Kołodziejski
160b94fdaa added handing voc loops
svn-id: r11951
2003-12-26 22:53:30 +00:00
Max Horn
692fca88c2 fix warning, add TODO comment
svn-id: r11942
2003-12-26 13:14:03 +00:00
Paweł Kołodziejski
a45e92efed passthrought v7+ sound voices by imuse digital
svn-id: r11939
2003-12-26 12:15:23 +00:00
Max Horn
2755d9c00a add param to playInputStream which makes it possible to retain an input stream even after it has been given to the mixer for playback
svn-id: r11933
2003-12-26 02:19:31 +00:00
Max Horn
91f5f1687c logic fix: we must do wrap around *before* read, not after. otherwise eosIntern will in some border cases return wrong results; some cleanup
svn-id: r11932
2003-12-26 01:32:29 +00:00
Max Horn
859a9c0129 o Added SoundMixer::isReady()
o Removed SoundMixer::bindToSystem()
o In scumm, replaced _silentMixer, _silentDigitalImuse and _noDigitalSamples by SoundMixer::isReady()

svn-id: r11893
2003-12-24 17:42:22 +00:00
Max Horn
3472e93051 explicitly turn off all active sounds -> not all MIDI devices support the 'All note off' event, at least according to http://crystal.apana.org.au/ghansper/midi_introduction/midi_channel_mode.html ; and now, the quicktime MIDI code doesn't support it anymore, too ;-)
svn-id: r11885
2003-12-24 12:54:33 +00:00
Max Horn
e9269257f3 turned PlayingSoundHandle into an 'opaque' (well not really :-) data type, mainly because people kept (accidentally and sometimes on purpose :-) misusing them
svn-id: r11881
2003-12-24 00:25:18 +00:00
Max Horn
43875b42fc Allow sound ID for MP3/Vorbis sounds, too; cleaned up Vorbis playback code a bit
svn-id: r11879
2003-12-23 19:14:57 +00:00
Torbjörn Andersson
cb782764b4 Fix warning generated by the incomprehensibly picky MinGW GCC compiler.
svn-id: r11858
2003-12-22 19:19:04 +00:00
Max Horn
e01c3e1b1d o Got rid of Channel::destroy() method (no more evil 'delete this', plus
slightly more efficient)
o Fixed potential memory leak in SoundMixer::playRaw
o Channel not anymore friend class of SoundMixer
o misc cleanup

svn-id: r11857
2003-12-22 19:08:19 +00:00
Max Horn
21ab8e496e include stdafx.h
svn-id: r11829
2003-12-21 17:35:44 +00:00
Max Horn
e439eb5129 added convenience SoundMixer::playVorbis variant which calls through to playSfxSound_Vorbis; made scumm/queen engines use it
svn-id: r11812
2003-12-21 15:47:52 +00:00
Max Horn
7fbb3e0559 Cleaned up SoundMixer::newStream() a bit (I plan to replace all usages of this by playInputStream(), this cleanup eases this a bit)
svn-id: r11803
2003-12-21 01:17:03 +00:00
Max Horn
ec0ebf5380 o Make use of the new LinearMemoryStream feature which allows auto-disposing the sound data
o This allows us to get rid of the ChannelRaw class
o Removed the sound index return value from several methods
o Removed all methods dealing with sound indices (i.e. stopChannel and pauseChannel)

svn-id: r11801
2003-12-21 00:44:31 +00:00
Max Horn
c55652d4a6 Rewrote make*Stream factory functions to work around bug in MSVC6 (see bug report #860067); added some comments; LinearMemoryStream now can auto-dispose the data passed to it
svn-id: r11798
2003-12-21 00:26:36 +00:00
Max Horn
d8903123b0 distinguish between end of stream and end of data
svn-id: r11756
2003-12-19 01:30:19 +00:00
Max Horn
d21fc5845d o Moved MP3 and Vorbis input streams to mp3.* resp. vorbis.*
o Added SoundMixer::playInputStream and made some of the other play* methods use it
o Added ProcInputStream stub (not working yet) which one day may allow us to replace the premix code, and allow other fancy stuff
o Remove AudioInputStream::readBuffer default implementation (subclasses should always provide it for max. performance)
o Some minor cleanup

svn-id: r11754
2003-12-19 00:32:47 +00:00
Max Horn
32dd4cc006 fix for recent audio stream regression
svn-id: r11752
2003-12-19 00:09:34 +00:00
Chris Apers
3644176c43 PalmOS sound API cannot access globals data, StackLock constructor use g_system
svn-id: r11742
2003-12-18 11:51:58 +00:00
Chris Apers
26fdb102bb This is now supported on PalmOS
svn-id: r11741
2003-12-18 11:49:53 +00:00
Max Horn
e7bf167428 Made sure that *all* AudioInputStream 'know' their sample rate; removed pointless MusicStream class; removed various specific Channel subclasses and instead generalized the base class some more
svn-id: r11699
2003-12-17 02:19:24 +00:00
Max Horn
91997026a0 cleanup
svn-id: r11697
2003-12-17 01:57:37 +00:00
Max Horn
4343567458 changed the way 'streams' are handled: the finalization logic is now in the WrappedAudioInputStream; this allows further streamlining of the channel/mixer code (can you already guess what I am working towards? :-)
svn-id: r11696
2003-12-17 01:50:50 +00:00
Max Horn
d81746ada8 some cleanup
svn-id: r11694
2003-12-17 01:32:00 +00:00
Max Horn
de51f631be cleanup
svn-id: r11686
2003-12-16 15:34:17 +00:00
Robert Göffringmann
5756a41ba6 added mixer flag for little endian samples
svn-id: r11665
2003-12-16 02:11:04 +00:00
Max Horn
0ee89a3277 init some more member vars
svn-id: r11597
2003-12-12 15:05:33 +00:00
Torbjörn Andersson
813e8fbdab Emergency bugfixes:
Initialise _cd.playing to false. Otherwise ScummVM may create a savegame
where a CD track appears to be playing, but everything about it is
undefined, causing ScummVM to crash when loading it.

Initialise _track_info[] with NULLs, otherwise ScummVM crashes for me when
I start the CD version of MI1.

There's probably a lot more that *should* be properly initialised, but this
seems to take care of the most serious issues, and is all I have the time
to do now anyway.

svn-id: r11573
2003-12-11 08:18:51 +00:00
Jamieson Christian
f82a23771c Expanded the Doxygen docs for the MidiParser class.
Painfully detailed in its description of how to
get a MidiParser object hooked up and running.

Hope this helps ya, Joost! ;)

svn-id: r11559
2003-12-11 00:51:51 +00:00
Jamieson Christian
c95e9d12a2 Endian-safe read-and-advance helper functions are
now based on the READ_LE_* and READ_BE_* macros.
Very slight performance gain, woo hoo.

svn-id: r11558
2003-12-10 23:52:29 +00:00
Max Horn
8edcf3f1ca small tweak/fix (?)
svn-id: r11541
2003-12-09 23:01:36 +00:00
Max Horn
bbc03e144c cleanup
svn-id: r11431
2003-11-29 23:40:21 +00:00
Paweł Kołodziejski
f1d0219067 fixed warning
svn-id: r11430
2003-11-29 19:49:49 +00:00
Max Horn
e68ac71155 added API to query CD playback status; renamed AudioCDManager methods
svn-id: r11422
2003-11-29 13:56:33 +00:00
Max Horn
f00cd05b33 moved Audio CD (emulation) code from scumm/sound.cpp to sound/, so that it may be reused by other engines in the future
svn-id: r11421
2003-11-29 12:11:01 +00:00
Paweł Kołodziejski
1f99fbe77c cleanup whitespaces
svn-id: r11221
2003-11-08 23:05:04 +00:00
Travis Howell
a5498d2102 Correct voc rate in DOTT demo
svn-id: r11186
2003-11-07 11:11:06 +00:00
Max Horn
4c833ba23e fix invalid typo fixes ;-) (BTW did anybody get comit mails for khalek's changes? I didn't)
svn-id: r11183
2003-11-07 09:38:06 +00:00
Jonathan Gray
b2e9b73c4c spelling fixes
svn-id: r11180
2003-11-07 02:43:47 +00:00
Joost Peters
6fc0cd7913 whatever
svn-id: r10959
2003-10-25 01:11:14 +00:00
Joost Peters
3ad14b06f5 added extra flag to mixer so we don't use free() on new'd pointers
svn-id: r10958
2003-10-24 23:09:01 +00:00
Max Horn
7eab653832 cleanup
svn-id: r10894
2003-10-18 13:04:59 +00:00
Max Horn
33f2fbff08 We proudly present the latest installment of our hit series 'Untangle the mess': 'Help! Space Invaders refactored the music detector'... in other news, I obviously need to sleep now
svn-id: r10883
2003-10-18 00:22:46 +00:00
Max Horn
ad2db08940 renamed some Timer methods
svn-id: r10868
2003-10-17 16:39:32 +00:00
Max Horn
c11ebb33b6 cleanup
svn-id: r10718
2003-10-10 12:12:56 +00:00
Max Horn
9f537f4b8c clarification: premixer must use native endianess
svn-id: r10621
2003-10-05 17:42:55 +00:00
Jamieson Christian
a722d0601e Preliminary preparation for new YM2612 FM emulator.
All the hooks are in, but actual implementation
needs to be checked for portability.

svn-id: r10615
2003-10-05 15:36:52 +00:00
Max Horn
d4734bd4f2 use namespace Common a bit more; don't zero the RNG in scumm (else the seed gets reset); remove obsolete 256 color blending code
svn-id: r10592
2003-10-04 11:50:21 +00:00
Max Horn
ad293a5ab8 cleanup / doxygenification
svn-id: r10578
2003-10-03 23:34:06 +00:00
Max Horn
88de9a21ae undo aquadran's recent changes here. If this doesn't compile on MSVC7, fine, simply remove it from your project file - it's not supposed to be compiled ATM
svn-id: r10564
2003-10-03 10:30:33 +00:00
Paweł Kołodziejski
f0fae232b9 fixed compilation under msvc7
svn-id: r10562
2003-10-03 07:45:41 +00:00
Max Horn
bb6765f85d cleanup & restructuring; in particular move the midi driver list to its own source file
svn-id: r10550
2003-10-02 22:52:57 +00:00
Max Horn
17bf7b95aa removed duplicate g_timer object (one was global, one was static to timer.cpp); set g_system earlier (might prevent a few race conditions)
svn-id: r10471
2003-09-28 21:08:48 +00:00
Jamieson Christian
4dcb829e78 Timer services are now available through g_timer, so
you don't have to go through the Engine to get to them.

svn-id: r10450
2003-09-27 23:59:00 +00:00
Jamieson Christian
7f707acfb6 Converted the MPU-401 timer to use the Timer class.
Since this was the only place where we were using
create_thread, that method should be removable now.
I also removed the midi_driver_thread overrides
for the MorphOS and YPA1 (Palm) backends. These need
to be tested by their respective porters.

svn-id: r10414
2003-09-26 14:05:33 +00:00
Jamieson Christian
a30eb131bb Fix for Bug [810564] ALL: missing instruments with native MT-32
As defined in Patch [811623] MT-32 patch for Bug 810564

Added a channel mask to MPU-401 devices so that --native-mt32
may force the device to use only the subset of MIDI channels
actually supported by the MT-32. Also added a best-guess
interpretation of iMuse Part priority in the SysEx 0x00 msg,
since part priorities become more of an issue when the
channel count is cramped.

svn-id: r10409
2003-09-25 22:32:05 +00:00
Max Horn
a4675f34a7 work around silly bug in Microsoft Visual Studio .NET 2003. M$ does not stop at breaking HTML and Java, no, now they have to mutilate C/C++, too. MS-C instead of ANSI-C, anybody? *grmbl*
svn-id: r10319
2003-09-19 21:29:59 +00:00
Max Horn
9470c9f661 changed & documented the premixer semantics
svn-id: r10294
2003-09-18 16:01:33 +00:00
Max Horn
be9d4066e1 moved engine.* to base; this fixes some linking issues when building a barebone ScummVM (or maybe I just want to increase our CVS stats? <g>)
svn-id: r10287
2003-09-18 02:07:18 +00:00
Max Horn
231cb16b5b some tweaks to the build system (work toward plugin support)
svn-id: r10279
2003-09-17 21:53:13 +00:00
Torbjörn Andersson
bc90c04c25 Don't call the premix function when the mixer is paused. (This is
particularly noticeable in games with PC speaker emulation, but I could
hear faint noises in AdLib music as well.)

svn-id: r10262
2003-09-16 07:06:17 +00:00
Max Horn
9e88df9e16 some (untested!) support for backends which require unsigned audio samples
svn-id: r10183
2003-09-11 22:57:06 +00:00
Max Horn
c0e2d2be66 fixed module.mk
svn-id: r10155
2003-09-10 12:41:14 +00:00
Max Horn
eae239394c moved declaration of error/warning/debug from engine.h to util.h; added voc.cpp
svn-id: r10150
2003-09-10 12:19:57 +00:00
Travis Howell
123c9035cf Up debug level of this warning, since it floods output in loom
svn-id: r10131
2003-09-09 13:23:09 +00:00
Max Horn
555dae9fee map 0xA5 to 11025 Hz, too
svn-id: r10129
2003-09-09 12:36:41 +00:00
Max Horn
2c67f7b32f map 0xD3 in VOC headers to 22050 Hz, too
svn-id: r10128
2003-09-09 12:34:13 +00:00
Max Horn
ef373fe2e8 start to use code from the original resample codebase, since it uses fixed point math instead of float; however, the code is not at all complete right now, I just commit this to get it off my HD (neither the old nor the new code in resample.cpp work anyway)
svn-id: r10089
2003-09-08 15:32:37 +00:00
Max Horn
ea461dfc3c new header file for VOC specific stuff
svn-id: r10072
2003-09-07 20:23:38 +00:00
Max Horn
0be0196013 removed pauseMixer method from mixer, and renamed stop to stopChannel
svn-id: r10042
2003-09-06 10:47:30 +00:00
Max Horn
eac128f011 optimized channel volume/pan handling
svn-id: r10028
2003-09-05 23:27:11 +00:00
Max Horn
3aa8454efa moved the sound ID param in playRaw before volume/pan
svn-id: r10023
2003-09-05 22:09:56 +00:00
Max Horn
caf8e8f5fc oops
svn-id: r10021
2003-09-05 21:18:44 +00:00
Max Horn
06b6ff9a44 added default volume/pan values
svn-id: r10019
2003-09-05 21:06:32 +00:00
Max Horn
11193b0746 cleaned up sound/mixer.h a bit; renamed some mixer methods for consistency
svn-id: r10018
2003-09-05 20:48:32 +00:00
Paweł Kołodziejski
7bc63a0ce3 fixes for uninitialized pan and volume
svn-id: r9998
2003-09-05 06:22:10 +00:00
Jonathan Gray
e17a451ac5 remove shadow'd var by using variable name from prototype
svn-id: r9979
2003-09-02 22:38:53 +00:00
Paweł Kołodziejski
7c4e678a87 moved volume and pan control into flow func
svn-id: r9976
2003-09-02 20:34:22 +00:00
Torbjörn Andersson
4b49daf3ff Fixed compiler warning that I introduced earlier.
svn-id: r9974
2003-09-02 16:51:51 +00:00
Torbjörn Andersson
f486997822 Added per-channel pausing. Maybe I should have named the pauseChannel()
function simply pause() to be consistent with stop(), but there already is
a pause() function and I don't want to have two functions with the same
name doing different things. (The current pause() function pauses all
channels.)

svn-id: r9968
2003-09-02 13:48:20 +00:00
Paweł Kołodziejski
db18d4657c forgot this
svn-id: r9957
2003-09-01 14:02:45 +00:00
Chris Apers
e6a0261c7e The channel could be destroyed so changeVolumeAndPan can't access it in that case
svn-id: r9955
2003-09-01 10:12:28 +00:00
Paweł Kołodziejski
82fea49671 added comments:
volume: 0 - 127
pan: (-127 <-> 0 <-> 127) (left <-> center <-> right)

svn-id: r9945
2003-08-31 20:36:53 +00:00
Paweł Kołodziejski
2533b23a60 added mixer features: volume and pan control per channel
svn-id: r9944
2003-08-31 20:26:21 +00:00
Torbjörn Andersson
f72681b10a Made PlayingSoundHandle unsigned again, since the mixer change was
reverted.

svn-id: r9930
2003-08-30 20:36:44 +00:00
Paweł Kołodziejski
c684a076ee revert id handle stuff
svn-id: r9927
2003-08-30 20:25:07 +00:00
Torbjörn Andersson
bfee72f757 If -1 is going to be a valid value for a PlayingSoundHandle, the data type
had better be signed...

svn-id: r9925
2003-08-30 20:07:09 +00:00
Paweł Kołodziejski
9c05d44d00 added func isChannelActive for mixer, and fixed handling numbers of channel 0
svn-id: r9924
2003-08-30 18:12:49 +00:00
Max Horn
57493197e8 small cleanup for the Ogg playback code
svn-id: r9852
2003-08-24 21:54:46 +00:00
Jamieson Christian
d7fae3d1cb More corrections to the VAR_MUSIC_TIMER
computations, mostly to produce the
exptected output with AD resources.

svn-id: r9730
2003-08-16 17:08:22 +00:00
Jamieson Christian
121b00a6f7 Corrected timing mechanism for RO music streams.
RO streams have built-in timer markers (the
unknown 0xA0 mentioned in FR [742249]) that
override automated methods of updating
VAR_MUSIC_TIMER. Since these timer markers
do not seem to be present in AD resources, the
old mechanism is used if MD_ADLIB is the current
MidiDriver.

svn-id: r9720
2003-08-16 09:34:19 +00:00
Jamieson Christian
17be1ad7d5 Removed incorrect acknowledgements (copy/paste error)
svn-id: r9680
2003-08-14 05:07:31 +00:00
Bertrand Augereau
0d54ac09c1 ZeroInputStream::readBuffer didn't have the same signature as the base class version, making VC.NET 2K3 complain
svn-id: r9668
2003-08-13 22:01:34 +00:00
Jamieson Christian
fb62ba61ca Added PC Speaker and PCjr command line options,
in preparation for Kirben's addition of WA support
for games that already have AD tracks.

svn-id: r9656
2003-08-13 14:08:21 +00:00