aboutsummaryrefslogtreecommitdiff
path: root/saga/sound.h
diff options
context:
space:
mode:
authorAndrew Kurushin2005-07-19 19:05:52 +0000
committerAndrew Kurushin2005-07-19 19:05:52 +0000
commit50c2d8954d229145b508a9e822c6f49b353b9c9f (patch)
tree708bc3ff6b5f11052e96206c32d17fe7155bd350 /saga/sound.h
parent546a9d852b1907dd8e1c9403842a934a98fd9a2d (diff)
downloadscummvm-rg350-50c2d8954d229145b508a9e822c6f49b353b9c9f.tar.gz
scummvm-rg350-50c2d8954d229145b508a9e822c6f49b353b9c9f.tar.bz2
scummvm-rg350-50c2d8954d229145b508a9e822c6f49b353b9c9f.zip
finally Resource manager rewritten:
-adds patch file support -global _vm removed cleanups svn-id: r18560
Diffstat (limited to 'saga/sound.h')
-rw-r--r--saga/sound.h37
1 files changed, 17 insertions, 20 deletions
diff --git a/saga/sound.h b/saga/sound.h
index d14842f1f6..6a95e0535a 100644
--- a/saga/sound.h
+++ b/saga/sound.h
@@ -26,7 +26,6 @@
#ifndef SAGA_SOUND_H_
#define SAGA_SOUND_H_
-#include "saga/rscfile_mod.h"
#include "sound/mixer.h"
namespace Saga {
@@ -35,14 +34,15 @@ enum SOUND_FLAGS {
SOUND_LOOP = 1
};
-struct SOUNDBUFFER {
- uint16 s_freq;
- int s_samplebits;
- int s_stereo;
- int s_signed;
+struct SoundBuffer {
+ uint16 frequency;
+ int sampleBits;
+ bool stereo;
+ bool isSigned;
- byte *s_buf;
- size_t s_buf_len;
+ byte *buffer;
+ size_t size;
+ //big endianess flag!!!
};
class Sound {
@@ -51,22 +51,19 @@ public:
Sound(SagaEngine *vm, Audio::Mixer *mixer, int enabled);
~Sound();
- int playSound(SOUNDBUFFER *buf, int volume, bool loop);
- int pauseSound();
- int resumeSound();
- int stopSound();
+ void playSound(SoundBuffer &buffer, int volume, bool loop);
+ void pauseSound();
+ void resumeSound();
+ void stopSound();
- int playVoice(SOUNDBUFFER *buf);
- int playVoxVoice(SOUNDBUFFER *buf);
- int pauseVoice();
- int resumeVoice();
- int stopVoice();
+ void playVoice(SoundBuffer &buffer);
+ void pauseVoice();
+ void resumeVoice();
+ void stopVoice();
private:
- int playSoundBuffer(Audio::SoundHandle *handle, SOUNDBUFFER *buf, int volume, bool loop, bool forceBigEndian);
-
- int _soundInitialized;
+ void playSoundBuffer(Audio::SoundHandle *handle, SoundBuffer &buffer, int volume, bool loop, bool forceBigEndian);
int _enabled;
SagaEngine *_vm;