Jump to content
  • Advertisement
Sign in to follow this  
ajm113

Fmod + Winsock (Voice Chatting, C++)

This topic is 3175 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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?
while(!quitThread)
{
system->recordStart(0, sound, true);
	Sleep(1);
system->recordStop(0);
channel->stop();

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
Advertisement
My advice is to use a library that already exists for games such as teamspeak. This is one wheel that is not worth the time to reinvent. Trust me I know - I manage and build VoIP applications for a living.

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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!