diff options
author | Max Horn | 2003-06-21 23:29:34 +0000 |
---|---|---|
committer | Max Horn | 2003-06-21 23:29:34 +0000 |
commit | bd4370c25166ad0e49c78d9e4407d39358e17b91 (patch) | |
tree | ae1acc56b83cdb642da285be7373ab116f3efd1f /sound/mixer.h | |
parent | 7281ac690732a93e9407f56e61976ea4b7c54fad (diff) | |
download | scummvm-rg350-bd4370c25166ad0e49c78d9e4407d39358e17b91.tar.gz scummvm-rg350-bd4370c25166ad0e49c78d9e4407d39358e17b91.tar.bz2 scummvm-rg350-bd4370c25166ad0e49c78d9e4407d39358e17b91.zip |
lots of mixer cleanup / refactoring / reengineering
svn-id: r8594
Diffstat (limited to 'sound/mixer.h')
-rw-r--r-- | sound/mixer.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sound/mixer.h b/sound/mixer.h index 1abfcc4935..afe6560a73 100644 --- a/sound/mixer.h +++ b/sound/mixer.h @@ -39,9 +39,14 @@ typedef uint32 PlayingSoundHandle; +class Channel; class File; class SoundMixer; +// TODO: class Channel should really be declared non-public, inside mixer.cpp +// However, right now Sound::updateMP3CD directly calls soundFinished. That +// should be changed, by adding proper API abstraction to SoundMixer for +// MP3/Vorbis "CD" playback. class Channel { protected: SoundMixer *_mixer; @@ -86,16 +91,10 @@ public: Channel *_channels[NUM_CHANNELS]; - int _beginSlots; - public: SoundMixer(); ~SoundMixer(); - int insertAt(PlayingSoundHandle *handle, int index, Channel *chan); - void unInsert(Channel *chan); - void beginSlots(int index); - // start playing a raw sound enum { // Do *NOT* change any of these flags without looking at the code in mixer.cpp @@ -107,8 +106,7 @@ public: FLAG_LOOP = 1 << 5 // loop the audio }; int playRaw(PlayingSoundHandle *handle, void *sound, uint32 size, uint rate, byte flags, int id = -1); - int playStream(int index, void *sound, uint32 size, uint rate, - byte flags, int32 timeout = 3, int32 buffer_size = 2000000); + int playStream(void *sound, uint32 size, uint rate, byte flags, int32 buffer_size); #ifdef USE_MAD int playMP3(PlayingSoundHandle *handle, void *sound, uint32 size, byte flags); int playMP3CDTrack(PlayingSoundHandle *handle, File *file, mad_timer_t duration); @@ -150,6 +148,8 @@ public: /** pause - unpause */ void pause(bool paused); +private: + int insertAt(PlayingSoundHandle *handle, int index, Channel *chan); }; #endif |