20 #ifndef SOUND_HANDLER_MKIT_H
21 #define SOUND_HANDLER_MKIT_H
26 #include <boost/thread/mutex.hpp>
27 #include <boost/scoped_ptr.hpp>
29 #include <SoundPlayer.h>
46 boost::scoped_ptr<BSoundPlayer> _soundplayer;
49 static void FillNextBuffer(
void *cookie,
void *buffer,
size_t size,
50 const media_raw_audio_format &format);
61 mutable boost::mutex _mutedMutex;
64 void mix(boost::int16_t* outSamples, boost::int16_t* inSamples,
65 unsigned int nSamples,
float volume);
67 void MixAudio (boost::uint8_t *dst,
const boost::uint8_t *src, boost::uint32_t len,
int volume);
75 virtual int create_sound(std::auto_ptr<SimpleBuffer>
data, std::auto_ptr<media::SoundInfo> sinfo);
80 unsigned int data_bytes,
81 unsigned int sample_count,
100 virtual void set_volume(
int sound_handle,
int volume);
119 virtual void pause();
129 virtual unsigned int tell(
int sound_handle);
136 void fetchSamples(boost::int16_t* to,
unsigned int nSamples);
142 #endif // SOUND_HANDLER_MKIT_H