aboutsummaryrefslogtreecommitdiff
path: root/sword2/driver/d_sound.cpp
AgeCommit message (Collapse)Author
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
2003-12-17My last commit didn't work on big-endian. Maybe this one does...Torbjörn Andersson
svn-id: r11711
2003-12-17The mixer handles little-endian samples now. Take advantage of that.Torbjörn Andersson
svn-id: r11707
2003-12-02cleanupTorbjörn Andersson
svn-id: r11457
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-11Moved low-level keyboard and mouse handling to a new Input class, andTorbjörn Andersson
renamed the Display class Graphics for no better reason than me liking the phrase "sound and graphics" better than "sound and display". svn-id: r11258
2003-11-08cleanup whitespacesPaweł Kołodziejski
svn-id: r11212
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-28bs2 -> sword2Max Horn
svn-id: r10997
2003-10-15Dumped most of the remaining "driver" code into a new "Display" class. ThisTorbjörn Andersson
touches a lot of the code, of course, and adds yet another global variable (temporarily, I hope), but everything still seems to work. Knock on wood. svn-id: r10806
2003-10-08cleanupTorbjörn Andersson
svn-id: r10681
2003-10-08Some more cosmetic changes while I'm considering the next move. (Or maybeTorbjörn Andersson
I'm just hoping that if I stall long enough, someone else will make the move for me. :-) svn-id: r10676
2003-10-04use namespace Common a bit more; don't zero the RNG in scumm (else the seed ↵Max Horn
gets reset); remove obsolete 256 color blending code svn-id: r10592
2003-10-04Changed to use #include "bs2/..." and removed the inclusion of standard CTorbjörn Andersson
headers. Most (all?) of the ones we need should probably come from stdafx.h instead. svn-id: r10588
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-03fix doxygen commentMax Horn
svn-id: r10570
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-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-27Began unifying the function documentation in driver96.h with the one in theTorbjörn Andersson
individual files, into what I hope are doxygen ones. svn-id: r10431
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-25Reverted part of the previous change. Control panel music should work againTorbjörn Andersson
but the credits music is still broken. I'll have to take a closer look at this later. svn-id: r10407
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-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-17added a static method setDefaultDirectory to class File; used this to ↵Max Horn
simplify some code; added a global g_sound pointer in bs2, this cuts down on uses of g_sword2 (of course both should be removed on the long run); some other minor tweaks/fixes svn-id: r10278
2003-09-16Some cleanup. More to follow, I hope.Torbjörn Andersson
svn-id: r10263
2003-09-13fix speech on BEOliver Kiehl
svn-id: r10229