9 #ifndef C_API_AUDIO_ENGINE_H
10 #define C_API_AUDIO_ENGINE_H
254 typedef void AEStreamHandle;
268 AEStreamHandle* (*make_stream)(
void* kodiBase,
270 unsigned int options);
271 void (*free_stream)(
void* kodiBase, AEStreamHandle* stream);
275 unsigned int (*aestream_get_space)(
void* kodiBase, AEStreamHandle* handle);
276 unsigned int (*aestream_add_data)(
void* kodiBase,
277 AEStreamHandle* handle,
278 uint8_t*
const* data,
283 double centerMixLevel);
284 double (*aestream_get_delay)(
void* kodiBase, AEStreamHandle* handle);
285 bool (*aestream_is_buffering)(
void* kodiBase, AEStreamHandle* handle);
286 double (*aestream_get_cache_time)(
void* kodiBase, AEStreamHandle* handle);
287 double (*aestream_get_cache_total)(
void* kodiBase, AEStreamHandle* handle);
288 void (*aestream_pause)(
void* kodiBase, AEStreamHandle* handle);
289 void (*aestream_resume)(
void* kodiBase, AEStreamHandle* handle);
290 void (*aestream_drain)(
void* kodiBase, AEStreamHandle* handle,
bool wait);
291 bool (*aestream_is_draining)(
void* kodiBase, AEStreamHandle* handle);
292 bool (*aestream_is_drained)(
void* kodiBase, AEStreamHandle* handle);
293 void (*aestream_flush)(
void* kodiBase, AEStreamHandle* handle);
294 float (*aestream_get_volume)(
void* kodiBase, AEStreamHandle* handle);
295 void (*aestream_set_volume)(
void* kodiBase, AEStreamHandle* handle,
float volume);
296 float (*aestream_get_amplification)(
void* kodiBase, AEStreamHandle* handle);
297 void (*aestream_set_amplification)(
void* kodiBase, AEStreamHandle* handle,
float amplify);
298 unsigned int (*aestream_get_frame_size)(
void* kodiBase, AEStreamHandle* handle);
299 unsigned int (*aestream_get_channel_count)(
void* kodiBase, AEStreamHandle* handle);
300 unsigned int (*aestream_get_sample_rate)(
void* kodiBase, AEStreamHandle* handle);
302 double (*aestream_get_resample_ratio)(
void* kodiBase, AEStreamHandle* handle);
303 void (*aestream_set_resample_ratio)(
void* kodiBase, AEStreamHandle* handle,
double ratio);
AudioEngineChannel
Definition: audio_engine.h:70
@ AUDIOENGINE_CH_SL
Side left.
Definition: audio_engine.h:94
@ AUDIOENGINE_CH_NULL
Used inside to indicate the end of a list and not for addon use directly.
Definition: audio_engine.h:72
@ AUDIOENGINE_CH_TC
Top center.
Definition: audio_engine.h:104
@ AUDIOENGINE_CH_FROC
Front right over center.
Definition: audio_engine.h:90
@ AUDIOENGINE_CH_TFL
Top front left.
Definition: audio_engine.h:98
@ AUDIOENGINE_CH_RAW
RAW Audio format.
Definition: audio_engine.h:74
@ AUDIOENGINE_CH_SR
Side right.
Definition: audio_engine.h:96
@ AUDIOENGINE_CH_TFC
Top front center.
Definition: audio_engine.h:102
@ AUDIOENGINE_CH_FR
Front right.
Definition: audio_engine.h:78
@ AUDIOENGINE_CH_BL
Back left.
Definition: audio_engine.h:84
@ AUDIOENGINE_CH_MAX
Maximum possible value, to use e.g. as size inside list.
Definition: audio_engine.h:116
@ AUDIOENGINE_CH_FL
Front left.
Definition: audio_engine.h:76
@ AUDIOENGINE_CH_BR
Back right.
Definition: audio_engine.h:86
@ AUDIOENGINE_CH_BROC
Back right over center.
Definition: audio_engine.h:114
@ AUDIOENGINE_CH_LFE
LFE / Subwoofer.
Definition: audio_engine.h:82
@ AUDIOENGINE_CH_TBL
Top back left.
Definition: audio_engine.h:106
@ AUDIOENGINE_CH_FC
Front center.
Definition: audio_engine.h:80
@ AUDIOENGINE_CH_TBC
Top back center.
Definition: audio_engine.h:110
@ AUDIOENGINE_CH_FLOC
Front left over center.
Definition: audio_engine.h:88
@ AUDIOENGINE_CH_BLOC
Back left over center.
Definition: audio_engine.h:112
@ AUDIOENGINE_CH_TFR
Top front right.
Definition: audio_engine.h:100
@ AUDIOENGINE_CH_BC
Back center.
Definition: audio_engine.h:92
@ AUDIOENGINE_CH_TBR
Top back right.
Definition: audio_engine.h:108
AudioEngineStreamOptions
Definition: audio_engine.h:42
@ AUDIO_STREAM_FORCE_RESAMPLE
force resample even if rates match
Definition: audio_engine.h:44
@ AUDIO_STREAM_AUTOSTART
autostart the stream when enough data is buffered
Definition: audio_engine.h:48
@ AUDIO_STREAM_PAUSED
create the stream paused
Definition: audio_engine.h:46
Internal API structure which are used for data exchange between Kodi and addon.
Definition: audio_engine.h:230
unsigned int m_sampleRate
Definition: audio_engine.h:235
enum AudioEngineChannel m_channels[AUDIOENGINE_CH_MAX]
Definition: audio_engine.h:244
unsigned int m_frames
Definition: audio_engine.h:247
unsigned int m_encodedRate
Definition: audio_engine.h:238
enum AudioEngineDataFormat m_dataFormat
Definition: audio_engine.h:232
unsigned int m_frameSize
Definition: audio_engine.h:250
unsigned int m_channelCount
Definition: audio_engine.h:241
Definition: audio_engine.h:267