SFML community forums

Help => Audio => Topic started by: MangoCats on December 10, 2015, 05:45:52 pm

Title: Continuous audio stream
Post by: MangoCats on December 10, 2015, 05:45:52 pm
Hi,

Are there any examples of a continuous audio stream player?

I see sf::SoundStream::onGetData(): http://www.sfml-dev.org/documentation/2.3.2/classsf_1_1SoundStream.php#a968ec024a6e45490962c8a1121cb7c5f

are there any examples showing this function in use?

Thanks!


Title: Re: Continuous audio stream
Post by: Foaly on December 10, 2015, 06:17:03 pm
Have you taken a look at the VoIP example? It shows a use case of sf::SoundStream.
https://github.com/SFML/SFML/tree/master/examples/voip
Title: Re: Continuous audio stream
Post by: MangoCats on December 10, 2015, 07:08:44 pm
Thanks, that is a nice example.

I don't see anything in there to handle the case where the client is pushing audio data at the server faster than the server is playing it (to prevent lag buildup)... in theory the sample rates are the same, but...  in the other case, the player will stop when it runs out of data, but if the buffer is getting filled too quickly?