Added support for changing the audio playback device during runtime#3029
Conversation
c6b5d20 to
23d83ca
Compare
Pull Request Test Coverage Report for Build 9269750449Details
💛 - Coveralls |
|
Awesome work here Binary! I'm looking forward to testing this in my own project later today, this is the kind of feature with real value to power users. |
vittorioromeo
left a comment
There was a problem hiding this comment.
Thank you a lot for doing this work! I think it's a great improvement from the status quo.
My concern with this design is that we always have one global set-up audio playback device.
A user wouldn't be able to simultaneously send a few sounds to a device and few other sounds to another device, is that correct?
Use cases such as sending voice comms to headphones and game audio to speakers would not be supported if that is the case.
Have you considered a different design that would allow users to set a "default SFML playback device" but then also support the use case I described, where users can play sounds/music on specific audio devices without having to change the global set "playback device"?
23d83ca to
6d1fc67
Compare
|
Updated with suggestions. |
This is a very very advanced topic, one so advanced that not many AAA games even dare to support simultaneously outputting different audio streams to different audio playback devices. While technically possible, this would require an entire redesign of the sfml-audio public API, and that is definitely out of scope for this PR and SFML 3. |
2b42a6e to
9b189b3
Compare
ChrisThrasher
left a comment
There was a problem hiding this comment.
No structural complaints but I have a number of smaller items of feedback
9b189b3 to
186535b
Compare
|
Updated. |
186535b to
8e4fc29
Compare
|
Is it feasible to write tests for any of these new APIs? |
|
Only if they don't have any expectations about what is returned from them... so probably not. |
8e4fc29 to
1c2c4fb
Compare
vittorioromeo
left a comment
There was a problem hiding this comment.
Minor nitpick, LGTM otherwise
1c2c4fb to
e93713c
Compare
|
Updated. |
…g the default audio playback device and changing the audio playback device during runtime.
e93713c to
6b7fa51
Compare
vittorioromeo
left a comment
There was a problem hiding this comment.
LGTM. This is some great work. Still need to test this with Open Hexagon but I think it's worth merging now and fixing any issues that arise later.
Added functions to:
The API mirrors that which is already part of
sf::SoundRecorderfor capture devices, with a few "upgrades" for the quirks that might occur with playback devices (such as duplicate names).Test by plugging in multiple audio devices, running the sound effects example and spamming the F1 key to your heart's content.