Max Horn
3aa8454efa
moved the sound ID param in playRaw before volume/pan
...
svn-id: r10023
2003-09-05 22:09:56 +00:00
Torbjörn Andersson
cd9496ab3a
Added FIXME comment about DipMusic().
...
svn-id: r10010
2003-09-05 16:07:03 +00:00
Torbjörn Andersson
7400995094
Cleanup.
...
svn-id: r10009
2003-09-05 15:56:43 +00:00
Torbjörn Andersson
94ec5238c9
This fixes another music-related crash for me. I guess it's our
...
implementation of music fade-out that makes it a bad thing to close the
music cluster file prematurely.
svn-id: r10007
2003-09-05 15:37:51 +00:00
Torbjörn Andersson
bee5a3820a
Removed unused function, StartMusicFadeDown().
...
svn-id: r10004
2003-09-05 12:19:40 +00:00
Torbjörn Andersson
2ecbd4ae88
Cleaned up UpdateCompSampleStreaming() and re-enabled music fading. We
...
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-05 11:12:40 +00:00
Jonathan Gray
bb9a4bbfcc
comment unused label
...
svn-id: r9995
2003-09-05 03:46:30 +00:00
Torbjörn Andersson
9729256b2b
Added locking to the music code. I'm not really the right person to do this
...
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-04 10:58:55 +00:00
Torbjörn Andersson
a1e336c1cb
Added FIXME comment about how we probably need locking for FxServer() and
...
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-03 18:59:02 +00:00
Torbjörn Andersson
ee68d3d198
Removed fxLooped[], fxCached[] and musCounter[]. They were written to, but
...
never read.
svn-id: r9984
2003-09-03 06:27:25 +00:00
Paweł Kołodziejski
3fba3b3d4c
fixed music fading out. it's "goto" hack.
...
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-03 06:03:29 +00:00
Paweł Kołodziejski
1fc3c0be23
more cleanup
...
svn-id: r9982
2003-09-03 05:04:55 +00:00
Paweł Kołodziejski
b62c527fa0
some cleanup code
...
svn-id: r9981
2003-09-03 04:45:57 +00:00
Paweł Kołodziejski
455d3faf2f
fixed interval of fxServer func (why i saw before 1000 miliseconds?), moved init sound data to class sound
...
svn-id: r9980
2003-09-03 03:57:23 +00:00
Torbjörn Andersson
124a84033f
Unless I'm gravely mistaken, StreamCompMusic() should always create a new
...
stream, in which case the warning about the sound handle being 0 is bogus.
svn-id: r9973
2003-09-02 16:20:10 +00:00
Torbjörn Andersson
145f17c4a9
Moved the sound initialisation to the Sword2Sound constructor to avoid
...
warning messages about uninitialised sound handles.
svn-id: r9972
2003-09-02 15:55:55 +00:00
Torbjörn Andersson
907485c1a2
Another untested endian fix.
...
svn-id: r9971
2003-09-02 15:11:19 +00:00
Torbjörn Andersson
730e6b8c38
Use the new per-channel pausing. This allows us to play the music for the
...
in-game dialogs.
svn-id: r9969
2003-09-02 13:50:45 +00:00
Torbjörn Andersson
8c61a29c29
Since soundHandleMusic[] is now an array of sound handles instead of
...
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-02 12:55:20 +00:00
Paweł Kołodziejski
743a3fbdaf
added sound handle stuff to mixer streams
...
svn-id: r9956
2003-09-01 13:43:22 +00:00
Paweł Kołodziejski
56ca9f03df
possibly fixes for not exist id stream channel
...
svn-id: r9951
2003-09-01 06:23:04 +00:00
Paweł Kołodziejski
beb138d4d8
added warkaround for not exist music stream id at appendStream call
...
svn-id: r9950
2003-09-01 06:13:47 +00:00
Paweł Kołodziejski
2533b23a60
added mixer features: volume and pan control per channel
...
svn-id: r9944
2003-08-31 20:26:21 +00:00
Torbjörn Andersson
e60ee06e2d
When a fading music channel is freed to make room for new music, or when a
...
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-31 17:28:36 +00:00
Torbjörn Andersson
3b62d9b4da
No longer assume that all sound effects are 22 kHz. Some are 11 kHz.
...
svn-id: r9939
2003-08-31 10:45:14 +00:00
Torbjörn Andersson
155f4591c9
Cleaned up StreamCompMusic(), including some untested endian-fixes.
...
This should also fix the bug where music sometimes didn't start playing.
svn-id: r9938
2003-08-31 10:38:32 +00:00
Jonathan Gray
4ea7eeb563
fix compilation
...
svn-id: r9934
2003-08-31 00:00:09 +00:00
Torbjörn Andersson
c54baa429b
BS2 crashed because it passed a buffer of uneven length to the mixer. This
...
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-30 22:17:59 +00:00
Paweł Kołodziejski
7b3aae7c03
fixed not cleared sound handle for music
...
svn-id: r9931
2003-08-30 21:09:13 +00:00
Paweł Kołodziejski
b321a7a468
ah
...
svn-id: r9928
2003-08-30 20:27:48 +00:00
Paweł Kołodziejski
c684a076ee
revert id handle stuff
...
svn-id: r9927
2003-08-30 20:25:07 +00:00
Paweł Kołodziejski
a2dad74da1
added sfx support, increased speech support, and music code(streaming works fine but you don't hear anything) newStream, and appendStream doesn't work but playRaw works for music
...
svn-id: r9923
2003-08-30 18:06:08 +00:00
Torbjörn Andersson
aab8d69078
Fixed format string error.
...
svn-id: r9884
2003-08-28 06:13:59 +00:00
Jonathan Gray
8b91af78db
use file class for speech so people with clusters in different directories get to hear sound as well
...
svn-id: r9875
2003-08-27 06:32:42 +00:00
Joost Peters
6969357505
errr. this shouldn't have been committed
...
svn-id: r9872
2003-08-27 00:48:55 +00:00
Joost Peters
3443c5c3d0
Basic speech code, the change in speech.cpp is needed for me, but I am 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-27 00:36:01 +00:00
Jonathan Gray
5d1863070b
return read error in PlayCompSpeech for now so we get subtitles
...
svn-id: r9841
2003-08-24 02:43:44 +00:00
Torbjörn Andersson
a78508af33
On second thought, WAVE_FORMAT_PCM probably means uncompressed WAV-data
...
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-03 15:45:09 +00:00
Jonathan Gray
a932a74dcb
patch #781530 Initial work on StreamCompMusic() by erik
...
svn-id: r9394
2003-08-02 02:31:36 +00:00
Oliver Kiehl
0f85cc3061
rename bs2 to sword2 to have the same name as the original engine.
...
besides this way all our engines start with an "s" ;)
svn-id: r9301
2003-07-30 19:25:31 +00:00
Jonathan Gray
f1a6025aa2
turn d_sound.cpp into class BS2Sound
...
svn-id: r9280
2003-07-29 12:34:46 +00:00
Max Horn
462898465a
StopSpeech -> StopSpeechBS2 (avoid conflict wiht SpeechSynthesis framework on OS X)
...
svn-id: r9248
2003-07-28 14:50:54 +00:00
Jonathan Gray
c1cbd4605e
fix some VC7 warnings
...
svn-id: r9240
2003-07-28 11:21:25 +00:00
Travis Howell
ccc40eecc9
Compiles on mingw now
...
svn-id: r9222
2003-07-28 03:12:49 +00:00
Jonathan Gray
dc6aa9912c
bs2 driver
...
svn-id: r9212
2003-07-28 01:47:41 +00:00