SFML community forums

Help => Audio => Topic started by: BartekMaciag on January 12, 2014, 03:06:59 pm

Title: Recording and sending audio.
Post by: BartekMaciag on January 12, 2014, 03:06:59 pm
I want to create voice chat in my little game it looks like this:
for(;;)
{
    recorder.start();
    recorder.stop();
    send(recorder.getbuffer());
}

It doesn't work but I tried something another ...:
recorder.start();
send(recorder.getbuffer());


this too didn't work, I have to record and send it at the same time, please help me  Bartek.
Title: Re: Recording and sending audio.
Post by: eXpl0it3r on January 12, 2014, 03:14:31 pm
You need to learn more about programming and especially on the topics of audio processing and streaming. I can only guess, but I'd say SFML is not the best library to implement voice chat with.

Also "doesn't work" is not a problem description, read this post (http://en.sfml-dev.org/forums/index.php?topic=5559.0).

And for posting code you should always use the [ code=cpp ] tag.
Title: Re: Recording and sending audio.
Post by: zsbzsb on January 12, 2014, 03:19:22 pm

It is very much possible with SFML, but unless you learn more about coding/streaming/audio processing as eXpl0it3r said you will have a hard time making it work.  ;)
Title: Re: Recording and sending audio.
Post by: BartekMaciag on January 12, 2014, 04:51:37 pm
  • Record audio into a buffer
  • When buffer is full send it to the client
  • Receive the audio data and load it into a sound buffer
  • Play the sound buffer
  • Goto 1

It is very much possible with SFML, but unless you learn more about coding/streaming/audio processing as eXpl0it3r said you will have a hard time making it work.  ;)


it's beside the point, what I mean is record and send file at the same time when the record is not over.
Title: Re: Recording and sending audio.
Post by: zsbzsb on January 12, 2014, 05:13:59 pm
it's beside the point, what I mean is record and send file at the same time when the record is not over.

And this is how you do it....