diff options
author | Strangerke | 2017-02-02 00:49:11 +0100 |
---|---|---|
committer | Strangerke | 2017-02-02 00:49:11 +0100 |
commit | 472f8b2b0056156d135ed53a6978d624ee0ffbc0 (patch) | |
tree | c799b6e844ca1254852cb530b4b91faf6667a29c /engines/cryo | |
parent | c8af2442b61ed564fe5a016c6337308cab436878 (diff) | |
download | scummvm-rg350-472f8b2b0056156d135ed53a6978d624ee0ffbc0.tar.gz scummvm-rg350-472f8b2b0056156d135ed53a6978d624ee0ffbc0.tar.bz2 scummvm-rg350-472f8b2b0056156d135ed53a6978d624ee0ffbc0.zip |
CRYO: Remove SoundGroup (no longer used)
Diffstat (limited to 'engines/cryo')
-rw-r--r-- | engines/cryo/sound.cpp | 78 | ||||
-rw-r--r-- | engines/cryo/sound.h | 19 |
2 files changed, 0 insertions, 97 deletions
diff --git a/engines/cryo/sound.cpp b/engines/cryo/sound.cpp index 48670912e8..68f067588f 100644 --- a/engines/cryo/sound.cpp +++ b/engines/cryo/sound.cpp @@ -110,82 +110,4 @@ void CSoundChannel::applyVolumeChange() { _mixer->setChannelBalance(_soundHandle, balance);
}
-/****************************************************************/
-
-SoundGroup::SoundGroup(int16 numSounds, int16 length, int16 sampleSize, float rate, int16 mode) {
- if (numSounds < kCryoMaxClSounds)
- _numSounds = numSounds;
- else
- error("SoundGroup - numSounds >= kCryoMaxClSounds");
-
- for (int i = 0; i < _numSounds; i++) {
- _sounds[i] = new Sound(length, rate, sampleSize, mode);
- _sounds[i]->_maxLength = length;
- }
- _soundIndex = 0;
- _playIndex = 0;
-}
-
-// Original name: CLSoundGroup_Free
-SoundGroup::~SoundGroup() {
- for (int16 i = 0; i < _numSounds; i++)
- delete(_sounds[i]);
-}
-
-// Original name: CLSoundGroup_GetNextBuffer
-void *SoundGroup::getNextBuffer() {
- Sound *sound = _sounds[_soundIndex];
- return sound->_sndHandle + sound->_headerLen;
-}
-
-// Original name: CLSoundGroup_AssignDatas
-bool SoundGroup::assignDatas(void *buffer, int length, bool isSigned) {
- Sound *sound = _sounds[_soundIndex];
-
- sound->_buffer = (char *)buffer;
- sound->_length = length;
- // if(sound->reversed && sound->sampleSize == 16)
- // ReverseBlock16(buffer, length);
- // if(isSigned)
- // CLSound_Signed2NonSigned(buffer, length);
- if (_soundIndex == _numSounds - 1)
- _soundIndex = 0;
- else
- _soundIndex++;
-
- return true;
-}
-
-// Original name: CLSoundGroup_SetDatas
-bool SoundGroup::setDatas(void *data, int length, bool isSigned) {
- Sound *sound = _sounds[_soundIndex];
- if (length >= sound->_maxLength)
- error("CLSoundGroup_SetDatas - Unexpected length");
-
- void *buffer = sound->_sndHandle + sound->_headerLen;
- sound->_buffer = (char *)buffer;
- memcpy(buffer, data, length);
- sound->_length = length;
- // if(sound->reversed && sound->sampleSize == 16)
- // ReverseBlock16(buffer, length);
- // if(isSigned)
- // CLSound_Signed2NonSigned(buffer, length);
- if (_soundIndex == _numSounds - 1)
- _soundIndex = 0;
- else
- _soundIndex++;
-
- return true;
-}
-
-// Original name: CLSoundGroup_PlayNextSample
-void SoundGroup::playNextSample(SoundChannel *ch) {
- ch->play(_sounds[_playIndex]);
- if (_playIndex == _numSounds - 1)
- _playIndex = 0;
- else
- _playIndex++;
-}
-
-
}
diff --git a/engines/cryo/sound.h b/engines/cryo/sound.h index c6fee3c45f..72232cc4f1 100644 --- a/engines/cryo/sound.h +++ b/engines/cryo/sound.h @@ -67,23 +67,4 @@ public: void setVolumeRight(unsigned int volume);
};
-#define kCryoMaxClSounds 64
-
-class SoundGroup {
-private:
- Sound *_sounds[kCryoMaxClSounds];
- int16 _numSounds;
- int16 _soundIndex;
- int16 _playIndex;
-
-public:
- SoundGroup(int16 numSounds, int16 length, int16 sampleSize, float rate, int16 mode);
- ~SoundGroup();
-
- bool assignDatas(void *buffer, int length, bool isSigned);
- void playNextSample(SoundChannel *ch);
- bool setDatas(void *data, int length, bool isSigned);
- void *getNextBuffer();
-};
-
}
|