diff options
-rw-r--r-- | scumm/imuse_digi.cpp | 2 | ||||
-rw-r--r-- | scumm/sound.cpp | 2 | ||||
-rw-r--r-- | sound/voc.cpp | 16 | ||||
-rw-r--r-- | sound/voc.h | 5 |
4 files changed, 13 insertions, 12 deletions
diff --git a/scumm/imuse_digi.cpp b/scumm/imuse_digi.cpp index a56fd3628c..35863b03f8 100644 --- a/scumm/imuse_digi.cpp +++ b/scumm/imuse_digi.cpp @@ -836,7 +836,7 @@ void IMuseDigital::startSound(int sound) { _voiceVocData = NULL; } else if (READ_UINT32(ptr) == MKID('Crea')) { int32 loops = 0; - byte *t_ptr= readCreativeVoc(ptr, size, _channel[l].freq, loops); + byte *t_ptr= readVOCFromMemory(ptr, size, _channel[l].freq, loops); _channel[l].mixerSize = _channel[l].freq * 2; _channel[l].size = size * 2; _channel[l].bits = 8; diff --git a/scumm/sound.cpp b/scumm/sound.cpp index 95532761e6..13fa9cb31f 100644 --- a/scumm/sound.cpp +++ b/scumm/sound.cpp @@ -812,7 +812,7 @@ void Sound::startSfxSound(File *file, int file_size, PlayingSoundHandle *handle, int32 size; int rate; - byte *data = loadVocSample(_sfxFile, size, rate); + byte *data = loadVOCFile(_sfxFile, size, rate); if (_scumm->_imuseDigital) { _scumm->_imuseDigital->setVocVoice(data, size, rate); diff --git a/sound/voc.cpp b/sound/voc.cpp index b0429ce2ac..b5ace31c02 100644 --- a/sound/voc.cpp +++ b/sound/voc.cpp @@ -26,7 +26,7 @@ #include "sound/voc.h" -byte *readCreativeVoc(byte *ptr, int32 &size, int &rate, int32 &loops) { +byte *readVOCFromMemory(byte *ptr, int32 &size, int &rate, int32 &loops) { assert(strncmp((char *)ptr, "Creative Voice File\x1A", 20) == 0); int32 offset = READ_LE_UINT16(ptr + 20); @@ -88,11 +88,11 @@ enum { SOUND_HEADER_BIG_SIZE = 26 + 8 }; -// FIXME/TODO: loadVocSample() essentially duplicates all the code from +// FIXME/TODO: loadVOCFile() essentially duplicates all the code from // readCreativeVoc(). Obviously this is bad, it should rather use that function // (after some tweaks to readCreativeVoc, to deal with the alternate VTLK // header). -byte *loadVocSample(File *file, int32 &size, int &rate) { +byte *loadVOCFile(File *file, int32 &size, int &rate) { char ident[8]; if (file->read(ident, 8) != 8) @@ -104,7 +104,7 @@ byte *loadVocSample(File *file, int32 &size, int &rate) { file->seek(SOUND_HEADER_SIZE - 8, SEEK_CUR); } else { invalid:; - warning("loadVocSample: invalid header"); + warning("loadVOCFile: invalid header"); return NULL; } @@ -112,7 +112,7 @@ byte *loadVocSample(File *file, int32 &size, int &rate) { file->read(&voc_block_hdr, sizeof(voc_block_hdr)); if (voc_block_hdr.blocktype != 1) { - warning("loadVocSample: Expecting block_type == 1, got %d", voc_block_hdr.blocktype); + warning("loadVOCFile: Expecting block_type == 1, got %d", voc_block_hdr.blocktype); return NULL; } @@ -121,18 +121,18 @@ byte *loadVocSample(File *file, int32 &size, int &rate) { int comp = voc_block_hdr.pack; if (comp != 0) { - warning("loadVocSample: Unsupported compression type %d", comp); + warning("loadVOCFile: Unsupported compression type %d", comp); return NULL; } byte *data = (byte *)malloc(size); if (data == NULL) { - error("loadVocSample: out of memory"); + error("loadVOCFile: out of memory"); } if ((int)file->read(data, size) != size) { /* no need to free the memory since error will shut down */ - error("startSfxSound: cannot read %d bytes", size); + error("loadVOCFile: cannot read %d bytes", size); } return data; diff --git a/sound/voc.h b/sound/voc.h index 0dbbba524b..4eb44006b0 100644 --- a/sound/voc.h +++ b/sound/voc.h @@ -55,7 +55,8 @@ struct VocBlockHeader { * return the corresponding sample frequency. */ extern int getSampleRateFromVOCRate(int vocSR); -extern byte *readCreativeVoc(byte *ptr, int32 &size, int &rate, int32 &loops); -extern byte *loadVocSample(File *file, int32 &size, int &rate); + +extern byte *readVOCFromMemory(byte *ptr, int &size, int &rate, int &loops); +extern byte *loadVOCFile(File *file, int &size, int &rate); #endif |