[Scummvm-cvs-logs] CVS: residual sound.cpp,1.11,1.12 sound.h,1.8,1.9
Pawel Kolodziejski
aquadran at users.sourceforge.net
Fri Dec 10 17:55:35 CET 2004
Update of /cvsroot/scummvm/residual
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12064
Modified Files:
sound.cpp sound.h
Log Message:
synced mixer with main tree and adapt code
Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/sound.cpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- sound.cpp 10 Dec 2004 07:26:03 -0000 1.11
+++ sound.cpp 10 Dec 2004 21:13:01 -0000 1.12
@@ -270,7 +270,7 @@
void Mixer::start() {
Sound::init();
- g_mixer->setupPremix(mixerCallback, this);
+ g_mixer->setupPremix(this);
g_mixer->setVolume(100);
}
Index: sound.h
===================================================================
RCS file: /cvsroot/scummvm/residual/sound.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- sound.h 10 Dec 2004 07:26:03 -0000 1.8
+++ sound.h 10 Dec 2004 21:13:02 -0000 1.9
@@ -20,6 +20,7 @@
#include "bits.h"
#include "resource.h"
+#include "mixer/audiostream.h"
#include <list>
class Sound : public Resource {
@@ -43,7 +44,7 @@
friend class Mixer;
};
-class Mixer {
+class Mixer : public AudioStream {
public:
static Mixer *instance();
@@ -61,9 +62,17 @@
void getAudio(int16 *data, int numSamples);
+ bool isStereo() const { return true; };
+ bool endOfData() const { return false; }
+ int getRate() const { return 22050; };
+ int readBuffer(int16 *data, const int numSamples) {
+ getAudio(data, numSamples);
+ return numSamples;
+ }
+
private:
Mixer();
- ~Mixer();
+ ~Mixer() { }
static Mixer *_instance;
typedef std::list<ResPtr<Sound> > SoundList;
More information about the Scummvm-git-logs
mailing list