diff options
author | Filippos Karapetis | 2015-02-24 19:22:03 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2015-12-15 00:05:02 +0100 |
commit | 22b82d7729a2bd40b981a8faba16eff5c708df21 (patch) | |
tree | dc4e6c8fe8b0a94b7d84cbe907548509bf3a6093 /engines/lab/labfun.h | |
parent | 83e58fe452828f29d59aa1b324d2040b1d6c539b (diff) | |
download | scummvm-rg350-22b82d7729a2bd40b981a8faba16eff5c708df21.tar.gz scummvm-rg350-22b82d7729a2bd40b981a8faba16eff5c708df21.tar.bz2 scummvm-rg350-22b82d7729a2bd40b981a8faba16eff5c708df21.zip |
LAB: Initial music implementation
The whole music code is greatly simplified
Diffstat (limited to 'engines/lab/labfun.h')
-rw-r--r-- | engines/lab/labfun.h | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/engines/lab/labfun.h b/engines/lab/labfun.h index cc77a4c3f2..d976feea38 100644 --- a/engines/lab/labfun.h +++ b/engines/lab/labfun.h @@ -62,17 +62,12 @@ struct SaveGameHeader { /*----------------------------*/ bool initAudio(); - void freeAudio(); - -bool musicBufferEmpty(uint16 i); - +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); @@ -222,9 +217,7 @@ void decrypt(byte *text); /*----- From LabMusic.c -----*/ /*---------------------------*/ -#define MANYBUFFERS 5L #define MAXBUFFERS 5L -#define MINBUFFERS 2L class Music { public: @@ -243,15 +236,13 @@ public: void pauseBackMusic(); void changeMusic(const char *newmusic); void resetMusic(); - void fileCheckMusic(uint32 filelength); bool _winmusic, _doNotFileFlushAudio; bool _turnMusicOn; bool _musicOn; private: - void fillbuffer(uint16 unit); - uint16 getManyBuffersLeft(); + void fillbuffer(byte *musicBuffer); void startMusic(bool startatbegin); Common::File *_file; @@ -259,15 +250,8 @@ private: bool _musicPaused; bool _tMusicOn; - uint32 _tFileLength; uint32 _tLeftInFile; - - uint16 _manyBuffers; - - void *_musicBuffer[MAXBUFFERS]; - uint16 _musicFilledTo, _musicPlaying, _musicOnBuffer; - - uint32 _filelength, _leftinfile; + uint32 _leftinfile; }; |