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

Author Topic: Continuous audio stream  (Read 2956 times)

0 Members and 1 Guest are viewing this topic.

MangoCats

  • Newbie
  • *
  • Posts: 2
    • View Profile
    • Email
Continuous audio stream
« 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!



Foaly

  • Sr. Member
  • ****
  • Posts: 453
    • View Profile
Re: Continuous audio stream
« Reply #1 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

MangoCats

  • Newbie
  • *
  • Posts: 2
    • View Profile
    • Email
Re: Continuous audio stream
« Reply #2 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?

 

anything