summaryrefslogtreecommitdiffstats
path: root/audio/out/internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'audio/out/internal.h')
-rw-r--r--audio/out/internal.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/audio/out/internal.h b/audio/out/internal.h
index 7951b38..51429b9 100644
--- a/audio/out/internal.h
+++ b/audio/out/internal.h
@@ -108,6 +108,7 @@ struct mp_pcm_state {
* start
* Optional for both types:
* control
+ * set_pause
* a) ->write is called to queue audio. push.c creates a thread to regularly
* refill audio device buffers with ->write, but all driver functions are
* always called under an exclusive lock.
@@ -115,8 +116,6 @@ struct mp_pcm_state {
* reset
* write
* get_state
- * Optional:
- * set_pause
* b) ->write must be NULL. ->start must be provided, and should make the
* audio API start calling the audio callback. Your audio callback should
* in turn call ao_read_data() to get audio data. Most functions are
@@ -149,6 +148,9 @@ struct ao_driver {
// Stop all audio playback, clear buffers, back to state after init().
// Optional for pull AOs.
void (*reset)(struct ao *ao);
+ // pull based: set pause state. Only called after start() and before reset().
+ // The return value is ignored.
+ // The pausing state is also cleared by reset().
// push based: set pause state. Only called after start() and before reset().
// returns success (this is intended for paused=true; if it
// returns false, playback continues, and the core emulates via
@@ -157,7 +159,7 @@ struct ao_driver {
bool (*set_pause)(struct ao *ao, bool paused);
// pull based: start the audio callback
// push based: start playing queued data
- // AO should call ao_wakeup_playthread() if a period boundary
+ // AO should call ao_wakeup() if a period boundary
// is crossed, or playback stops due to external reasons
// (including underruns or device removal)
// must set mp_pcm_state.playing; unset on error/underrun/end
@@ -229,7 +231,7 @@ bool ao_can_convert_inplace(struct ao_convert_fmt *fmt);
bool ao_need_conversion(struct ao_convert_fmt *fmt);
void ao_convert_inplace(struct ao_convert_fmt *fmt, void **data, int num_samples);
-void ao_wakeup_playthread(struct ao *ao);
+void ao_wakeup(struct ao *ao);
int ao_read_data_converted(struct ao *ao, struct ao_convert_fmt *fmt,
void **data, int samples, int64_t out_time_ns);