aboutsummaryrefslogtreecommitdiff
path: root/sword2/sound.h
AgeCommit message (Collapse)Author
2005-03-12PlayingSoundHandle -> SoundHandle; also, turned the handle activity check ↵Max Horn
into a mixer method svn-id: r17106
2005-02-27Got rid of all the .h files but one in the 'driver' directory. They wereTorbjörn Andersson
either very small or, in the case of driver96.h, a disorganized jumbles. svn-id: r16952
2005-02-21basically the same change as for bs1; don't keep the mutex locked while ↵Robert Göffringmann
loading mp3, ogg or wave data. it blocks the playing thread for too long. Also added index caching for the speech and music clusters to reduce seeks. svn-id: r16849
2005-02-19This is the second part of the BS2 restructuring. There are two newTorbjörn Andersson
classes: Screen and Mouse. Screen handles most of the drawing, except the mouse cursor and in-game menus. The old Graphics class is no more. I've also fixed some "reverse stereo" regressions from the first part of the restructuring. I'm not sure what the next step will be, but hopefully it will be smaller than this one was. svn-id: r16812
2005-02-08Now there are two file handles for the music: one for each CD. This is notTorbjörn Andersson
the same thing as one for each music stream. If both music streams are playing music from the same CD, they will both take turns at using the same file handle. The only case where both file handles are used is when music from one CD is fading in while music from the other CD is fading out. Which of course can only happen if you play the game from hard disk. If the game has to ask for the other CD, it kills the music immediately. The reason for doing this is that there was some concern about whether having two file handles open to the same file was portable or not. I don't think that question was ever fully answered, so I avoid the situation. svn-id: r16753
2005-02-07Fixed crash that would happen if the game tried to play music from CD1 andTorbjörn Andersson
CD2 at the same time. There will eventually be a better fix for this, I hope. svn-id: r16750
2005-01-28Use class Mutex instead of MutexRefMax Horn
svn-id: r16679
2005-01-28Began what I hope is the final major restructuring of the BS2 engine.Torbjörn Andersson
In this first step, I have moved all opcode functions into functions.cpp, instead of having them scattered all over the place. To get things to compile again, I had to rewrite the overly complicated sound effects handling. It's much simpler now. The next step will be to move any non-trivial code out of the opcode functions and into the appropriate object. This, I hope, will make it easier to create well-separated objects, instead of the current mess. I also want to tear down the artificial boundary between the main directory and the "driver" directory. We already have a cross-platform layer; there's no need to have yet another one. (Actually, the rewriting of the sound effects code took one first step in this direction.) At the final stage, I'd like to get rid of the "drivers" directory completely, but I'll probably need some help with that if I want to preserve the CVS history of the code. Things will probably be a bit bumpy along the way, but I seem to have reached a point of relative stability again, which is why I'm commiting this now. svn-id: r16668
2005-01-17Updated copyright header, as discussed on the mailing list.Torbjörn Andersson
svn-id: r16580
2005-01-01Updated copyright year.Torbjörn Andersson
svn-id: r16397
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-01-06It's a new year in BS2 land, too!Torbjörn Andersson
svn-id: r12181
2003-11-03The resource and memory managers are now created dynamically.Torbjörn Andersson
Renamed the resource manager's open/close methods openResource() and closeResource() to avoid confusion. (It was I who originally shortened their names to open() and close(), but I've changed my mind now.) Moved more stuff into Sword2Engine. svn-id: r11088
2003-10-18Moved the opcode functions into the Logic class.Torbjörn Andersson
svn-id: r10885
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-04added namespace Sword2Max Horn
svn-id: r10581
2003-09-20cleanupTorbjörn Andersson
svn-id: r10333
2003-08-01#include cleanup (explicityl specify the location for headers from common/, ↵Max Horn
so that we at some point can get rid of -Icommon; exception is made for stdafx.h, since a) we might want to rename it and b) might want to move it to the top level) svn-id: r9359
2003-07-28bs2Jonathan Gray
svn-id: r9211