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

Author Topic: sf::SoundBufferRecorder problem  (Read 22513 times)

0 Members and 1 Guest are viewing this topic.

katrin

  • Newbie
  • *
  • Posts: 17
    • View Profile
sf::SoundBufferRecorder problem
« on: October 30, 2008, 09:06:24 am »
I just came upon a problem with the sf::SoundBufferRecorder. I am trying to use it in a loop just like this:
Code: [Select]
sf::SoundBufferRecorder Recorder;
vector< sf::SoundBuffer> RecBuffer(n);

for (i=0; i<n; i++) {

     \\do something
     Recorder.Start() ;
     \\ Wait for something
     Recorder.Stop();

     RecBuffer[i]=Recorder.GetBuffer() ;
}


That does not work, because when saving the content of the RecBuffer, all file have the same size and content, namly the first input.

So what I did, I createt the sf::SoundBufferRecorder as an array and changed the loop accordingly. That works fine, but is it the right way?!
By the way, creating it as a vector (like the sf::SoundBuffer) instead of an array it gives me an error, that's why I am unsure about the array solution.

May be I did not properly understand the functionality of the sf::SoundBufferRecorder?!? Could anybody help?! I need to record stuff in a loop (experimental trials) and save it as file.

Oh, yeah, I'm using SFML 1.3 with XP SP2.

thanx

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
sf::SoundBufferRecorder problem
« Reply #1 on: October 30, 2008, 10:15:04 am »
Your first attempt should work fine, there might be in the recorder. I'll check this as soon as possible.

Thanks for your feedback :)
Laurent Gomila - SFML developer

katrin

  • Newbie
  • *
  • Posts: 17
    • View Profile
sf::SoundBufferRecorder problem
« Reply #2 on: October 30, 2008, 03:56:58 pm »
thanx for your effort!!  :D

dunno if it's useful for you, but I also tried to save the recorded stuff within the loop with Recorder.GetBuffer(). That too led to "all files are first record" (same size, same content).

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
sf::SoundBufferRecorder problem
« Reply #3 on: October 30, 2008, 08:02:31 pm »
Ok, it's a bug. It should be easy to fix, I'll let you know when it's done :)
Laurent Gomila - SFML developer

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
sf::SoundBufferRecorder problem
« Reply #4 on: November 02, 2008, 11:03:09 am »
I fixed it, it should work fine now.
Laurent Gomila - SFML developer

katrin

  • Newbie
  • *
  • Posts: 17
    • View Profile
sf::SoundBufferRecorder problem
« Reply #5 on: November 02, 2008, 03:38:58 pm »
Quote from: "Laurent"
I fixed it, it should work fine now.


Thanx!!!!!  :D

 

anything