[Scummvm-cvs-logs] CVS: scummvm/sound mixer.cpp,1.173,1.174 mixer.h,1.85,1.86
Max Horn
fingolfin at users.sourceforge.net
Sun Nov 28 15:04:01 CET 2004
Update of /cvsroot/scummvm/scummvm/sound
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20712/sound
Modified Files:
mixer.cpp mixer.h
Log Message:
Changed parameter order of SoundMixer::playInputStream to match that of playRaw
Index: mixer.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sound/mixer.cpp,v
retrieving revision 1.173
retrieving revision 1.174
diff -u -d -r1.173 -r1.174
--- mixer.cpp 28 Nov 2004 22:15:08 -0000 1.173
+++ mixer.cpp 28 Nov 2004 23:02:26 -0000 1.174
@@ -171,7 +171,8 @@
handle->setIndex(index);
}
-void SoundMixer::playRaw(PlayingSoundHandle *handle, void *sound, uint32 size, uint rate, byte flags, int id, byte volume, int8 balance, uint32 loopStart, uint32 loopEnd) {
+void SoundMixer::playRaw(PlayingSoundHandle *handle, void *sound, uint32 size, uint rate, byte flags,
+ int id, byte volume, int8 balance, uint32 loopStart, uint32 loopEnd) {
Common::StackLock lock(_mutex);
// Prevent duplicate sounds
@@ -204,7 +205,8 @@
insertChannel(handle, chan);
}
-void SoundMixer::playInputStream(PlayingSoundHandle *handle, AudioStream *input, bool isMusic, byte volume, int8 balance, int id, bool autofreeStream, bool permanent) {
+void SoundMixer::playInputStream(PlayingSoundHandle *handle, AudioStream *input, bool isMusic,
+ int id, byte volume, int8 balance, bool autofreeStream, bool permanent) {
Common::StackLock lock(_mutex);
if (input == 0) {
@@ -409,6 +411,9 @@
volume = 256;
else if (volume < 0)
volume = 0;
+
+ // TODO: Maybe we should do logarithmic (not linear) volume
+ // scaling? See also Player_V2::setMasterVolume
_globalVolume = volume;
}
Index: mixer.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sound/mixer.h,v
retrieving revision 1.85
retrieving revision 1.86
diff -u -d -r1.85 -r1.86
--- mixer.h 28 Nov 2004 22:15:09 -0000 1.85
+++ mixer.h 28 Nov 2004 23:02:27 -0000 1.86
@@ -126,12 +126,15 @@
* passed on to playInputStream.
*/
void playRaw(PlayingSoundHandle *handle, void *sound, uint32 size, uint rate, byte flags,
- int id = -1, byte volume = 255, int8 balance = 0, uint32 loopStart = 0, uint32 loopEnd = 0);
+ int id = -1, byte volume = 255, int8 balance = 0,
+ uint32 loopStart = 0, uint32 loopEnd = 0);
/**
* Start playing the given audio input stream.
*/
- void playInputStream(PlayingSoundHandle *handle, AudioStream *input, bool isMusic, byte volume = 255, int8 balance = 0, int id = -1, bool autofreeStream = true, bool permanent = false);
+ void playInputStream(PlayingSoundHandle *handle, AudioStream *input, bool isMusic,
+ int id = -1, byte volume = 255, int8 balance = 0,
+ bool autofreeStream = true, bool permanent = false);
More information about the Scummvm-git-logs
mailing list