ptcollab
ptcollab copied to clipboard
Audio output resets with new project
If I change the audio output to a particular device, then open a new ptcop, the audio output resets to the previous device the program opened with, which is annoying.
I believe this has to do with QAudioOutput's start always choosing the default device unless a device is specifically chosen, and loading a project causes a stop / start at least to change the buffer size. It's a bit annoying to fix unless a full audio output selector is added in though. There's no way to get a QAudioOutput's current device though if it's changed in pavucontrol AFAIK
Potentially possible with QAudioOutput::stateChanged
? Its parameter (QAudio::State
) has StoppedState, which can maybe be used to re-run the audio init logic under the assumption that the default device will be a different one if StoppedState is sent.
Also, maybe not worth pursuing if we want a new audio output system anytime soon
Sure, we might be able to know if the audio was reset, but we still don't know what device it was set to is the trouble I think. Agree about maybe not prioritizing bc ideally would move to diff audio system.
Shouldn't need to know as long as it gets reset. If the device is unavailable, that probably means there is a new default