Voice Communication

Started by
4 comments, last by Unreal 18 years, 7 months ago
hey - what would be the best way to go about a voice communication software which could run in the background while a game is being played? My mate is a complete idiot and refuses to use teamspeak because he thinks it has a virus in it so i need to make one similar to that but probs not as good. Would directplay be able to do this? I would greatly appreciate any information you could give.
JUST-CODE-IT.NETManaged DirectX & C# TutorialsForumsArticlesLinksSamples
Advertisement
DirectPlay does it through DirectVoice. It works but DirectPlay is deprecated by Microsoft. Here is source code for a networking / voice application.

http://pages.videotron.com/cbenoi1/r_1_5_0.zip

-cb
There are DirectSound examples for capture and playback - you just need to do the networking in-between.
"Absorb what is useful, reject what is useless, and add what is specifically your own." - Lee Jun Fan
If having your friend run TS would have been your easiest solution, you can look into Ventrilo which is just as good. Seems like a rather large workload to write your own voice comm client/server system just because your friend doesnt want to use TS! Can always scan it with an anti-virus and prove him wrong.
Just use the DirectSound.CaptureBuffer class. Capture the sound from the mic, and every few seconds or so, see if any data was added (I believe it has a minimum sound level). If so, then hit the CaptureBuffer.Read((start point), typeof(byte), LockFlag.(something), the amount of bytes to read. Send the byte array you just read to across Windows Sockets and have it just write into a Buffer on the other side. If you want to do it for a game, send a Vector3 and then the bytes and write into a Buffer3D.
I think that the version of OpenAL (1.1) has capture capabilities. check it out ;)

This topic is closed to new replies.

Advertisement