aboutsummaryrefslogtreecommitdiff
path: root/engines/lab/labfun.h
diff options
context:
space:
mode:
authorFilippos Karapetis2015-02-24 23:41:41 +0200
committerEugene Sandulenko2015-12-15 00:05:02 +0100
commit6842ffbe90867deb214f4f9e7f0f75476fbefdf9 (patch)
treef3be9b0dc42f198e8593c1d1531aaffd64ebafb2 /engines/lab/labfun.h
parent22b82d7729a2bd40b981a8faba16eff5c708df21 (diff)
downloadscummvm-rg350-6842ffbe90867deb214f4f9e7f0f75476fbefdf9.tar.gz
scummvm-rg350-6842ffbe90867deb214f4f9e7f0f75476fbefdf9.tar.bz2
scummvm-rg350-6842ffbe90867deb214f4f9e7f0f75476fbefdf9.zip
LAB: Further clean up of the music and sound effect code
Diffstat (limited to 'engines/lab/labfun.h')
-rw-r--r--engines/lab/labfun.h38
1 files changed, 19 insertions, 19 deletions
diff --git a/engines/lab/labfun.h b/engines/lab/labfun.h
index d976feea38..60b313e190 100644
--- a/engines/lab/labfun.h
+++ b/engines/lab/labfun.h
@@ -33,6 +33,12 @@
#include "lab/stddefines.h"
#include "lab/parsetypes.h"
+
+// For the Music class - TODO: Move to another header file
+#include "audio/mixer.h"
+#include "audio/audiostream.h"
+#include "audio/decoders/raw.h"
+
#include "common/file.h"
#include "common/savefile.h"
@@ -58,22 +64,6 @@ struct SaveGameHeader {
};
/*----------------------------*/
-/*------ From Audioi.c -------*/
-/*----------------------------*/
-
-bool initAudio();
-void freeAudio();
-bool musicBufferEmpty();
-void playMusicBlock(void *Ptr, uint32 Size, uint16 BufferNum, uint16 SampleSpeed);
-uint16 getPlayingBufferCount();
-void updateSoundBuffers();
-void flushAudio();
-void playSoundEffect(uint16 SampleSpeed, uint16 Volume, uint32 Length, bool flush, void *Data);
-
-
-
-
-/*----------------------------*/
/*----- From graphics.c ------*/
/*----------------------------*/
@@ -228,18 +218,23 @@ public:
void freeMusic();
void fillUpMusic(bool doit);
void updateMusic();
+ uint16 getPlayingBufferCount();
void checkMusic();
void newCheckMusic();
void closeMusic();
void setMusic(bool on);
- void restartBackMusic();
+ void resumeBackMusic();
void pauseBackMusic();
void changeMusic(const char *newmusic);
void resetMusic();
+
+ void playSoundEffect(uint16 SampleSpeed, uint32 Length, void *Data);
+ void stopSoundEffect();
+ bool isSoundEffectActive() const;
- bool _winmusic, _doNotFileFlushAudio;
- bool _turnMusicOn;
+ bool _winmusic, _doNotFilestopSoundEffect;
bool _musicOn;
+ bool _loopSoundEffect;
private:
void fillbuffer(byte *musicBuffer);
@@ -252,6 +247,11 @@ private:
bool _tMusicOn;
uint32 _tLeftInFile;
uint32 _leftinfile;
+
+ Audio::SoundHandle _musicHandle;
+ Audio::SoundHandle _sfxHandle;
+
+ Audio::QueuingAudioStream *_queuingAudioStream;
};