PA/CoreAudio doesn't handle cleanup after errors properly
In a number of places including StartStream and StopStream an ERR_WRAP macro is used to early-out after an error. This results in the remaining objects being left in an unknown state. In StopStream for example, no further cleanup is performed.
Functions that return an error should at least try to leave the stream object in a stable state. ie StopStream should try to close/stop all resources. If StartStream fails half way through it should try to stop the parts that have already been started.
Functions that return an error should at least try to leave the stream object in a stable state. ie StopStream should try to close/stop all resources. If StartStream fails half way through it should try to stop the parts that have already been started.
Leave a comment