PA_INVALID_INDEX, the default value, is unfortunately !0.
Setting the volume before the stream is created will put the ring
buffer in error state. Unfortunately, that's what spice-gtk does.
if (!pulsesrc->mainloop)
goto no_mainloop;
- if (!pulsesrc->source_output_idx)
+ if (pulsesrc->source_output_idx == PA_INVALID_INDEX)
goto no_index;
pa_threaded_mainloop_lock (pulsesrc->mainloop);
if (!pulsesrc->mainloop)
goto no_mainloop;
- if (!pulsesrc->source_output_idx)
+ if (pulsesrc->source_output_idx == PA_INVALID_INDEX)
goto no_index;
pa_threaded_mainloop_lock (pulsesrc->mainloop);
if (!pulsesrc->mainloop)
goto no_mainloop;
- if (!pulsesrc->source_output_idx)
+ if (pulsesrc->source_output_idx == PA_INVALID_INDEX)
goto no_index;
pa_threaded_mainloop_lock (pulsesrc->mainloop);