aboutsummaryrefslogtreecommitdiff
path: root/sword2/driver/d_sound.cpp
AgeCommit message (Collapse)Author
2003-09-05moved the sound ID param in playRaw before volume/panMax Horn
svn-id: r10023
2003-09-05Added FIXME comment about DipMusic().Torbjörn Andersson
svn-id: r10010
2003-09-05Cleanup.Torbjörn Andersson
svn-id: r10009
2003-09-05This fixes another music-related crash for me. I guess it's ourTorbjörn Andersson
implementation of music fade-out that makes it a bad thing to close the music cluster file prematurely. svn-id: r10007
2003-09-05Removed unused function, StartMusicFadeDown().Torbjörn Andersson
svn-id: r10004
2003-09-05Cleaned up UpdateCompSampleStreaming() and re-enabled music fading. WeTorbjörn Andersson
currently don't fade music that ends because we reached the end of the musical cue, though. Only music that ends because it's being replaced by another cue. svn-id: r10003
2003-09-05comment unused labelJonathan Gray
svn-id: r9995
2003-09-04Added locking to the music code. I'm not really the right person to do thisTorbjörn Andersson
but at least it doesn't seem to do any harm. Disabled the sound FX "garbage collection" in FxServer(). I'm not really convinced it's necessary at all, and even if it is, doing it from a separate thread it just begging for trouble. I've modified OpenFx() slightly to deal with this, but I may still have introduced regressions. Temporarily disabled the "goto label1" hack, since it seems to be the main reason for ScummVM crashing if I allow a piece of music to finish on its own (i.e. when not terminating it prematurely by triggering another piece of music). svn-id: r9990
2003-09-03Added FIXME comment about how we probably need locking for FxServer() andTorbjörn Andersson
the functions which access data manipulated by FxServer(). For instance, FxServer() may free bufferFx[i], which sounds potentially unhealthy to me. svn-id: r9989
2003-09-03Removed fxLooped[], fxCached[] and musCounter[]. They were written to, butTorbjörn Andersson
never read. svn-id: r9984
2003-09-03fixed music fading out. it's "goto" hack.Paweł Kołodziejski
originaly dsound has 3 seconds buffer fillled with data enought for fading this hack continue play music for time while fading is going svn-id: r9983
2003-09-03more cleanupPaweł Kołodziejski
svn-id: r9982
2003-09-03some cleanup codePaweł Kołodziejski
svn-id: r9981
2003-09-03fixed interval of fxServer func (why i saw before 1000 miliseconds?), moved ↵Paweł Kołodziejski
init sound data to class sound svn-id: r9980
2003-09-02Unless I'm gravely mistaken, StreamCompMusic() should always create a newTorbjörn Andersson
stream, in which case the warning about the sound handle being 0 is bogus. svn-id: r9973
2003-09-02Moved the sound initialisation to the Sword2Sound constructor to avoidTorbjörn Andersson
warning messages about uninitialised sound handles. svn-id: r9972
2003-09-02Another untested endian fix.Torbjörn Andersson
svn-id: r9971
2003-09-02Use the new per-channel pausing. This allows us to play the music for theTorbjörn Andersson
in-game dialogs. svn-id: r9969
2003-09-02Since soundHandleMusic[] is now an array of sound handles instead ofTorbjörn Andersson
channel indexes, we should use stopHandle() instead of stop() to kill the music channel. Am I the only one who finds the distinction between channel indexes and sound handles confusing at times? :-) svn-id: r9967
2003-09-01added sound handle stuff to mixer streamsPaweł Kołodziejski
svn-id: r9956
2003-09-01possibly fixes for not exist id stream channelPaweł Kołodziejski
svn-id: r9951
2003-09-01added warkaround for not exist music stream id at appendStream callPaweł Kołodziejski
svn-id: r9950
2003-08-31added mixer features: volume and pan control per channelPaweł Kołodziejski
svn-id: r9944
2003-08-31When a fading music channel is freed to make room for new music, or when aTorbjörn Andersson
music channel has faded out, destroy the channel immediately. Don't wait for the mixer to finish it off. This seems to fix a problem where the mixer would eventually run out of slots if you left the Quit dialog showing for too long. Unfortunately I don't know if it fixes the "out of slots" errors I encountered once during normal play. Oh well, time will tell... svn-id: r9942
2003-08-31No longer assume that all sound effects are 22 kHz. Some are 11 kHz.Torbjörn Andersson
svn-id: r9939
2003-08-31Cleaned up StreamCompMusic(), including some untested endian-fixes.Torbjörn Andersson
This should also fix the bug where music sometimes didn't start playing. svn-id: r9938
2003-08-31fix compilationJonathan Gray
svn-id: r9934
2003-08-30BS2 crashed because it passed a buffer of uneven length to the mixer. ThisTorbjörn Andersson
is the only place I can think of where this could have happened, so I've added a paranoid check to ensure the buffer length is even. Let's see how that works out... svn-id: r9933
2003-08-30fixed not cleared sound handle for musicPaweł Kołodziejski
svn-id: r9931
2003-08-30ahPaweł Kołodziejski
svn-id: r9928
2003-08-30revert id handle stuffPaweł Kołodziejski
svn-id: r9927
2003-08-30added sfx support, increased speech support, and music code(streaming works ↵Paweł Kołodziejski
fine but you don't hear anything) newStream, and appendStream doesn't work but playRaw works for music svn-id: r9923
2003-08-28Fixed format string error.Torbjörn Andersson
svn-id: r9884
2003-08-27use file class for speech so people with clusters in different directories ↵Jonathan Gray
get to hear sound as well svn-id: r9875
2003-08-27errr. this shouldn't have been committedJoost Peters
svn-id: r9872
2003-08-27Basic speech code, the change in speech.cpp is needed for me, but I am ↵Joost Peters
afraid it might break "speech.clu opening" for someone else..I'm confused as to how this all works. heh. Anyway, if you hear no voices: this is probably where to look. svn-id: r9871
2003-08-24return read error in PlayCompSpeech for now so we get subtitlesJonathan Gray
svn-id: r9841
2003-08-03On second thought, WAVE_FORMAT_PCM probably means uncompressed WAV-dataTorbjörn Andersson
after all, or at least not ADPCM-compressed. Updated the comments, but I still don't know how to play it. svn-id: r9433
2003-08-02patch #781530 Initial work on StreamCompMusic() by erikJonathan Gray
svn-id: r9394
2003-07-30rename bs2 to sword2 to have the same name as the original engine.Oliver Kiehl
besides this way all our engines start with an "s" ;) svn-id: r9301
2003-07-29turn d_sound.cpp into class BS2SoundJonathan Gray
svn-id: r9280
2003-07-28StopSpeech -> StopSpeechBS2 (avoid conflict wiht SpeechSynthesis framework ↵Max Horn
on OS X) svn-id: r9248
2003-07-28fix some VC7 warningsJonathan Gray
svn-id: r9240
2003-07-28Compiles on mingw nowTravis Howell
svn-id: r9222
2003-07-28bs2 driverJonathan Gray
svn-id: r9212