Gracefully recover from accidental unlpugging / removal of sound cards

Bug #897561 reported by Sean M. Pappalardo
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Mixxx
Confirmed
Medium
Unassigned

Bug Description

Currently, if a sound card is accidentally unplugged while Mixxx is running, the sound stops. That's fine, but when you plug the card back in, you have to go to Sound Hardware, Rescan devices, and Apply in order to get it to play again. This process should be automated so that if an active card goes missing, Mixxx should start scanning the sound devices every half-second or so until the missing device re-appears (or the user opens the sound prefs.) When the device reappears, Mixxx should automatically resume using it without any user interaction.

Tags: portaudio
Revision history for this message
Daniel Schürmann (daschuer) wrote :

The solution for this bug might also be a solution for Bug #799526 "mixxx does not play after resume from standby"

Revision history for this message
Sean M. Pappalardo (pegasus-renegadetech) wrote :

Also, if a card being used for Vinyl Control input goes missing, Mixxx should immediately switch to Const mode.

Revision history for this message
William Good (bkgood) wrote :

The only way to get PortAudio to rescan devices is call Pa_Terminate and Pa_Initialize, which has the side-effect of killing any currently-playing streams. The calls can be stacked (i.e. you can Pa_Initialize Pa_Initialize Pa_Initialize Pa_Terminate Pa_Terminate Pa_Terminate) but the internal structures don't appear to be affected by this. I just hacked SoundManager up a bit to call Pa_Initialize, dump all the device names to the terminal and then call Pa_Terminate on a button press. The playing stream wasn't affected, but the output didn't change when I plugged in a new device. A solution is probably contingent on the PortAudio hotplugging API they're currently working on (see PA ml, trac, etc).

Changed in mixxx:
assignee: nobody → Bill Good (bkgood)
milestone: none → 1.11.0
Revision history for this message
William Good (bkgood) wrote :

Assigning to 1.11 because I'm imagining the hotplugging API will be live in portaudio in the 4-5 months time before 1.11. but I could be totally off.

Revision history for this message
Sean M. Pappalardo (pegasus-renegadetech) wrote :

I was going to say, isn't 1.11 a little too ambitious if we're waiting on upstream? And even if they do it in that timeframe, how long will it take for Linux distros to pick it up? Since PA hasn't done a real release in ages, distro repos are known to let PA stagnate.

Changed in mixxx:
status: Confirmed → Triaged
Revision history for this message
William Good (bkgood) wrote :

I guess I'm not that worried about it, if the PA guys make it, so be it; if not, we have to change the bug milestone. As far as distros go, the Debian/Ubuntu audio packaging group has been happy to package and repository new snapshots of PortAudio as needed.

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

Don't think this is happening in 1.11?

Changed in mixxx:
milestone: 1.11.0 → none
Owen Williams (ywwg)
Changed in mixxx:
importance: Low → Medium
Revision history for this message
Sean M. Pappalardo (pegasus-renegadetech) wrote :
Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

I don't think Bill's working on this anymore :).

Changed in mixxx:
assignee: Bill Good (bkgood) → nobody
tags: added: soundmanager
Changed in mixxx:
status: Triaged → In Progress
tags: added: portaudio
removed: soundmanager
RJ Skerry-Ryan (rryan)
Changed in mixxx:
status: In Progress → Confirmed
Revision history for this message
Swiftb0y (swiftb0y) wrote :

Mixxx now uses GitHub for bug tracking. This bug has been migrated to:
https://github.com/mixxxdj/mixxx/issues/6150

lock status: Metadata changes locked and limited to project staff
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.