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

Author Topic: When might the SoundBufferRecorder not record?  (Read 3468 times)

0 Members and 1 Guest are viewing this topic.

Jebbs

  • Sr. Member
  • ****
  • Posts: 358
  • DSFML Developer
    • View Profile
    • Email
When might the SoundBufferRecorder not record?
« on: June 30, 2014, 02:43:56 am »
This might not be relevant anymore as my binding is still in 2.0 land, but I was curious when sound recording with the SoundBufferRecorder might not work.

Here's some context:

I'm using the sfSoundBufferRecorder methods from CSFML. No matter what I do, I can't seem to record anything. Thinking it might be some strange C++ to D thing I have altered sfSoundBufferRecorder_getBuffer to write the duration of the sf::SoundBuffer to the console before it updates the sfBuffer, but even there, it is always 0 as nothing was apparently recorded. sfSoundRecorder_isAvailable does return true, so I'm a little stumped.

Has any of this changed between 2.0 and 2.1? Could it have something to do with my own computer? Any help would be great.
DSFML - SFML for the D Programming Language.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: When might the SoundBufferRecorder not record?
« Reply #1 on: June 30, 2014, 07:36:42 am »
No, nothing has changed. You should write a complete and minimal code in C++ so that we can investigate the problem.
Laurent Gomila - SFML developer

Jebbs

  • Sr. Member
  • ****
  • Posts: 358
  • DSFML Developer
    • View Profile
    • Email
Re: When might the SoundBufferRecorder not record?
« Reply #2 on: June 30, 2014, 08:36:48 am »
No, nothing has changed. You should write a complete and minimal code in C++ so that we can investigate the problem.

If that's the case then I'm probably doing something wrong somewhere. Once I have a chance I'll write the same thing in C++ to confirm.
DSFML - SFML for the D Programming Language.

Jebbs

  • Sr. Member
  • ****
  • Posts: 358
  • DSFML Developer
    • View Profile
    • Email
Re: When might the SoundBufferRecorder not record?
« Reply #3 on: July 02, 2014, 01:04:24 am »
It occurred to me that I introduced a small bug in my binding that was causing sf::err not to write to anything, but that itself isn't important to this problem. What I discovered  once I could again see errors was that I now get the "Failed to open the audio capture device" error, though I am not sure why. I have successfully recorded on my system before.

What are some reasons that the capture device might fail to open?
DSFML - SFML for the D Programming Language.