aboutsummaryrefslogtreecommitdiff
path: root/engines/cryo/sound.cpp
diff options
context:
space:
mode:
authorStrangerke2017-01-03 16:24:12 -0800
committerEugene Sandulenko2017-01-25 22:42:20 +0100
commitb669a704e2c4bf13894f2729fbd8c63bdebba082 (patch)
tree20db4aeb929d6ed50b102939b82ed478e3e79384 /engines/cryo/sound.cpp
parentc667702f2c6f9e4adc301eb0a11f4c3c327076ad (diff)
downloadscummvm-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/sound.cpp')
-rw-r--r--engines/cryo/sound.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/engines/cryo/sound.cpp b/engines/cryo/sound.cpp
index 736ce049dd..597f05e7c8 100644
--- a/engines/cryo/sound.cpp
+++ b/engines/cryo/sound.cpp
@@ -74,10 +74,10 @@ SoundGroup::SoundGroup(CryoEngine *vm, int16 numSounds, int16 length, int16 samp
if (numSounds < kCryoMaxClSounds)
_numSounds = numSounds;
else
- error("CLSoundGroup_New - numSounds >= kCryoMaxClSounds");
+ error("SoundGroup - numSounds >= kCryoMaxClSounds");
for (int i = 0; i < _numSounds; i++) {
- _sounds[i] = CLSoundRaw_New(length, rate, sampleSize, mode);
+ _sounds[i] = new sound_t(length, rate, sampleSize, mode);
_sounds[i]->_maxLength = length;
}
_soundIndex = 0;
@@ -88,7 +88,7 @@ SoundGroup::SoundGroup(CryoEngine *vm, int16 numSounds, int16 length, int16 samp
// Original name: CLSoundGroup_Free
SoundGroup::~SoundGroup() {
for (int16 i = 0; i < _numSounds; i++)
- CLSoundRaw_Free(_sounds[i]);
+ delete(_sounds[i]);
}
// Original name: CLSoundGroup_Reverse16All
@@ -115,7 +115,7 @@ bool SoundGroup::assignDatas(void *buffer, int length, bool isSigned) {
return false;
sound->_buffer = (char *)buffer;
- CLSound_SetLength(sound, length);
+ sound->setLength(length);
sound->_length = length;
// if(sound->reversed && sound->sampleSize == 16)
// ReverseBlock16(buffer, length);
@@ -143,7 +143,7 @@ bool SoundGroup::setDatas(void *data, int length, bool isSigned) {
void *buffer = sound->_sndHandle + sound->_headerLen;
sound->_buffer = (char *)buffer;
memcpy(buffer, data, length);
- CLSound_SetLength(sound, length);
+ sound->setLength(length);
sound->_length = length;
// if(sound->reversed && sound->sampleSize == 16)
// ReverseBlock16(buffer, length);
@@ -158,7 +158,7 @@ bool SoundGroup::setDatas(void *data, int length, bool isSigned) {
}
// Original name: CLSoundGroup_PlayNextSample
-void SoundGroup::playNextSample(soundchannel_t *ch) {
+void SoundGroup::playNextSample(SoundChannel *ch) {
ch->play(_sounds[_playIndex]);
if (_playIndex == _numSounds - 1)
_playIndex = 0;