aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorMax Horn2005-05-11 00:01:44 +0000
committerMax Horn2005-05-11 00:01:44 +0000
commit2de46dc8eb173ca06a107d5353f2209944284115 (patch)
tree2119f03a2883659d2b5fbbc70db31273271370e0 /scumm
parent1a615346abab8f234c3dbd1c55e78b179bca9d87 (diff)
downloadscummvm-rg350-2de46dc8eb173ca06a107d5353f2209944284115.tar.gz
scummvm-rg350-2de46dc8eb173ca06a107d5353f2209944284115.tar.bz2
scummvm-rg350-2de46dc8eb173ca06a107d5353f2209944284115.zip
Moved some more stuff to namespace Audio (enough for tonight)
svn-id: r18040
Diffstat (limited to 'scumm')
-rw-r--r--scumm/imuse_digi/dimuse.h2
-rw-r--r--scumm/player_mod.cpp8
-rw-r--r--scumm/player_mod.h6
-rw-r--r--scumm/smush/smush_mixer.h2
-rw-r--r--scumm/smush/smush_player.h4
-rw-r--r--scumm/sound.cpp2
-rw-r--r--scumm/sound.h6
7 files changed, 16 insertions, 14 deletions
diff --git a/scumm/imuse_digi/dimuse.h b/scumm/imuse_digi/dimuse.h
index 0911445b6e..b03600e41a 100644
--- a/scumm/imuse_digi/dimuse.h
+++ b/scumm/imuse_digi/dimuse.h
@@ -77,7 +77,7 @@ private:
int32 mixerFlags;
ImuseDigiSndMgr::soundStruct *soundHandle;
- SoundHandle handle;
+ Audio::SoundHandle handle;
AppendableAudioStream *stream;
AudioStream *stream2;
diff --git a/scumm/player_mod.cpp b/scumm/player_mod.cpp
index 1649d98c3c..80d747ff62 100644
--- a/scumm/player_mod.cpp
+++ b/scumm/player_mod.cpp
@@ -92,7 +92,7 @@ void Player_MOD::startChannel(int id, void *data, int size, int rate, uint8 vol,
_channels[i].pan = pan;
_channels[i].freq = rate;
_channels[i].input = makeLinearInputStream(rate, Audio::Mixer::FLAG_AUTOFREE | (loopStart != loopEnd ? Audio::Mixer::FLAG_LOOP : 0), (const byte*)data, size, loopStart, loopEnd - loopStart);
- _channels[i].converter = makeRateConverter(rate, _mixer->getOutputRate(), false, false);
+ _channels[i].converter = Audio::makeRateConverter(rate, _mixer->getOutputRate(), false, false);
}
void Player_MOD::stopChannel(int id) {
@@ -139,7 +139,7 @@ void Player_MOD::setChannelFreq(int id, int freq) {
if (_channels[i].id == id) {
_channels[i].freq = freq;
delete _channels[i].converter;
- _channels[i].converter = makeRateConverter(freq, _mixer->getOutputRate(), false, false);
+ _channels[i].converter = Audio::makeRateConverter(freq, _mixer->getOutputRate(), false, false);
break;
}
}
@@ -169,8 +169,8 @@ void Player_MOD::do_mix(int16 *data, uint len) {
}
for (i = 0; i < MOD_MAXCHANS; i++)
if (_channels[i].id) {
- st_volume_t vol_l = (127 - _channels[i].pan) * _channels[i].vol / 127;
- st_volume_t vol_r = (127 + _channels[i].pan) * _channels[i].vol / 127;
+ Audio::st_volume_t vol_l = (127 - _channels[i].pan) * _channels[i].vol / 127;
+ Audio::st_volume_t vol_r = (127 + _channels[i].pan) * _channels[i].vol / 127;
_channels[i].converter->flow(*_channels[i].input, &data[dpos*2], dlen, vol_l, vol_r);
}
dpos += dlen;
diff --git a/scumm/player_mod.h b/scumm/player_mod.h
index e211aa1cf4..883b43b2d7 100644
--- a/scumm/player_mod.h
+++ b/scumm/player_mod.h
@@ -26,7 +26,9 @@
#include "scumm/scumm.h"
#include "sound/audiostream.h"
-class RateConverter;
+namespace Audio {
+ class RateConverter;
+}
namespace Scumm {
@@ -69,7 +71,7 @@ private:
uint8 vol;
int8 pan;
uint16 freq;
- RateConverter *converter;
+ Audio::RateConverter *converter;
AudioStream *input;
};
diff --git a/scumm/smush/smush_mixer.h b/scumm/smush/smush_mixer.h
index 0f6417f721..cff529b5c6 100644
--- a/scumm/smush/smush_mixer.h
+++ b/scumm/smush/smush_mixer.h
@@ -39,7 +39,7 @@ private:
struct channels {
int id;
SmushChannel *chan;
- SoundHandle handle;
+ Audio::SoundHandle handle;
AppendableAudioStream *stream;
} _channels[NUM_CHANNELS];
diff --git a/scumm/smush/smush_player.h b/scumm/smush/smush_player.h
index dc57258dbf..7b6b4ded18 100644
--- a/scumm/smush/smush_player.h
+++ b/scumm/smush/smush_player.h
@@ -56,10 +56,10 @@ private:
bool _skips[37];
int32 _frame;
- SoundHandle _IACTchannel;
+ Audio::SoundHandle _IACTchannel;
AppendableAudioStream *_IACTstream;
- SoundHandle _compressedFileSoundHandle;
+ Audio::SoundHandle _compressedFileSoundHandle;
bool _compressedFileMode;
Common::File _compressedFile;
byte _IACToutput[4096];
diff --git a/scumm/sound.cpp b/scumm/sound.cpp
index f0380b5bd6..1c94cbe2ce 100644
--- a/scumm/sound.cpp
+++ b/scumm/sound.cpp
@@ -668,7 +668,7 @@ void Sound::startHETalkSound(uint32 offset) {
addSoundToQueue2(1, 0, channel, 0);
}
-void Sound::startTalkSound(uint32 offset, uint32 b, int mode, SoundHandle *handle) {
+void Sound::startTalkSound(uint32 offset, uint32 b, int mode, Audio::SoundHandle *handle) {
int num = 0, i;
int size = 0;
int id = -1;
diff --git a/scumm/sound.h b/scumm/sound.h
index a792629e99..c07e9ee990 100644
--- a/scumm/sound.h
+++ b/scumm/sound.h
@@ -95,8 +95,8 @@ protected:
int16 _heMusicTracks;
public:
- SoundHandle _talkChannelHandle; // Handle of mixer channel actor is talking on
- SoundHandle _heSoundChannels[8];
+ Audio::SoundHandle _talkChannelHandle; // Handle of mixer channel actor is talking on
+ Audio::SoundHandle _heSoundChannels[8];
bool _soundsPaused;
byte _sfxMode;
@@ -110,7 +110,7 @@ public:
void setOverrideFreq(int freq);
void playSound(int soundID, int heOffset, int heChannel, int heFlags);
void startHETalkSound(uint32 offset);
- void startTalkSound(uint32 offset, uint32 b, int mode, SoundHandle *handle = NULL);
+ void startTalkSound(uint32 offset, uint32 b, int mode, Audio::SoundHandle *handle = NULL);
void stopTalkSound();
bool isMouthSyncOff(uint pos);
int getSoundElapsedTime(int sound) const;