Record Micro

Hey there,

is it possible with Xojo on Windows to record a microphone to a wave File?

For the recording part you can use the BASS library. Simple demo here https://forum.xojo.com/conversation/post/183708

The download bassRecGL should work on Windows but you’ll also need to find and install libbass.dll (or whatever it’s called).

The demo just records to a short, temporary buffer for drawing. For long, indefinite recordings I use an array of 10MB Memoryblocks. As new data comes in copy it to the current Memoryblock and when it fills up append another Memoryblock and begin writing there.

But there may be functions in BASS that record directly to a file.

If you do need to write the file yourself see here https://forum.xojo.com/23110-how-to-write-wav-or-aiff-data-from-binary-stream

For some € the MBS plugins have functions for audio recording (and writing I assume).
The PortAudio library is another possibility but I haven’t used it.
There should be functions built into Windows you can declare to but I don’t know them.

In short you’ll need declares or a plugin to get audio recordings.

another possibility is to record with Sox, a commandline utility (OSX, Win, Linux)

This Example is made for OSX
(the path to sox would have to be adapted for Windows)

Hello Axel,
Can’t open archive. Can you help me to get your Example ?

Regards,

Of course, it holds an html file, not PK (zip) data.

It opens a DropBox tab, but shows nothing (here).

here is the good archive link
https://www.dropbox.com/s/ppagh1jmqdy9us7/RecordAudio2.zip

MBS Xojo Audio Plugin has PortAudioMBS class (and subclasses) to record and SndFileMBS class to write wav file.

I can tell you that the BASS (and related) Libraries are a beast! You can do really awesome things with them! (macOS / Windows). The only thing: you’ll be dealing with declares.