DirectSoundSink gstreamer plugin and USB headset BUG?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

DirectSoundSink gstreamer plugin and USB headset BUG?

tanmay.ambre
On Windows XP SP3 machine. Using USB headsets. If the device is unplugged code
gets stuck at
gstdirectsoundsink.c@
gst_directsound_sink_write @
goto calculate_freesize;

The program goes in an infinite loop.

Any attempt to shutdown the pipeline using
gst_element_set_state(pipe,GST_STATE_NULL) is stuck.

How to reproduce:
Prerequisite: Windows XP service pack 3, USB sound output device as primary
device.
1. Create a pipeline playing audio where sink element is directsoundsink.
2. Play the pipeline.
3. Unplug the USB

The pipeline is stuck now.

Anyone encountered this problem and has a solution? It works fine on Windows 7 where the other available output device is automatically used.

I tried to determine at that point in code if the device is still valid but couldn't find the proper function to do this.

Thanks
Tanmay Ambre
Reply | Threaded
Open this post in threaded view
|

Re: DirectSoundSink gstreamer plugin and USB headset BUG?

tanmay.ambre
Further investigating I found that
IDirectSoundBuffer_GetCurrentPosition function does reveal an ERROR

DSERR_NODRIVER.

This error is not dealt with. and the program goes into crazy loop.

Can anyone help me how to deal with this condition?

Tanmay