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
Definition: klash_part.cpp:331
virtual void delete_sound(int sound_handle)
Discard the sound data for an embedded event sound.
Definition: sound_handler_mkit.cpp:182
virtual void set_volume(int sound_handle, int volume)
Sets the volume for a given event sound.
Definition: sound_handler_mkit.cpp:205
virtual void pause()
gnash calls this to pause audio
Definition: sound_handler_mkit.cpp:337
virtual void unmute()
Call this to unmute audio.
Definition: sound_handler_mkit.cpp:323
Sound mixer.
Definition: sound_handler.h:87
SimpleBuffer data
Definition: LocalConnection_as.cpp:153
virtual void unpause()
gnash calls this to unpause audio
Definition: sound_handler_mkit.cpp:347
virtual unsigned int tell(int sound_handle)
Definition: sound_handler_mkit.cpp:226
Mkit_sound_handler(media::MediaHandler *m)
Definition: sound_handler_mkit.cpp:50
Mkit media kit based sound_handler.
Definition: sound_handler_mkit.h:44
void fetchSamples(boost::int16_t *to, unsigned int nSamples)
Fetch mixed samples.
Definition: sound_handler_mkit.cpp:120
virtual void stop_all_sounds()
Mixed functions:
Definition: sound_handler_mkit.cpp:189
virtual void mute()
Call this to mute audio.
Definition: sound_handler_mkit.cpp:316
virtual StreamBlockId addSoundBlock(unsigned char *data, unsigned int data_bytes, unsigned int sample_count, int streamId)
Definition: sound_handler_mkit.cpp:164
unsigned long StreamBlockId
Identifier of a streaming sound block.
Definition: sound_handler.h:97
virtual int get_volume(int sound_handle)
Definition: sound_handler_mkit.cpp:197
virtual void reset()
Discard all sound inputs (slots and aux streamers) and clear scheduling.
Definition: sound_handler_mkit.cpp:148
Definition: GnashKey.h:159
void plugInputStream(std::auto_ptr< InputStream > in)
Plug an InputStream to the mixer.
Definition: sound_handler_mkit.cpp:297
virtual bool is_muted() const
Returns whether or not sound is muted.
Definition: sound_handler_mkit.cpp:330
virtual void stop_sound(int sound_handle)
Definition: sound_handler_mkit.cpp:174
virtual media::SoundInfo * get_sound_info(int soundHandle)
Definition: sound_handler_mkit.cpp:212
virtual unsigned int get_duration(int sound_handle)
Definition: sound_handler_mkit.cpp:219
~Mkit_sound_handler()
Definition: sound_handler_mkit.cpp:79
virtual int create_sound(std::auto_ptr< SimpleBuffer > data, std::auto_ptr< media::SoundInfo > sinfo)
Definition: sound_handler_mkit.cpp:156