1
Audio / Re: Change output audio device
« on: March 30, 2019, 10:22:47 pm »
Thanks for the reply.
I think SFML should give the ability to register a callback function, which triggers everytime the audio devices list is changed. Obviously SFML must give the ability to get the current available audio devices.
Something like this:
Now, you can destroy the previous context and recreate a new one with the supplied audio device, then make the context current.
Is this possible?
Thanks in advance!
I think SFML should give the ability to register a callback function, which triggers everytime the audio devices list is changed. Obviously SFML must give the ability to get the current available audio devices.
Something like this:
Quote
void sf::SetOnAudioDevicesUpdate(std::function<void()> callback);
std::vector<sf::priv::AudioDevice> sf::GetAudioDevices();
int sf::SetAudioDevice(sf::priv::AudioDevice audioDevice);
Now, you can destroy the previous context and recreate a new one with the supplied audio device, then make the context current.
Is this possible?
Thanks in advance!