aboutsummaryrefslogtreecommitdiff
path: root/scumm/player_v2.h
diff options
context:
space:
mode:
Diffstat (limited to 'scumm/player_v2.h')
-rw-r--r--scumm/player_v2.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/scumm/player_v2.h b/scumm/player_v2.h
index cb5e72dcc2..00dc43b419 100644
--- a/scumm/player_v2.h
+++ b/scumm/player_v2.h
@@ -26,6 +26,7 @@
#include "common/scummsys.h"
#include "common/system.h"
#include "scumm/music.h"
+#include "sound/audiostream.h"
class SoundMixer;
@@ -72,7 +73,7 @@ struct channel_data {
* This simulates the pc speaker sound, which is driven by the 8253 (square
* wave generator) and a low-band filter.
*/
-class Player_V2 : public MusicEngine {
+class Player_V2 : public AudioStream, public MusicEngine {
public:
Player_V2(ScummEngine *scumm, bool pcjr);
virtual ~Player_V2();
@@ -84,6 +85,16 @@ public:
virtual int getMusicTimer() const;
virtual int getSoundStatus(int sound) const;
+
+ int readBuffer(int16 *buffer, const int numSamples) {
+ do_mix(buffer, numSamples / 2);
+ return numSamples;
+ }
+ bool isStereo() const { return true; }
+ bool endOfData() const { return false; }
+
+ int getRate() const { return _sample_rate; }
+
protected:
bool _isV3Game;
SoundMixer *_mixer;
@@ -143,7 +154,6 @@ protected:
int noiseFeedback, int16 *sample, uint len);
private:
- static void premix_proc(void *param, int16 *buf, uint len);
void do_mix(int16 *buf, uint len);
void set_pcjr(bool pcjr);