diff options
author | Lionel Ulmer | 2002-04-16 18:33:04 +0000 |
---|---|---|
committer | Lionel Ulmer | 2002-04-16 18:33:04 +0000 |
commit | ef5c23c6085a8d8fb7e2bd9f7dad5645d6170c35 (patch) | |
tree | c1e2caf618d4fd80570671a33e80331a9f4f3330 /sound/mixer.h | |
parent | 809e01713767c8ff79f4b01cc53c0921daf2ed7d (diff) | |
download | scummvm-rg350-ef5c23c6085a8d8fb7e2bd9f7dad5645d6170c35.tar.gz scummvm-rg350-ef5c23c6085a8d8fb7e2bd9f7dad5645d6170c35.tar.bz2 scummvm-rg350-ef5c23c6085a8d8fb7e2bd9f7dad5645d6170c35.zip |
Proper commit now for MP3 sound support....
svn-id: r3962
Diffstat (limited to 'sound/mixer.h')
-rw-r--r-- | sound/mixer.h | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/sound/mixer.h b/sound/mixer.h index 9894d20a87..26d19881ca 100644 --- a/sound/mixer.h +++ b/sound/mixer.h @@ -1,6 +1,10 @@ #ifndef _mixer_h_included #define _mixer_h_included +#ifdef COMPRESSED_SOUND_FILE +#include <mad.h> +#endif + typedef uint32 PlayingSoundHandle; class SoundMixer { @@ -30,14 +34,23 @@ private: #ifdef COMPRESSED_SOUND_FILE - class Channel_RAW : public Channel { + class Channel_MP3 : public Channel { SoundMixer *_mixer; + void *_ptr; + struct mad_stream _stream; + struct mad_frame _frame; + struct mad_synth _synth; + uint32 _silence_cut; + uint32 _pos_in_frame; + uint32 _position; + uint32 _size; + byte _flags; public: void mix(int16 *data, uint len); void destroy(); - Channel_MP3(SoundMixer *mixer, void *sound, uint rate); + Channel_MP3(SoundMixer *mixer, void *sound, uint size, byte flags); }; #endif @@ -71,6 +84,9 @@ public: FLAG_FILE = 4, /* sound is a FILE * that's read from */ }; void play_raw(PlayingSoundHandle *handle, void *sound, uint32 size, uint rate, byte flags); +#ifdef COMPRESSED_SOUND_FILE + void play_mp3(PlayingSoundHandle *handle, void *sound, uint32 size, byte flags); +#endif /* Premix procedure, useful when using fmopl adlib */ void setup_premix(void *param, PremixProc *proc); |