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

Author Topic: How sf::Music internally works  (Read 3676 times)

0 Members and 1 Guest are viewing this topic.

Gregory

  • Newbie
  • *
  • Posts: 41
    • View Profile
How sf::Music internally works
« on: October 10, 2013, 09:39:59 pm »
Hello guys. How the sf::Music internally works? It uses a double buffer? Whilte playing one it push the data to the other and swap than each x samples?

I wanna make a "audio editing" software that you can put effects in real time, so my idea is to apply the effects over the standby buffer so when it get swaped it will player with affects already applyed. After each swap I go and apply the effect again over the standby buffer.

SFML have some way to make this work? maybe I can make it directly using openAL?

thanks

binary1248

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1405
  • I am awesome.
    • View Profile
    • The server that really shouldn't be running
Re: How sf::Music internally works
« Reply #1 on: October 10, 2013, 10:10:17 pm »
https://github.com/SFML/SFML
Browse the code. It is faster and more explanatory than any text that would get written here.
SFGUI # SFNUL # GLS # Wyrm <- Why do I waste my time on such a useless project? Because I am awesome (first meaning).

Gregory

  • Newbie
  • *
  • Posts: 41
    • View Profile
Re: How sf::Music internally works
« Reply #2 on: October 11, 2013, 04:33:38 am »
I will give a look. Someone knows the size of the buffer chunks? My current ideia is use a custom soundStream that apply the effects at each chunk update.

zsbzsb

  • Hero Member
  • *****
  • Posts: 1409
  • Active Maintainer of CSFML/SFML.NET
    • View Profile
    • My little corner...
    • Email
Re: How sf::Music internally works
« Reply #3 on: October 11, 2013, 04:56:56 am »
I will give a look. Someone knows the size of the buffer chunks? My current ideia is use a custom soundStream that apply the effects at each chunk update.

Just read the official tutorial. If anything is unclear then feel free to ask  ;)
Motion / MotionNET - Complete video / audio playback for SFML / SFML.NET

NetEXT - An SFML.NET Extension Library based on Thor

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: How sf::Music internally works
« Reply #4 on: October 11, 2013, 07:29:53 am »
Quote
I will give a look. Someone knows the size of the buffer chunks?
Please have a look first, and then ask questions :P
Laurent Gomila - SFML developer