How to record multiple channels from an audio acquisition card ?

Started by Flanker, May 11, 2019, 17:34:04

Previous topic - Next topic

Flanker

Hello, I was wondering if there is a module or API for BlitzMax wich would allow to access/record/process individual channels from an audio acquisition card like this one (USB card, 8 microphones inputs/channels) :



Years ago I used DirectPlay to do that with VisualBasic but it was too damn slow. I'd like to give it a try with BlitzMax.
Everyone knew it was impossible, until someone who didn't know made it.

fielder

on Bmax is hard to record from just 1 input (just 1 example for standard audio card microphone input) you have to look to Bmax like a C++ compiler.. if no one created a library for that you have to do by yourself ... if you have not find the microphone example on web.. i think you are not able to make changes to make it working on multi channel.

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

http://www.mojolabs.nz/posts.php?topic=90830

Flanker

Thanks for the links it will be useful, OpenAL might do the job.
Everyone knew it was impossible, until someone who didn't know made it.

Flanker

I started to play with OpenAL and it seems really nice for my use.

However I have a problem enumerating capture devices, the names are truncated like there is a string length limit (31 characters).

Here the code I use to enumerate devices (you can test on your system) :
Local pointer:Byte Ptr = alcGetString(Null,ALC_CAPTURE_DEVICE_SPECIFIER)
Local name:String
Local offset:Int

Repeat
name = String.FromCString(pointer+offset)
If name <> Null Then Print name
offset = offset + Len(name) + 1
Until name = Null


And here is the output on my system :
Microphone (Logitech USB Headse
Microphone (HD Webcam C270)
Headset (TaoTronics TT-BH22 Han


While it should be something like that :
Microphone (Logitech USB Headset)
Microphone (HD Webcam C270)
Headset (TaoTronics TT-BH22 Hands-Free)


I also tried the enumerate function written in the OpenAL bmx mod but it returns exactly the same output. As I intend to use OpenAL with an audio interface, with multiple capture devices and long names, I absolutely need the full names. If someone have a clue on this one it would be greatly appreciated.
Everyone knew it was impossible, until someone who didn't know made it.

Henri

Hi,

what if you replace ALC_CAPTURE_DEVICE_SPECIFIER with a literal number 4115 ?

-Henri
- Got 01100011 problems, but the bit ain't 00000001

Flanker

Yes I tried, it is the constant for ALC_ALL_DEVICES_SPECIFIER wich is a complete enumeration according to the documentation, but it seems to only enumerate playback devices (speakers) :

Generic Software on Headphones (TaoTronics TT-BH22 Stereo)
Generic Software on Headset (TaoTronics TT-BH22 Hands-Free)
Generic Software on Speakers (Logitech USB Headset H340)
Generic Software on Digital Audio (S/PDIF) (High Definition Audio Device)
Everyone knew it was impossible, until someone who didn't know made it.