Commit Graph

150 Commits

Author SHA1 Message Date
Max Horn
f936443252 SCI: Saner and simpler conversion from msecs to ticks
svn-id: r49846
2010-06-15 12:34:33 +00:00
Max Horn
d570e10b77 Modify makeAIFFStream to match the other sound decoder factories
svn-id: r49844
2010-06-15 12:33:54 +00:00
Filippos Karapetis
e93f8902a8 Cleanup of the savegame code:
- Added a saveLoadWithSerializer() method to the reg_t class
- Moved SegManager::reconstructClones() inside savegame.cpp
- Moved SoundCommandParser::syncPlayList() and SoundCommandParser::reconstructPlayList() inside savegame.cpp

svn-id: r49683
2010-06-15 07:20:53 +00:00
Filippos Karapetis
a6a482b83c SCI: Added a version of allNotesOff() which sends messages only to the channels used by the associated song instead of all channels
svn-id: r49673
2010-06-14 22:35:49 +00:00
Filippos Karapetis
f4739f9f68 Added debug output to kDoAudio and some music commands. Also added a warning when an audio stream can't be created. Finally, the debug level of the MIDI parser debug output has been raised to 4, as it's too verbose
svn-id: r49605
2010-06-12 11:41:22 +00:00
Filippos Karapetis
a08d06ad35 - Added a new debug command, verify_midi, which can be used to check all the songs of a game for unmapped instruments (still WIP and disabled)
- Fixed a bug in the verify_scripts command (it was loading the script resource twice)

