/**< Stops the existing stream (optional, may be NULL).
* \note A stream must have been started when called.
*/
- int (*time_get)(audio_output_t *, mtime_t *write_pts);
- /**< Estimates the date/time of the playback buffer write offset
- * (optional, may be NULL). The read offset is not returned since it is
- * always implicitly equal to the current time (mdate()).
- * \param write_pts timestamp of the write offset [OUT]
+ int (*time_get)(audio_output_t *, mtime_t *delay);
+ /**< Estimates playback buffer latency (optional, may be NULL).
+ * \param delay pointer to the delay until the next sample to be written
+ * to the playback buffer is rendered [OUT]
* \return 0 on success, non-zero on failure or lack of data
* \note A stream must have been started when called.
*/
* \param mute true to mute, false to unmute
* \warning A stream may or may not have been started when called.
*/
+ int (*device_enum)(audio_output_t *, char ***ids, char ***names);
+ /**< Enumerates available audio output devices (optional, may be NULL).
+ * \param ids pointer to a heap-allocated table of heap-allocated
+ * nul-terminated device unique identifiers [OUT]
+ * \param names pointer to a heap-allocated table of heap-allocated
+ * nul-terminated device human-readable names [OUT]
+ * \return The number of entries, or -1 on error.
+ * \warning A stream may or may not have been started when called.
+ */
+ int (*device_select)(audio_output_t *, const char *id);
+ /**< Selects an audio output device (optional, may be NULL).
+ * \param id nul-terminated device unique identifier.
+ * \return 0 on success, non-zero on failure.
+ * \warning A stream may or may not have been started when called.
+ */
struct {
void (*volume_report)(audio_output_t *, float);
void (*mute_report)(audio_output_t *, bool);
void (*policy_report)(audio_output_t *, bool);
+ void (*device_report)(audio_output_t *, const char *);
int (*gain_request)(audio_output_t *, float);
} event;
};
aout->event.policy_report(aout, cork);
}
+/**
+ * Report change of output device.
+ */
+static inline void aout_DeviceReport(audio_output_t *aout, const char *id)
+{
+ aout->event.device_report(aout, id);
+}
+
/**
* Request a change of software audio amplification.
* \param gain linear amplitude gain (must be positive)
VLC_DEPRECATED int aout_PacketTimeGet(audio_output_t *, mtime_t *);
VLC_DEPRECATED void aout_PacketPlay(audio_output_t *, block_t *);
-VLC_DEPRECATED void aout_PacketPause(audio_output_t *, bool, mtime_t);
VLC_DEPRECATED void aout_PacketFlush(audio_output_t *, bool);
VLC_DEPRECATED block_t *aout_PacketNext(audio_output_t *, mtime_t) VLC_USED;