Microphone input

BlitzMax Forums/BlitzMax Beginners Area/Microphone input

Diban(Posted 2010) [#1]
How To you get the Mic input in blitzmax i seen it working on blitd3d with the bass recording lib but dont find it in blitzmax y can't find a libary or module for that on blitzmax ?


Difference(Posted 2010) [#2]
Here you go: http://blitzmax.com/Community/posts.php?topic=74048#1009596

No external libs needed.

axe.oggsaver only needed if you want to save as ogg.


Diban(Posted 2010) [#3]
Thank You Peter <<<<<Perfect>>>>> I've tryed to use Maxmod2 It's a pain to install that Mod ?


GfK(Posted 2010) [#4]
I've tryed to use Maxmod2 It's a pain to install that Mod ?
Only if you don't know how to copy files/folders, because that's as complex as it gets. Though you need to use OpenAL or Freeaudio to get it to work.


Volker(Posted 2010) [#5]
Hello Diban,

I had to copy the content of:
\maxmod2.mod\maxmod2.mod
to:
\mod\maxmod2.mod

to get the version maxmod2_1.07.zip
from http://code.google.com/p/maxmod/ working.

There was a 'can't find interface' error while compiling the module.


Diban(Posted 2010) [#6]
Everithing works fine maxmod2 instaled Thank you Volker I dit the same like You Copy \maxmod2.mod\maxmod2.mod to mod\maxmod2.mod and Compiling the module i had no error .
Thank You for your help


Volker(Posted 2010) [#7]
Has anyone a hint for me where to start recording with maxmod2?
RTAudio should do it, but I don' know how?


Volker(Posted 2010) [#8]
Repost from here:
http://blitzmax.com/Community/posts.php?topic=74048#1009596
Recording and saving Audio.




Difference(Posted 2010) [#9]
@Volker: ?

That's pretty much what I linked to in the first place, exept that you left out the fix that makes the saved oggs too long.


Volker(Posted 2010) [#10]
Hm, yes. Thats true.
I stopped reading the thread after I found what I needed.
Didn't read the last posting.
Then I decided to post some working code for people
using the board search, so they don't need to search futher
or start installing maxmod2, like I did, for what there is no need to do.
Fix added.


Difference(Posted 2010) [#11]
It looks like you're alowing saving whilst recording.
Isn't that a bit messy? Have you checked the results?


Volker(Posted 2010) [#12]
Corrected.


ImaginaryHuman(Posted 2010) [#13]
For OpenAL, does the user need to have installed an OpenAL library/driver in order for it to work, or does Blitz come with all of the necessary support?


Midimaster(Posted 2010) [#14]
On Windows the user needs to install OpenAl. But it is very small. I always pack it into my programm (INCBIN) and offer the user directly to install from the game.


ImaginaryHuman(Posted 2010) [#15]
A question.. if someone were recording the input from the microphone, to memory, how could you `stream` a continuous recording to someone without having to record to a huge block of memory? ie how can you use a smallish buffer and make it cyclic or something?


xlsior(Posted 2010) [#16]
Doesn't RaknetVoice do that? Brucey has a wrapper for that one...


Midimaster(Posted 2010) [#17]
@ImaginaryHuman

thats exactly, what OpenAL Recording is doing...Offers a ring buffer, where the recording source can store the samples. And you can fetch them asynchron.

Lets say, the ring buffer has a size of 1 second. Whenever you ask, OpenAL will tell you, how many samples are waiting in the ring buffer, So you have time of max 1 second to fetch the new samples, store them into a bigger piece of memory or write them direct on the harddisk. During this, OpenAl will collect the next samples.
If you are able to do your work within 1 second, you will loose no samples.

If you are sure, you can save the pieces in less than 1 second, you can also try to work with a smaller OpenAL Ringbuffer.

In the german blitzforum I wrote a tutorial about this, Perhaps it can help you: http://www.blitzforum.de/forum/viewtopic.php?t=33843


Brucey(Posted 2010) [#18]
Doesn't RaknetVoice do that? Brucey has a wrapper for that one...

Yeah. It uses the speex library to handle voice chat.


ImaginaryHuman(Posted 2010) [#19]
That's cool, might have to think about an in-game voice chat. :D