diff options
author | Strangerke | 2017-01-03 16:24:12 -0800 |
---|---|---|
committer | Eugene Sandulenko | 2017-01-25 22:42:20 +0100 |
commit | b669a704e2c4bf13894f2729fbd8c63bdebba082 (patch) | |
tree | 20db4aeb929d6ed50b102939b82ed478e3e79384 /engines/cryo/cryolib.h | |
parent | c667702f2c6f9e4adc301eb0a11f4c3c327076ad (diff) | |
download | scummvm-rg350-b669a704e2c4bf13894f2729fbd8c63bdebba082.tar.gz scummvm-rg350-b669a704e2c4bf13894f2729fbd8c63bdebba082.tar.bz2 scummvm-rg350-b669a704e2c4bf13894f2729fbd8c63bdebba082.zip |
CRYO: rename SoundChannel, get rid of soundraw
Diffstat (limited to 'engines/cryo/cryolib.h')
-rw-r--r-- | engines/cryo/cryolib.h | 50 |
1 files changed, 29 insertions, 21 deletions
diff --git a/engines/cryo/cryolib.h b/engines/cryo/cryolib.h index b6d72e303e..e9e1cd631f 100644 --- a/engines/cryo/cryolib.h +++ b/engines/cryo/cryolib.h @@ -136,30 +136,46 @@ struct hnm_t { }; typedef struct hnm_t hnm_t; -struct sound_t { - char *_sndHandle; - int16 _headerLen; +class sound_t { +private: int32 _headerOffset; int16 _unused0A; - char *_buffer; int _unused16; - int16 _maxLength; - float _rate; - int16 _sampleSize; - int _length; int16 _mode; - volatile int16 _locked; int32 _loopStart; int16 _loopTimes; - bool _reversed; int16 _unused32; int16 _volume; + +public: + sound_t(int16 length, float rate, int16 sampleSize, int16 mode); + ~sound_t(); + + void assignBuffer(void *buffer, int bufferOffs, int length); + void prepareSample(int16 mode); + void setWantsDesigned(int16 designed); + void setLength(int length); + + char *_sndHandle; + char *_buffer; + + float _rate; + + int16 _maxLength; + int16 _headerLen; + int16 _sampleSize; + + int _length; + + bool _reversed; + + volatile int16 _locked; }; #define kCryoMaxChSounds 10 -class soundchannel_t { +class SoundChannel { private: int16 _volumeLeft; int16 _volumeRight; @@ -168,8 +184,8 @@ private: sound_t *_sounds[kCryoMaxChSounds]; public: - soundchannel_t(int arg1); - ~soundchannel_t(); + SoundChannel(int arg1); + ~SoundChannel(); void stop(); void play(sound_t *sound); @@ -179,10 +195,6 @@ public: void setVolumeLeft(int16 volume); }; -sound_t *CLSoundRaw_New(int16 length, float rate, int16 sampleSize, int16 mode); -void CLSoundRaw_Free(sound_t *sound); -void CLSoundRaw_AssignBuffer(sound_t *sound, void *buffer, int bufferOffs, int length); - void SysBeep(int x); int32 TickCount(); void FlushEvents(int16 arg1, int16 arg2); @@ -210,10 +222,6 @@ void CLPalette_BeSystem(); void CLFile_Write(Common::File &handle, void *buffer, int32 *size); -void CLSound_PrepareSample(sound_t *sound, int16 mode); -void CLSound_SetWantsDesigned(int16 designed); -void CLSound_SetLength(sound_t *sound, int length); - void CRYOLib_ManagersInit(); void CRYOLib_ManagersDone(); |