Sign in to follow this  

Fmod + Winsock (Voice Chatting, C++)

Recommended Posts

Hello, I'm working on voice chat and I have a second thread that gets the user voice each milisecond and sends it to the server. What I want to know is how can I get the 'sound' into a variable so I can send it to the server through Winsock for a structure?
system->recordStart(0, sound, true);

sendPack.code = 0; Letting the server know this is a voice.

//Example of what I am looking for.
sound.GetSoundBuffer(sendPack.buffer); //Get the recorded sound made in a milisecond.

//Winsock send function
send(s, (char const *)&sendPack, (int) sizeof(sendPack), 0);


Also if someone can correct me on this source code if I have something that isn't right about the recording let me know, I haven't tested this yet.

Share this post

Link to post
Share on other sites
Well the point of doing this is not to take short cuts, all I need to know is what function has the 'sound data' of what makes the noise and I can just put it in a variable to pass it through winsock. This should be a simple question, but the way I see it, it looks like a question that the 'all knowing' Fmod creates would only know.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this