voice/mic usage in multiplayer game?

BlitzMax Forums/BlitzMax Programming/voice/mic usage in multiplayer game?

gameproducer(Posted 2010) [#1]
I've tried searching for topics about using microphone in bmax, and only thing so far i've found is raknet stuff:
http://www.blitzmax.com/Community/posts.php?topic=84074

Is there any attempts made to do this stuff with other than raknet? (like based on the enet module)


Midimaster(Posted 2010) [#2]
Hy, I'm Midimaster from Germany. I have a perfect solution for you, written in a tutorial, but... it is in german language...

Perhaps it could help you:

http://www.blitzforum.de/forum/viewtopic.php?t=33843

Maybe you can translate it, but nevertheless at the end of lesson III you will find a complete working code.


Ked(Posted 2010) [#3]
That's awesome Midimaster! Thanks for posting that link!


gameproducer(Posted 2010) [#4]
Translation done:
http://translate.google.com/translate?js=y&prev=_t&hl=en&ie=UTF-8&layout=1&eotf=1&u=http%3A%2F%2Fwww.blitzforum.de%2Fforum%2Fviewtopic.php%3Ft%3D33843&sl=de&tl=en

:)


gameproducer(Posted 2010) [#5]
Thanks.

(Hmm, now need to figure how to transmit this recording over network...)


Zeke(Posted 2010) [#6]
but Hey.. MidiMaster? Can yoy make a english version about this. what i know that you know english.. so why you just make a some kind lessons...


Ked(Posted 2010) [#7]
(Hmm, now need to figure how to transmit this recording over network...)

Couldn't you just load it into a bank with LoadBank then use Read/WriteBank to send/receive?

EDIT: Actually, I think you can just capture it into a bank. It would be easier to send that way.


Midimaster(Posted 2010) [#8]
Ok, I did translate it. You will find it here:

OpenAl Audio Recording Tutorial:
http://www.blitzbasic.com/Community/posts.php?topic=90830

But my english is terrible! Now I need a nativ speaker, who will have a look on it and helps me to remove the mistakes!

The second part (transmission) is the same as you would do it for a picture, etc... He can capture it into a Bank too.

I would try to reduce the numbers of datas and compress it before sending it. Because with CD quality to would have to transfer 1.2Mbit each second. With 11025kHz and MONO 8bit it is still 90kBit each second


gameproducer(Posted 2010) [#9]
Alright, thanks guys.

@Ked: care to share a one more pointer where to look for that "easier to send that way" - I've never sent banks to anywhere, only visited them. :)

mono 8bit... 90kB per sec. Sounds bit high in terms of bandwidth hogging (just think of several people speaking simultaneously - killing your network :D)... but perhaps doable.


Ked(Posted 2010) [#10]
@Ked: care to share a one more pointer where to look for that "easier to send that way" - I've never sent banks to anywhere, only visited them. :)

Sure. Instead of creating an audio sample, create a bank:
Global bank:TBank=CreateBank(44100*5*2)
alcCaptureSamples(captureDevice,bank.Lock(),number)
bank.Unlock()

Then, use WriteBank() to write to a TCP stream.

(NOTE: Above code untested.)