aboutsummaryrefslogtreecommitdiff
path: root/sword2/driver/d_sound.cpp
AgeCommit message (Collapse)Author
2005-01-10system.h was being included in tons of places, without any good reason; ↵Max Horn
reduced this (total dependencies on system.h went down from 193 to 85 files) svn-id: r16527
2005-01-09Mark some places which probably should use loadWAVFromStream(); maybe some ↵Max Horn
of the engine maintainers can look into using it svn-id: r16503
2005-01-01Updated copyright year.Torbjörn Andersson
svn-id: r16397
2004-12-27Use the mixer to handle sound volumesMax Horn
svn-id: r16349
2004-12-27Use the same volume ranges as most of the rest of ScummVM (i.e. 0-255)Max Horn
svn-id: r16333
2004-12-27Added 'sound types' to the mixer - for now, only plain (for the premixer), ↵Max Horn
SFX and music; volume is now controlled based on the sound type svn-id: r16330
2004-12-11Fix dumb CE compilerNicolas Bacca
svn-id: r16026
2004-11-28Changed parameter order of SoundMixer::playInputStream to match that of playRawMax Horn
svn-id: r15950
2004-11-27AudioStream::read() has been removed quite some time ago, now making sure ↵Max Horn
that change is reflected everywhere svn-id: r15911
2004-10-17Doxygen fixMax Horn
svn-id: r15594
2004-10-12Migration to the newer form of setupPremix().Torbjörn Andersson
svn-id: r15532
2004-10-12CleanupTorbjörn Andersson
svn-id: r15526
2004-09-28Rename remaining OSystem methods to match our coding guidelinesMax Horn
svn-id: r15332
2004-09-04Fix compileTravis Howell
svn-id: r14898
2004-09-04Fixed a glitch in the music fade-out code.Torbjörn Andersson
svn-id: r14888
2004-09-04Added support for compressed music. I'm sure there are some glitches stillTorbjörn Andersson
to fix, but it should work well enough for now. In this rewrite of the music code, I removed the "save/restore music state" function, since it just complicated things for a very small gain. It wasn't in the original engine, and I added it just for the credits, so that the previously playing music could be resumed afterwards. I might re-add it later, but probably not. svn-id: r14887
2004-08-28Cleanup. Removed the original DipMusic() code. If anyone wants toTorbjörn Andersson
implement it - personally I don't see the need - they can get it from CVS. svn-id: r14819
2004-08-27Use the same code for opening the music clusters as for opening the speechTorbjörn Andersson
clusters. (No, that doesn't mean compressed music is support yet. This is just a tiny little step closer.) svn-id: r14794
2004-08-26Explicitly cast value to uint32, since there was a report about compilationTorbjörn Andersson
problems. Perhaps this will fix it? svn-id: r14762
2004-08-25The original speech clusters are now decoded through a custom AudioStreamTorbjörn Andersson
class, so they are handled the same way as the compressed clusters. The next step will be to migrate the music playback to use the same class, which means the fade-in/out logic needs to be separated from the decoding. Once this is done, adding support for compressed music should be a piece of cake. svn-id: r14740
2004-08-23Fixed the bug that caused Vorbis and FLAC to misbehave with compressedTorbjörn Andersson
speech. (Apparently it was just an accident that MP3 worked.) Unfortunately I had to change the file format of the compressed files to include both the compressed and uncompressed size, but since the tool to create these files has only lived as an item in the patch tracker, no one should have exptected it to be the final, working version, right? Right. svn-id: r14698
2004-08-22Experimental (i.e. slightly broken) code for handling compressed speech.Torbjörn Andersson
The equally experimental compression tool is in patch #854561. Support for compressed music will require some restructuring first. svn-id: r14684
2004-07-17Allowing both music streams to share the same rate converter only workedTorbjörn Andersson
by accident, and could cause bad noises during music cross-fades. This wasn't a problem in 0.6.0 since all music is sampled at 22050 Hz, which is the most likely output sample rate for ScummVM, so the converter didn't actually have to do anything. Now, however, the output sample rate could be anything. I've given the music streams one converter each. In BS1, which uses similar music code, it was already necessary to do this since some of its music is sampled at 11025 Hz. svn-id: r14237
2004-06-12CleanupTorbjörn Andersson
svn-id: r13956
2004-05-01Simplified the handling of sound effects. It's not necessary for the driverTorbjörn Andersson
to keep its own copy of the sound data. It could be even further simplified (I don't really see any reason for having two different sound queues), but I seem to have reached a point of stability here and I don't want to jinx it by making further changes yet. svn-id: r13705
2004-04-23Major revamping of the BS2 memory manager and, some small changes to theTorbjörn Andersson
resource manager. All new code! All new bugs! svn-id: r13603
2004-03-13Fixed a slight logic error in the music fading. At this point the codeTorbjörn Andersson
should only check if the music is fading, not in which direction. (Also made a minor cleanup.) svn-id: r13235
2004-02-28renamed more OSystem methods to follow our naming scheme; renamed ↵Max Horn
NewGuiColor to OverlayColor; fixed some calls to error() in the SDL backend svn-id: r13087
2004-02-15Proper handling of BS2 cutscene lead-outs, plus some other minor fixes.Torbjörn Andersson
svn-id: r12907
2004-02-05Removed some of the #includes from sword2.hTorbjörn Andersson
svn-id: r12739
2004-01-29Renamed the 'pan' effect of the mixer to 'balance', since that is what we ↵Max Horn
actually do; applied patch #886786 which corrects a bug in the balance code svn-id: r12665
2004-01-16Made a separate function out of the code that retrieves information aboutTorbjörn Andersson
an in-memory WAV file. At the moment it's only used in one place, which is a bit silly, but I hope to use it for the cutscene player to figure out when to start the lead-out music. (To do that I'll need to know how long the cutscene is, though. I haven't looked into how to find that out yet.) svn-id: r12424
2004-01-14I accidentally introduced a bug when I changed the fading that would causeTorbjörn Andersson
fading-up music to distort and eventually deteriorate into white noise. This was because I allowed _fade to be set on channels that weren't playing and because I only checked _fade for equality when deciding when to stop the fading. It should work much better now, I think. svn-id: r12392
2004-01-14Changed the music fading so that volume is increased when ABS(_fading)Torbjörn Andersson
grows larger, both when fading up or down. This fixes the problem where the volume would "jump" when changing the fading "direction" of a stream. Also changed the logic for deciding which music stream to stop if both streams are playing and a third stream is started. Before it always tried to pick the one that was fading down. Now it will pick the one with the lowest volume, assuming that the more faded a stream is the lower its volume. Together, this should fix some abrupt music changes at the watchman's hut, where it would sometimes start two music streams in rapid succession. svn-id: r12372
2004-01-12Sync the credits so that the text scroll and music will last for about theTorbjörn Andersson
same amount of time. I don't think the original did this, but it turned out to be pretty easy. svn-id: r12334
2004-01-11cleanupTorbjörn Andersson
svn-id: r12322
2004-01-07Valgrind fixes. Mostly about memory not being freed when the engine isTorbjörn Andersson
deleted. svn-id: r12211
2004-01-06It's a new year in BS2 land, too!Torbjörn Andersson
svn-id: r12181
2004-01-03cleanupMax Horn
svn-id: r12116
2004-01-03fix for BE systemsMax Horn
svn-id: r12115
2004-01-03Made the music code more like the one in BS1, i.e. the fade time is longerTorbjörn Andersson
and it now fades both up and down. Plenty of cleanups, simplifications and just moving code around to group it in what I hope is a more logical fashion. Fixed a long-standing bug where spot effects would eventually use up all available sound effect handles. (I may have introduced this when I removed the expiration of sound effects from FxServer().) svn-id: r12108
2004-01-01Oops, that was the wrong data type. (Not that it should matter, but...)Torbjörn Andersson
svn-id: r12069
2003-12-31oops, forgot one caseTorbjörn Andersson
svn-id: r12056
2003-12-31When saving the music state, remember the name of the music file that wasTorbjörn Andersson
open so that it can be re-opened afterwards. It's not so much that it may have changed, but it may have been closed. This should fix a crash when escaping the credits. svn-id: r12055
2003-12-28Hopefully the last big renaming. Now the datatypes have names likeTorbjörn Andersson
"StandardHeader" instead of "_standardHeader". svn-id: r11997
2003-12-24turned PlayingSoundHandle into an 'opaque' (well not really :-) data type, ↵Max Horn
mainly because people kept (accidentally and sometimes on purpose :-) misusing them svn-id: r11881
2003-12-19Fixed bug with looping music. It must have been there all along, but maybeTorbjörn Andersson
the recent mixer changes made it more audible. Or maybe I just didn't listen until now. svn-id: r11763
2003-12-19distinguish between end of stream and end of dataMax Horn
svn-id: r11756
2003-12-19unregister the premix proc when you go awayMax Horn
svn-id: r11755
2003-12-19I am going to remove the default implementation of readBuffer() ↵Max Horn
(AudioInputStream subclasses really really should implement readBuffer() for good performance) svn-id: r11753