We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 2730

Summary: Pulseaudio, selecting Audio Device and multiple Audio Devices
Product: SDL Reporter: Dominik Frizel <dominik.frizel>
Component: audioAssignee: Ryan C. Gordon <icculus>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: enhancement    
Priority: P2 CC: dominik.frizel, matt.windsor
Version: 2.0.3Keywords: triage-2.0.4
Hardware: x86_64   
OS: Linux   
Attachments: Patch to allow Pulseaudio device selection
Updated Patch
Static Pulseaudio

Description Dominik Frizel 2014-09-16 17:38:14 UTC
Created attachment 1869 [details]
Patch to allow Pulseaudio device selection

SDL2 does only support the default device for pulseaudio. Device detection does not work and adding an other device than the default, causes the default audio device to be selected.

I created a patch to fix that behaviour (tested on amd64 Mint Linux 17 and Pandaboard/arm with Ubuntu.)
Also it adds device detection and implicitely adds the capability for multiple devices at the same time (did not work because only default device). Only for pulseaudio.
Comment 1 Matt Windsor 2015-02-09 20:56:48 UTC
Would like to second this enhancement request.  Just made a bugzilla account to request addition of multiple device selection for Pulse, ALSA, or both, and saw this has already been requested.

This would be very useful for audio software that needs to target a specific device, eg in radio/music contexts.

~ Matt
Comment 2 Dominik Frizel 2015-02-14 11:47:18 UTC
Created attachment 2033 [details]
Updated Patch

Cleaned up the codestyle and the function-names in this patch.
Comment 3 Ryan C. Gordon 2015-02-19 06:32:16 UTC
Marking a large number of bugs with the "triage-2.0.4" keyword at once. Sorry
if you got a lot of email from this. This is to help me sort through some bugs
in regards to a 2.0.4 release. We may or may not fix this bug for 2.0.4,
though!
Comment 4 Dominik Frizel 2015-02-21 14:05:25 UTC
Created attachment 2038 [details]
Static Pulseaudio

Found out that the old patch breaks the build with static pulseaudio, this is fixed in this update.
Comment 5 Ryan C. Gordon 2015-03-18 14:00:03 UTC
I took this patch and reworked it into https://hg.libsdl.org/SDL/rev/8d26d736af94, thanks!

--ryan.