guint64 expected_position;
gboolean is_first;
gboolean running;
- gboolean opened;
UINT32 buffer_size;
UINT32 loopback_buffer_size;
static void
gst_wasapi2_ring_buffer_init (GstWasapi2RingBuffer * self)
{
- self->opened = FALSE;
-
self->volume = 1.0f;
self->mute = FALSE;
GST_DEBUG_OBJECT (self, "Open");
- if (self->opened) {
+ if (self->client) {
GST_DEBUG_OBJECT (self, "Already opened");
return TRUE;
}
gst_clear_object (&self->client);
gst_clear_object (&self->loopback_client);
- self->opened = FALSE;
-
return TRUE;
}
GST_DEBUG_OBJECT (buf, "Acquire");
- if (!self->opened && !gst_wasapi2_ring_buffer_open_device (buf))
+ if (!self->client && !gst_wasapi2_ring_buffer_open_device (buf))
return FALSE;
if (self->device_class == GST_WASAPI2_CLIENT_DEVICE_CLASS_LOOPBACK_CAPTURE) {
}
}
- if (!self->client) {
- GST_ERROR_OBJECT (self, "No configured client object");
- goto error;
- }
-
if (!gst_wasapi2_client_ensure_activation (self->client)) {
GST_ERROR_OBJECT (self, "Failed to activate audio client");
goto error;