aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2003-12-16 15:34:17 +0000
committerMax Horn2003-12-16 15:34:17 +0000
commitde51f631be939a9da9ef0dd2e5f33fc605bdd01b (patch)
treee261edf3012da48b8cfbd506a39694497cc02dfc
parent0c681181b80d77f11963ec7b5705db6364e403ae (diff)
downloadscummvm-rg350-de51f631be939a9da9ef0dd2e5f33fc605bdd01b.tar.gz
scummvm-rg350-de51f631be939a9da9ef0dd2e5f33fc605bdd01b.tar.bz2
scummvm-rg350-de51f631be939a9da9ef0dd2e5f33fc605bdd01b.zip
cleanup
svn-id: r11686
-rw-r--r--sound/mixer.cpp14
-rw-r--r--sound/mixer.h15
2 files changed, 15 insertions, 14 deletions
diff --git a/sound/mixer.cpp b/sound/mixer.cpp
index 805d16a8a7..4937c91934 100644
--- a/sound/mixer.cpp
+++ b/sound/mixer.cpp
@@ -57,22 +57,24 @@ public:
virtual ~Channel();
void destroy();
virtual void mix(int16 *data, uint len);
- virtual void pause(bool paused) {
+
+ virtual bool isMusicChannel() const = 0;
+
+ void pause(bool paused) {
_paused = paused;
}
- virtual bool isPaused() {
+ bool isPaused() {
return _paused;
}
- virtual void setChannelVolume(const byte volume) {
+ void setChannelVolume(const byte volume) {
_volume = volume;
}
- virtual void setChannelPan(const int8 pan) {
+ void setChannelPan(const int8 pan) {
_pan = pan;
}
- virtual int getVolume() const {
+ int getVolume() const {
return isMusicChannel() ? _mixer->getMusicVolume() : _mixer->getVolume();
}
- virtual bool isMusicChannel() const = 0;
};
class ChannelRaw : public Channel {
diff --git a/sound/mixer.h b/sound/mixer.h
index 4518776799..dcea973826 100644
--- a/sound/mixer.h
+++ b/sound/mixer.h
@@ -50,14 +50,13 @@ public:
};
enum {
- FLAG_UNSIGNED = 1 << 0, // unsigned samples (default: signed)
- FLAG_STEREO = 1 << 1, // sound is in stereo (default: mono)
- FLAG_16BITS = 1 << 2, // sound is 16 bits wide (default: 8bit)
- FLAG_AUTOFREE = 1 << 3, // sound buffer is freed automagically at the end of playing
- FLAG_REVERSE_STEREO = 1 << 4, // reverse the left and right stereo channel
- FLAG_LOOP = 1 << 5, // loop the audio
- FLAG_LITTLE_ENDIAN = 1 << 6 // sample is little endian (default: big endian)
-
+ FLAG_UNSIGNED = 1 << 0, /** unsigned samples (default: signed) */
+ FLAG_16BITS = 1 << 1, /** sound is 16 bits wide (default: 8bit) */
+ FLAG_LITTLE_ENDIAN = 1 << 2, /** sample is little endian (default: big endian) */
+ FLAG_STEREO = 1 << 3, /** sound is in stereo (default: mono) */
+ FLAG_REVERSE_STEREO = 1 << 4, /** reverse the left and right stereo channel */
+ FLAG_AUTOFREE = 1 << 5, /** sound buffer is freed automagically at the end of playing */
+ FLAG_LOOP = 1 << 6 /** loop the audio */
};
private: