ptcollab icon indicating copy to clipboard operation
ptcollab copied to clipboard

Audio output resets with new project

Open yuxshao opened this issue 2 years ago • 4 comments

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.

yuxshao avatar Apr 10 '22 22:04 yuxshao

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

yuxshao avatar Jun 22 '22 18:06 yuxshao

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

ewancg avatar Oct 18 '22 19:10 ewancg

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.

yuxshao avatar Oct 19 '22 02:10 yuxshao

Shouldn't need to know as long as it gets reset. If the device is unavailable, that probably means there is a new default

ewancg avatar Oct 19 '22 03:10 ewancg