if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) {
if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) {
/* We need to fill some data before uncorking. Not doing this will result in the write callback never getting fired. */
/*
result = ma_device_write_to_stream__pulse(pDevice, (ma_pa_stream*)(pDevice->pulse.pStreamPlayback), NULL);
We need to fill some data before uncorking. Not doing this will result in the write callback
if (result != MA_SUCCESS) {
never getting fired. We're not going to abort if writing fails because I still want the device
return result; /* Failed to write data. Not sure what to do here... Just aborting. */
to get uncorked.
}
*/
ma_device_write_to_stream__pulse(pDevice, (ma_pa_stream*)(pDevice->pulse.pStreamPlayback), NULL); /* No need to check the result here. Always want to fall through an uncork.*/
result = ma_device__cork_stream__pulse(pDevice, ma_device_type_playback, 0);
result = ma_device__cork_stream__pulse(pDevice, ma_device_type_playback, 0);