svn-id: r49597
2010-06-11 14:47:13 +00:00
Martin Kiewitz
f470e1d96e SCI: adding current delta to tick position when getting the setsignalloop command - fixes sq3 music slight delay before actual looping
svn-id: r49585
2010-06-10 20:52:04 +00:00
Matthew Hoops
9f907aac09 kSciAudioWPlay should not actually play the song, but 'pre-load' it. We fake the pre-loading with a flag that will return 0 if the song has been called with kSciAudioWPlay. Fixes the dream sequence sound in MUMG.
svn-id: r49583
2010-06-10 20:26:59 +00:00
Matthew Hoops
6ad04a4a96 Add support for AIFF sound in SCI32 Mac games and add support for AIFF/WAVE audio36 patches; minor cleanup.
svn-id: r49576
2010-06-10 15:06:25 +00:00
Filippos Karapetis
eb4ec596cd Use the SELECTOR() macro for readability
svn-id: r49563
2010-06-10 09:18:57 +00:00
Martin Kiewitz
0f2e6b0f85 SCI: fix multiple playing of the same sound in a row (without using looping) - thx to LordHoto for helping me finding this one out - fixes pharkas right at the start (hammering only played once)
svn-id: r49538
2010-06-09 13:27:59 +00:00
Martin Kiewitz
f743468ec7 SCI: if song isn't playing, set signal and don't set fadeout/fadein variables - fixes lsl3 music lost after entering/exiting tv room (bug #3007406)
svn-id: r49500
2010-06-08 09:36:27 +00:00
Filippos Karapetis
722c4f1b8d Some more work on channel remapping: Moved the remapping code to the music loading code (still disabled)
svn-id: r49430
2010-06-04 15:01:26 +00:00
Johannes Schickel
664c86f25d Replace two uses of ::qsort by Common::sort.
svn-id: r49418
2010-06-03 23:37:05 +00:00
Johannes Schickel
02ed1a684a - Made some methods const
- Prefer const_iterator over iterator in SciMusic::findUsedChannels

svn-id: r49417
2010-06-03 23:07:53 +00:00
Filippos Karapetis
8dd7537a55 A first attempt at channel remapping (currently disabled)
svn-id: r49416
2010-06-03 22:13:23 +00:00
Filippos Karapetis
1973bd5a71 Added channel remapping to MidiParser_SCI (currently unused)
svn-id: r49414
2010-06-03 21:57:49 +00:00
Filippos Karapetis
ba11596572 SCI: Silenced warning when no audio decoder is compiled in
svn-id: r49351
2010-05-31 12:36:42 +00:00
Filippos Karapetis
1fd3877ec7 Cleanup
svn-id: r49333
2010-05-30 20:18:42 +00:00
Filippos Karapetis
67de5b1bd3 Mass renaming of selector-related functions, and removed some defines which were just cloaking functions with a different name
- GET_SEL32 -> readSelector
- GET_SEL32V -> readSelectorValue
- PUT_SEL32 -> writeSelector
- PUT_SEL32V -> writeSelectorValue
Also, changed some selector-related function names and variables to CamelCase

svn-id: r49317
2010-05-29 23:37:15 +00:00
Martin Kiewitz
dad3ad86ea SCI: read out vol selector on initSound/playSound for sci1early (soundversion) as well - fixes lsl1demo
svn-id: r49285
2010-05-28 09:29:05 +00:00
Martin Kiewitz
7029b059bf SCI: disabling music fading again, but only for sci32 - drivers seem to have issues when fading in on gk1/sierra logo
svn-id: r49271
2010-05-27 21:20:07 +00:00
Martin Kiewitz
d2513c9cc2 SCI: enabling fading again, issues in pharkas and gk1demo are actually "normal" - maybe we should add some hack workaround, but the delay in ssci was just slow resource loading
svn-id: r49269
2010-05-27 20:53:37 +00:00
Martin Kiewitz
cfed70df07 SCI: fixing resuming samples - fixes hang when ship is flying away happening when you entered menu during that sequence
svn-id: r49261
2010-05-27 11:26:37 +00:00
Martin Kiewitz
849cfe4f0e SCI: dont lock mutex in pauseAll(), isn't needed anyway - fixes deadlock in sq4
svn-id: r49214
2010-05-25 15:38:30 +00:00
Martin Kiewitz
b49efb67f6 SCI: only remove isQueued status for sound sci0
svn-id: r49187
2010-05-24 14:47:43 +00:00
Martin Kiewitz
350e3d7c05 SCI: remove isQueued status when sound gets stopped - fixes iceman resuming music when entering hotel complex (with bar) right at the start
svn-id: r49186
2010-05-24 13:50:19 +00:00
Martin Kiewitz
b069b9fe96 SCI: reenabling "stopAllSounds" code disabled in r49101 - isn't called anymore since priority is honored so it may have been right after all
svn-id: r49158
2010-05-23 16:42:49 +00:00
Martin Kiewitz
d27e32aa19 SCI: fix regression of r49156 - if multiple songs are stored for resume-play, use the last one - fixes iceman wrong music played after going through door in room 14 - still not sure about this, added fixme
svn-id: r49157
2010-05-23 13:22:58 +00:00
Martin Kiewitz
aa4ae667a9 SCI: use priority when queuing up music in sound sci0 -> fixes lsl3 jingle issues
svn-id: r49156
2010-05-23 12:22:23 +00:00
Martin Kiewitz
5f8778395a SCI: fix regression of r49109 - only queue up midi sounds
svn-id: r49114
2010-05-20 06:11:46 +00:00
Martin Kiewitz
264fde962b SCI: sound code now queues up music in sci0, wip-code: not reacting on priority yet - fixes iceman room 14
svn-id: r49109
2010-05-19 21:10:43 +00:00
Martin Kiewitz
e243c87fc0 SCI: updated comment on kDoSound(12)
svn-id: r49108
2010-05-19 19:41:10 +00:00
Martin Kiewitz
3f10841ae8 SCI: removed cmdStopAllSounds(), can't be right - added FIXME - fixes iceman room 14 music stopping within 1-2 seconds
svn-id: r49101
2010-05-19 14:54:39 +00:00
Martin Kiewitz
9b4f352870 SCI: cleanup soundcode - number renamed to resourceId, prio renamed to priority
svn-id: r49098
2010-05-19 14:19:16 +00:00
Martin Kiewitz
e41874c91d SCI: set signal on fadeOut and also set signal when fade is requested but sound is not playing (& show warning in that case) - fixes iceman hang after fireworks in room 14
svn-id: r49087
2010-05-18 19:59:43 +00:00
Matthew Hoops
3dda73d9a2 Add initial support for KQ6 Mac. Wrapper functions for read/writing to pointers are now used (found in util.*) for code that has different endianness in SCI1.1+ Mac games. Add support for Mac 'snd ' and 'CURS' resources. QFG1 Mac is not yet playable due to script compression.
svn-id: r49070
2010-05-18 04:17:58 +00:00
Martin Kiewitz
a5ed930340 SCI: remove unneeded _mutex lock to fix deadlock issue
svn-id: r49006
2010-05-11 16:15:21 +00:00
Martin Kiewitz
a31de2adfa SCI: set signal to SIGNAL_OFFSET, when a music slot is played that doesn't contain supported data - fixes lsl5 mud wrestling "regression" in new music/sound code (worked before with old music/sound engine)
svn-id: r49000
2010-05-10 20:32:55 +00:00
Martin Kiewitz
b07a88548f SCI: set signal in SCI0/SCI01 games, when samples have been played only. fixes sq3 guys from andromeda, but also doesn't screw up music in sq3new/kq1 - added comments about this issue
svn-id: r48918
2010-05-03 17:54:47 +00:00
Martin Kiewitz
c67344d380 SCI: reverting r48805 - caused regression in sq3new/kq1
svn-id: r48915
2010-05-03 16:47:09 +00:00
Martin Kiewitz
1060b82f18 SCI: copying over compressed audio (mp3/ogg/flac) buffers, because resourcemanager may free the memory at any time - fixes pseudo-random crashes - also added several assert()s after multiple malloc()s
svn-id: r48912
2010-05-03 15:10:25 +00:00
Martin Kiewitz
b4d35b3279 SCI: calculate sampleLen for WAVEs as well
svn-id: r48906
2010-05-03 13:30:09 +00:00
Martin Kiewitz
df679afe19 SCI: calculate sampleLen for compressed audio (mp3/ogg/flac) as well
svn-id: r48903
2010-05-03 11:58:45 +00:00
Martin Kiewitz
e3ac8713e3 SCI: fix bugs in audio decompression (mp3, ogg, flac)
svn-id: r48880
2010-05-01 14:04:48 +00:00
Martin Kiewitz
13ee099090 SCI: audio compression support
svn-id: r48856
2010-04-29 15:54:59 +00:00
Martin Kiewitz
3f601f15bf SCI: changing comment slightly about setting signal selector in stopSound for SCI0
svn-id: r48806
2010-04-26 14:13:38 +00:00
Martin Kiewitz
98ae0f8218 SCI: also set signal selector when stopping sounds for SCI0 as well - fixes sq3 freeing 2 guys from andromeda endless loop
svn-id: r48805
2010-04-26 14:11:30 +00:00
Max Horn
bb26c04053 Fixing some warnings (with gcc 3.3.6)
svn-id: r48694
2010-04-17 23:19:52 +00:00
Max Horn
a1840bd573 AUDIO: Rename Mixer::playInputStream to playStream
svn-id: r48637
2010-04-12 09:14:17 +00:00