20 #ifndef SOUND_HANDLER_AHI_H
21 #define SOUND_HANDLER_AHI_H
28 #include <proto/dos.h>
29 #include <proto/exec.h>
30 #include <proto/ahi.h>
32 #include <devices/ahi.h>
33 #include <exec/memory.h>
35 #include <sys/types.h>
52 struct MsgPort *_port;
54 struct TimeRequest *_timerio;
55 struct TimerIFace *ITimer;
57 struct AHIIFace *IAHI;
58 struct Library *AHIBase;
59 struct MsgPort *AHImp;
60 struct AHIRequest *AHIio;
62 struct AHIRequest *AHIios[2];
71 struct Process *AudioPump;
75 void TimerReset(uint32 microDelay);
85 struct DeathMessage *_dmsg;
86 struct MsgPort *_DMreplyport;
92 void mix(std::int16_t* outSamples, std::int16_t* inSamples,
93 unsigned int nSamples,
float volume);
95 void MixAudio (std::uint8_t *dst,
const std::uint8_t *src, std::uint32_t len,
int volume);
104 virtual int create_sound(std::unique_ptr<SimpleBuffer>
data, std::unique_ptr<media::SoundInfo> sinfo);
109 unsigned int data_bytes,
110 unsigned int sample_count,
120 virtual void reset();
129 virtual void set_volume(
int sound_handle,
int volume);
136 virtual void pause();
146 virtual unsigned int tell(
int sound_handle);
153 void fetchSamples(std::int16_t* to,
unsigned int nSamples);
163 #endif // SOUND_HANDLER_AHI_H
virtual unsigned int get_duration(int sound_handle)
Definition: sound_handler_ahi.cpp:250
virtual int get_volume(int sound_handle)
Definition: sound_handler_ahi.cpp:228
Definition: klash_part.cpp:331
AOS4_sound_handler(media::MediaHandler *m)
Definition: sound_handler_ahi.cpp:73
virtual void stop_sound(int sound_handle)
Definition: sound_handler_ahi.cpp:205
virtual void stop_all_sounds()
Mixed functions:
Definition: sound_handler_ahi.cpp:220
virtual void delete_sound(int sound_handle)
Discard the sound data for an embedded event sound.
Definition: sound_handler_ahi.cpp:213
Sound mixer.
Definition: sound_handler.h:87
SimpleBuffer data
Definition: LocalConnection_as.cpp:151
Anonymous namespace for callbacks, local functions, event handlers etc.
Definition: dbus_ext.cpp:40
AHI-based sound_handler.
Definition: sound_handler_ahi.h:49
virtual unsigned int tell(int sound_handle)
Definition: sound_handler_ahi.cpp:257
~AOS4_sound_handler()
Definition: sound_handler_ahi.cpp:82
virtual media::SoundInfo * get_sound_info(int soundHandle)
Definition: sound_handler_ahi.cpp:243
virtual void set_volume(int sound_handle, int volume)
Sets the volume for a given event sound.
Definition: sound_handler_ahi.cpp:236
void plugInputStream(std::unique_ptr< InputStream > in)
Plug an InputStream to the mixer.
Definition: sound_handler_ahi.cpp:396
void fetchSamples(std::int16_t *to, unsigned int nSamples)
Fetch mixed samples.
Definition: sound_handler_ahi.cpp:271
virtual void pause()
gnash calls this to pause audio
Definition: sound_handler_ahi.cpp:413
virtual void reset()
Discard all sound inputs (slots and aux streamers) and clear scheduling.
Definition: sound_handler_ahi.cpp:179
int audioTask()
Definition: sound_handler_ahi.cpp:504
virtual int create_sound(std::unique_ptr< SimpleBuffer > data, std::unique_ptr< media::SoundInfo > sinfo)
Definition: sound_handler_ahi.cpp:187
unsigned long StreamBlockId
Identifier of a streaming sound block.
Definition: sound_handler.h:97
virtual StreamBlockId addSoundBlock(unsigned char *data, unsigned int data_bytes, unsigned int sample_count, int streamId)
Definition: sound_handler_ahi.cpp:195
Definition: GnashKey.h:159
virtual void unpause()
gnash calls this to unpause audio
Definition: sound_handler_ahi.cpp:424