aboutsummaryrefslogtreecommitdiff
path: root/scumm/smush
diff options
context:
space:
mode:
authorMax Horn2005-05-10 23:48:48 +0000
committerMax Horn2005-05-10 23:48:48 +0000
commit1a615346abab8f234c3dbd1c55e78b179bca9d87 (patch)
treef687ac73ffbfa29088a403b6311bb4db13265fde /scumm/smush
parent72f4c03b0b9a6918a359b967ebc400a2701981d9 (diff)
downloadscummvm-rg350-1a615346abab8f234c3dbd1c55e78b179bca9d87.tar.gz
scummvm-rg350-1a615346abab8f234c3dbd1c55e78b179bca9d87.tar.bz2
scummvm-rg350-1a615346abab8f234c3dbd1c55e78b179bca9d87.zip
Moved class SoundMixer to Audio::Mixer (didn't call the namespace 'Sound' because we already have many classes with that name)
svn-id: r18039
Diffstat (limited to 'scumm/smush')
-rw-r--r--scumm/smush/smush_mixer.cpp10
-rw-r--r--scumm/smush/smush_mixer.h4
-rw-r--r--scumm/smush/smush_player.cpp8
3 files changed, 11 insertions, 11 deletions
diff --git a/scumm/smush/smush_mixer.cpp b/scumm/smush/smush_mixer.cpp
index c97d8c23ee..b24761ff72 100644
--- a/scumm/smush/smush_mixer.cpp
+++ b/scumm/smush/smush_mixer.cpp
@@ -33,7 +33,7 @@
namespace Scumm {
-SmushMixer::SmushMixer(SoundMixer *m) :
+SmushMixer::SmushMixer(Audio::Mixer *m) :
_mixer(m),
_soundFrequency(22050) {
for (int32 i = 0; i < NUM_CHANNELS; i++) {
@@ -109,27 +109,27 @@ bool SmushMixer::handleFrame() {
_channels[i].chan->getParameters(rate, stereo, is_16bit, vol, pan);
int32 size = _channels[i].chan->availableSoundData();
- byte flags = stereo ? SoundMixer::FLAG_STEREO : 0;
+ byte flags = stereo ? Audio::Mixer::FLAG_STEREO : 0;
if (is_16bit) {
data = malloc(size * (stereo ? 2 : 1) * 4);
_channels[i].chan->getSoundData((int16 *)data, size);
size *= stereo ? 4 : 2;
- flags |= SoundMixer::FLAG_16BITS;
+ flags |= Audio::Mixer::FLAG_16BITS;
} else {
data = malloc(size * (stereo ? 2 : 1) * 2);
_channels[i].chan->getSoundData((int8 *)data, size);
size *= stereo ? 2 : 1;
- flags |= SoundMixer::FLAG_UNSIGNED;
+ flags |= Audio::Mixer::FLAG_UNSIGNED;
}
if (_mixer->isReady()) {
if (!_channels[i].stream) {
_channels[i].stream = makeAppendableAudioStream(rate, flags, 500000);
- _mixer->playInputStream(SoundMixer::kSFXSoundType, &_channels[i].handle, _channels[i].stream);
+ _mixer->playInputStream(Audio::Mixer::kSFXSoundType, &_channels[i].handle, _channels[i].stream);
}
_mixer->setChannelVolume(_channels[i].handle, vol);
_mixer->setChannelBalance(_channels[i].handle, pan);
diff --git a/scumm/smush/smush_mixer.h b/scumm/smush/smush_mixer.h
index 5e56103190..0f6417f721 100644
--- a/scumm/smush/smush_mixer.h
+++ b/scumm/smush/smush_mixer.h
@@ -35,7 +35,7 @@ class SmushMixer {
};
private:
- SoundMixer *_mixer;
+ Audio::Mixer *_mixer;
struct channels {
int id;
SmushChannel *chan;
@@ -49,7 +49,7 @@ private:
public:
- SmushMixer(SoundMixer *);
+ SmushMixer(Audio::Mixer *);
virtual ~SmushMixer();
SmushChannel *findChannel(int32 track);
void addChannel(SmushChannel *c);
diff --git a/scumm/smush/smush_player.cpp b/scumm/smush/smush_player.cpp
index e49cf081bc..24c11d6bc5 100644
--- a/scumm/smush/smush_player.cpp
+++ b/scumm/smush/smush_player.cpp
@@ -511,8 +511,8 @@ void SmushPlayer::handleIACT(Chunk &b) {
} while (--count);
if (!_IACTstream) {
- _IACTstream = makeAppendableAudioStream(22050, SoundMixer::FLAG_STEREO | SoundMixer::FLAG_16BITS, 400000);
- _vm->_mixer->playInputStream(SoundMixer::kSFXSoundType, &_IACTchannel, _IACTstream);
+ _IACTstream = makeAppendableAudioStream(22050, Audio::Mixer::FLAG_STEREO | Audio::Mixer::FLAG_16BITS, 400000);
+ _vm->_mixer->playInputStream(Audio::Mixer::kSFXSoundType, &_IACTchannel, _IACTstream);
}
_IACTstream->append(output_data, 0x1000);
@@ -1187,7 +1187,7 @@ void SmushPlayer::tryCmpFile(const char *filename) {
if (_compressedFile.isOpen()) {
int size = _compressedFile.size();
_compressedFileMode = true;
- _vm->_mixer->playInputStream(SoundMixer::kSFXSoundType, &_compressedFileSoundHandle, makeMP3Stream(&_compressedFile, size));
+ _vm->_mixer->playInputStream(Audio::Mixer::kSFXSoundType, &_compressedFileSoundHandle, makeMP3Stream(&_compressedFile, size));
return;
}
#endif
@@ -1198,7 +1198,7 @@ void SmushPlayer::tryCmpFile(const char *filename) {
if (_compressedFile.isOpen()) {
int size = _compressedFile.size();
_compressedFileMode = true;
- _vm->_mixer->playInputStream(SoundMixer::kSFXSoundType, &_compressedFileSoundHandle, makeVorbisStream(&_compressedFile, size));
+ _vm->_mixer->playInputStream(Audio::Mixer::kSFXSoundType, &_compressedFileSoundHandle, makeVorbisStream(&_compressedFile, size));
return;
}
#endif