aboutsummaryrefslogtreecommitdiff
path: root/sword2/driver/d_sound.h
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-01Updated copyright year.Torbjörn Andersson
svn-id: r16397
2004-12-27Use the mixer to handle sound volumesMax Horn
svn-id: r16349
2004-12-27Fix volume regression my previous checkin causedMax Horn
svn-id: r16337
2004-12-27Use the same volume ranges as most of the rest of ScummVM (i.e. 0-255)Max Horn
svn-id: r16333
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-12Migration to the newer form of setupPremix().Torbjörn Andersson
svn-id: r15532
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-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-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-02-15Proper handling of BS2 cutscene lead-outs, plus some other minor fixes.Torbjörn Andersson
svn-id: r12907
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-06It's a new year in BS2 land, too!Torbjörn Andersson
svn-id: r12181
2004-01-03cleanupMax Horn
svn-id: r12116
2004-01-03renamed AudioInputStream -> AudioStreamMax Horn
svn-id: r12110
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
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-19distinguish between end of stream and end of dataMax Horn
svn-id: r11756
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
2003-12-17Made sure that *all* AudioInputStream 'know' their sample rate; removed ↵Max Horn
pointless MusicStream class; removed various specific Channel subclasses and instead generalized the base class some more svn-id: r11699
2003-11-16More cleanup. I've eliminated all the temporary global variables I've addedTorbjörn Andersson
over the past few weeks, except for g_sword2. (Of course, this doesn't necessarily make the code any prettier, but we can work on that later.) svn-id: r11309
2003-11-02fixed warningsPaweł Kołodziejski
svn-id: r11046
2003-11-01Instead of having a function that reverses the panning table, we now have aTorbjörn Andersson
function that creates the panning table. The difference is that you now have to tell whether you want one for normal or reverse stereo, so you are not dependent on the previous state of the table. (I still think it may be possible to get rid of the panning table completely, but that's for later cleanups.) svn-id: r11027
2003-10-29Use the ScummVM config manager instead of a separate BS2-specific configTorbjörn Andersson
file, plus some other cleanup. I don't know how the config manager decides if/when to save the settings to file, but we can worry about that later. svn-id: r11001
2003-10-04Moved some stuff out of driver96.h. Eventually I'd like to get rid of mostTorbjörn Andersson
Moved some stuff out of driver96.h. Eventually I'd like to get rid of this file completely. Or at the very least most of it. svn-id: r10589
2003-10-04removed Sword2 prefixes of most classes (made obsolete by our namespace ↵Max Horn
usage); renamed Sword2State to Sword2Engine svn-id: r10583
2003-10-04added namespace Sword2Max Horn
svn-id: r10581
2003-10-03Some renaming (ironic in the light of Fingolfin's recent namespaceTorbjörn Andersson
suggestion, but I prepared the patch long before reading the mail :-). Also, the remaining parts of the control panel etc. have been moved into a class of their own. This is still work in progress. I'm well aware that some of the classes aren't as well separated as they ought to be, and that using global variables to keep track of the different classes probably isn't pretty. svn-id: r10561
2003-10-02Cleanups, mostly related to sound effects.Torbjörn Andersson
svn-id: r10532
2003-10-01ScummVM naming conventions and cleanup in the Sword2Sound class.Torbjörn Andersson
svn-id: r10514
2003-09-29cleanupTorbjörn Andersson
svn-id: r10486
2003-09-28More cleanup, plus support for cutscene leadout music. For now, we onlyTorbjörn Andersson
play that music for cutscenes that have subtitles. svn-id: r10460
2003-09-27Save enough information about the currently playing music before theTorbjörn Andersson
credits so that it can be properly resumed afterwards. svn-id: r10429
2003-09-26cleanupTorbjörn Andersson
svn-id: r10415
2003-09-26Ok, I'm stupid.Torbjörn Andersson
The initial sample is, indeed, two bytes, just like the rest of them, but it really, really helps if you read it from the correct position in the file. After fixing that, it turned out that my changing of signedness of the sample was also wrong. Funny how those two bugs almost cancelled each other out. Almost. I've made a few other changes as well, but they're just to clean things up a bit. The credits music works for me, and I've played the game up to arriving in Quaramonte, with no obvious music-related problems. svn-id: r10412
2003-09-25Some minor fixes. Unfortunately I've noticed that there is some major soundTorbjörn Andersson
distortion in the credits music, and I haven't yet figured out what's causing this. svn-id: r10406
2003-09-25Rewrote the music code to use a premix function instead of a timer. I'mTorbjörn Andersson
speculating that the timer didn't always fill the buffer quite fast enough and that this is what caused the occasional popping noises. Of course, I may have introduced all kinds of regressions - particularly since I don't have any big-endian computer to test on - but we're all friends here, right? :-) svn-id: r10404
2003-09-23Removed ancient version history. Much of it doesn't apply to us, and wasTorbjörn Andersson
cluttering up the files anyway. (Though I do feel a slight twinge of guilt for removing historical records like this. :-) svn-id: r10384
2003-09-22Cleaned up the sound code enough to add cutscene voice-overs. I haven't hadTorbjörn Andersson
the time to do much testing yet, but it seems to work for me. svn-id: r10361
2003-09-21Some cleanup - lots more needed!Torbjörn Andersson
svn-id: r10348
2003-09-10added refCon parameter to timer classMax Horn
svn-id: r10156
2003-09-05Removed unused function, StartMusicFadeDown().Torbjörn Andersson
svn-id: r10004
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