aboutsummaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
Diffstat (limited to 'sound')
-rw-r--r--sound/audiocd.h4
-rw-r--r--sound/flac.cpp4
-rw-r--r--sound/mixer.h12
-rw-r--r--sound/mp3.cpp4
-rw-r--r--sound/rate.cpp4
-rw-r--r--sound/rate.h6
-rw-r--r--sound/softsynth/fluidsynth.cpp2
-rw-r--r--sound/softsynth/mt32.cpp2
-rw-r--r--sound/vorbis.cpp4
9 files changed, 25 insertions, 17 deletions
diff --git a/sound/audiocd.h b/sound/audiocd.h
index 9a2ffc4810..33d5848c6b 100644
--- a/sound/audiocd.h
+++ b/sound/audiocd.h
@@ -30,7 +30,7 @@
class DigitalTrackInfo {
public:
virtual bool error() = 0;
- virtual void play(Audio::Mixer *mixer, SoundHandle *handle, int startFrame, int duration) = 0;
+ virtual void play(Audio::Mixer *mixer, Audio::SoundHandle *handle, int startFrame, int duration) = 0;
virtual ~DigitalTrackInfo() { }
};
@@ -62,7 +62,7 @@ private:
private:
/* used for emulated CD music */
struct ExtStatus : Status {
- SoundHandle handle;
+ Audio::SoundHandle handle;
};
ExtStatus _cd;
diff --git a/sound/flac.cpp b/sound/flac.cpp
index d0d6403252..c5840476ed 100644
--- a/sound/flac.cpp
+++ b/sound/flac.cpp
@@ -750,7 +750,7 @@ public:
FlacTrackInfo(File *file);
~FlacTrackInfo();
bool error() { return _file == NULL; }
- void play(Audio::Mixer *mixer, SoundHandle *handle, int startFrame, int duration);
+ void play(Audio::Mixer *mixer, Audio::SoundHandle *handle, int startFrame, int duration);
};
FlacTrackInfo::FlacTrackInfo(File *file) : _file(NULL), _firstStream(NULL)
@@ -764,7 +764,7 @@ FlacTrackInfo::FlacTrackInfo(File *file) : _file(NULL), _firstStream(NULL)
delete tempStream;
}
-void FlacTrackInfo::play(Audio::Mixer *mixer, SoundHandle *handle, int startFrame, int duration) {
+void FlacTrackInfo::play(Audio::Mixer *mixer, Audio::SoundHandle *handle, int startFrame, int duration) {
if (error()) {
debug(1, "FlacTrackInfo::play: invalid state, method should not been called");
}
diff --git a/sound/mixer.h b/sound/mixer.h
index 0293f3c394..c062437a0c 100644
--- a/sound/mixer.h
+++ b/sound/mixer.h
@@ -29,12 +29,14 @@
class AudioStream;
-namespace Audio {
- class Channel;
- class Mixer;
-}
class OSystem;
+
+namespace Audio {
+
+class Channel;
+class Mixer;
+
class SoundHandle {
friend class Audio::Channel;
friend class Audio::Mixer;
@@ -43,8 +45,6 @@ public:
inline SoundHandle() : _val(0xFFFFFFFF) {}
};
-namespace Audio {
-
class Mixer {
public:
enum {
diff --git a/sound/mp3.cpp b/sound/mp3.cpp
index 8638e3265f..0bc670bed3 100644
--- a/sound/mp3.cpp
+++ b/sound/mp3.cpp
@@ -288,7 +288,7 @@ public:
MP3TrackInfo(File *file);
~MP3TrackInfo();
bool error() { return _error_flag; }
- void play(Audio::Mixer *mixer, SoundHandle *handle, int startFrame, int duration);
+ void play(Audio::Mixer *mixer, Audio::SoundHandle *handle, int startFrame, int duration);
};
@@ -363,7 +363,7 @@ error:
delete file;
}
-void MP3TrackInfo::play(Audio::Mixer *mixer, SoundHandle *handle, int startFrame, int duration) {
+void MP3TrackInfo::play(Audio::Mixer *mixer, Audio::SoundHandle *handle, int startFrame, int duration) {
unsigned int offset;
mad_timer_t durationTime;
diff --git a/sound/rate.cpp b/sound/rate.cpp
index 94db083225..4ab935331c 100644
--- a/sound/rate.cpp
+++ b/sound/rate.cpp
@@ -33,6 +33,8 @@
#include "sound/mixer.h"
#include "common/util.h"
+namespace Audio {
+
/**
* The precision of the fractional computations used by the rate converter.
* Normally you should never have to modify this value.
@@ -277,3 +279,5 @@ RateConverter *makeRateConverter(st_rate_t inrate, st_rate_t outrate, bool stere
return new CopyRateConverter<false, false>();
}
}
+
+} // End of namespace Audio
diff --git a/sound/rate.h b/sound/rate.h
index 4797cc61b5..2a4d02b676 100644
--- a/sound/rate.h
+++ b/sound/rate.h
@@ -25,9 +25,11 @@
#include "common/scummsys.h"
#include "base/engine.h"
-//#include "sound/audiostream.h"
class AudioStream;
+
+namespace Audio {
+
typedef int16 st_sample_t;
typedef uint16 st_volume_t;
typedef uint32 st_size_t;
@@ -76,4 +78,6 @@ public:
RateConverter *makeRateConverter(st_rate_t inrate, st_rate_t outrate, bool stereo, bool reverseStereo = false);
+} // End of namespace Audio
+
#endif
diff --git a/sound/softsynth/fluidsynth.cpp b/sound/softsynth/fluidsynth.cpp
index ba45d527ce..13f680e3fd 100644
--- a/sound/softsynth/fluidsynth.cpp
+++ b/sound/softsynth/fluidsynth.cpp
@@ -38,7 +38,7 @@ private:
fluid_synth_t *_synth;
int _soundFont;
int _outputRate;
- SoundHandle _handle;
+ Audio::SoundHandle _handle;
protected:
// Because GCC complains about casting from const to non-const...
diff --git a/sound/softsynth/mt32.cpp b/sound/softsynth/mt32.cpp
index a64bbe3251..c79abd28ba 100644
--- a/sound/softsynth/mt32.cpp
+++ b/sound/softsynth/mt32.cpp
@@ -43,7 +43,7 @@ class MidiChannel_MT32 : public MidiChannel_MPU401 {
class MidiDriver_MT32 : public MidiDriver_Emulated {
private:
- SoundHandle _handle;
+ Audio::SoundHandle _handle;
MidiChannel_MT32 _midiChannels[16];
uint16 _channelMask;
MT32Emu::Synth *_synth;
diff --git a/sound/vorbis.cpp b/sound/vorbis.cpp
index a92867b660..5d510173d1 100644
--- a/sound/vorbis.cpp
+++ b/sound/vorbis.cpp
@@ -52,7 +52,7 @@ public:
~VorbisTrackInfo();
bool openTrack();
bool error() { return _error_flag; }
- void play(Audio::Mixer *mixer, SoundHandle *handle, int startFrame, int duration);
+ void play(Audio::Mixer *mixer, Audio::SoundHandle *handle, int startFrame, int duration);
};
@@ -168,7 +168,7 @@ VorbisTrackInfo::~VorbisTrackInfo() {
#define VORBIS_TREMOR
#endif
-void VorbisTrackInfo::play(Audio::Mixer *mixer, SoundHandle *handle, int startFrame, int duration) {
+void VorbisTrackInfo::play(Audio::Mixer *mixer, Audio::SoundHandle *handle, int startFrame, int duration) {
bool err = openTrack();
assert(!err);