| Top |
Provides audio playback using the Windows Audio Session API available with Vista and newer.
1 |
gst-launch-1.0 -v audiotestsrc samplesperbuffer=160 ! wasapisink |
Generate 20 ms buffers and render to the default audio device.
1 |
gst-launch-1.0 -v audiotestsrc samplesperbuffer=160 ! wasapisink low-latency=true |
Same as above, but with the minimum possible latency
plugin |
wasapi |
author |
Nirbheek Chauhan <nirbheek@centricular.com> |
class |
Sink/Audio |
struct GstWasapiSink {
GstAudioSink parent;
IMMDevice *device;
IAudioClient *client;
IAudioRenderClient *render_client;
HANDLE event_handle;
HANDLE thread_priority_handle;
/* Actual size of the allocated buffer */
guint buffer_frame_count;
/* The mix format that wasapi prefers in shared mode */
WAVEFORMATEX *mix_format;
/* The probed caps that we can accept */
GstCaps *cached_caps;
/* The channel positions in the data to be written to the device we
* will pass this to GstAudioRingbuffer so it can to it translate
* from the native GStreamer channel layout. */
GstAudioChannelPosition *positions;
/* properties */
gint role;
gint sharemode;
gboolean mute;
gboolean low_latency;
gboolean try_audioclient3;
wchar_t *device_strid;
};
“role” property “role” GstWasapiDeviceRole
Role of the device: communications, multimedia, etc
Flags: Read / Write
Default value: console
“mute” property“mute” gboolean
Mute state of this stream
Flags: Read / Write
Default value: FALSE
“exclusive” property“exclusive” gboolean
Open the device in exclusive mode
Flags: Read / Write
Default value: FALSE
“low-latency” property“low-latency” gboolean
Optimize all settings for lowest latency. Always safe to enable.
Flags: Read / Write
Default value: FALSE
“use-audioclient3” property“use-audioclient3” gboolean
Whether to use the Windows 10 AudioClient3 API when available
Flags: Read / Write
Default value: TRUE