Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - FonzTech

Pages: [1]
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:

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!

2
Audio / Change output audio device
« on: March 23, 2019, 03:36:35 pm »
Hi at all! I new on this forum. I have a direct question.
- Why SFML does not support output device switching on the fly? What are the technical reasons behind that?
I know that this implies many other things to consider, like listening for device changes by the OS, which OpenAL doesn't, obviously. Although I don't know much of OpenAL, I think there are some consideration about buffers, which are possibly related to a specific context, linked to an output device? Surely device switching on the fly it's 100% possible in OpenAL.
I think this would be a great function to be present in SFML. People like me, switch from headphones to the monitor audio output. Maybe you connect a third output device while running a SFML application, and restarting it is a very bad thing just to hear audio output.
Thanks in advance!

Pages: [1]
anything