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

Author Topic: Real Time audio processing (Input From Sound Card)  (Read 3263 times)

0 Members and 1 Guest are viewing this topic.

linde

  • Newbie
  • *
  • Posts: 1
    • View Profile
Real Time audio processing (Input From Sound Card)
« on: January 08, 2016, 10:18:33 am »
I`m doing a C++ project that needs to acquire the data from soundcard..
I tried to use the SoundBufferRecorder but on my understanding upon reading the documentation The sound buffer is valid only after the capture has ended.

Is there a way to get the data on realtime?

Thanks in advance!

Foaly

  • Sr. Member
  • ****
  • Posts: 453
    • View Profile
Re: Real Time audio processing (Input From Sound Card)
« Reply #1 on: January 08, 2016, 10:58:04 am »
Yes that is correct sf::SoundBufferRecorder is not what you are looking for. If you want to do near real-time processing you need to derive from sf::SoundRecorder. Then you can implement the onProcessSamples() method, which will provide you with the samples at a specified rate. Take a look at the doc or the implementation of sf::SoundBufferRecorder. Also the VoIP example might show you a way how to do it.