[Scummvm-cvs-logs] CVS: scummvm/sound mixer.cpp,1.65,1.66 mixer.h,1.30,1.31
Max Horn
fingolfin at users.sourceforge.net
Sun Jul 6 10:01:05 CEST 2003
Update of /cvsroot/scummvm/scummvm/sound
In directory sc8-pr-cvs1:/tmp/cvs-serv368
Modified Files:
mixer.cpp mixer.h
Log Message:
mix() is really a private method, only to be called by the audio thread; cover setupPremix by the mutex, too (that helps preventing race conditions upon exit)
Index: mixer.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sound/mixer.cpp,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -d -r1.65 -r1.66
--- mixer.cpp 6 Jul 2003 16:52:09 -0000 1.65
+++ mixer.cpp 6 Jul 2003 17:00:09 -0000 1.66
@@ -356,6 +356,7 @@
}
void SoundMixer::setupPremix(void *param, PremixProc *proc) {
+ StackLock lock(_mutex);
_premixParam = param;
_premixProc = proc;
}
Index: mixer.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sound/mixer.h,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- mixer.h 6 Jul 2003 16:52:09 -0000 1.30
+++ mixer.h 6 Jul 2003 17:00:09 -0000 1.31
@@ -51,8 +51,6 @@
};
private:
- static void onGenerateSamples(void *s, byte *samples, int len);
-
OSystem *_syst;
OSystem::MutexRef _mutex;
@@ -95,9 +93,6 @@
/** Premix procedure, useful when using fmopl adlib */
void setupPremix(void * param, PremixProc * proc);
- /** mix */
- void mix(int16 * buf, uint len);
-
/** stop all currently playing sounds */
void stopAll();
@@ -138,6 +133,11 @@
private:
int insertChannel(PlayingSoundHandle *handle, Channel *chan);
+
+ /** mix */
+ void mix(int16 * buf, uint len);
+
+ static void onGenerateSamples(void *s, byte *samples, int len);
};
#endif
More information about the Scummvm-git-logs
mailing list