AudioIODevice as input

Yo,

I’m having a problem with using AudioIODevice as an input. I can select and use the Primary Sound Capture Driver and all is well. However if i select any other input device, the buffers are always NULL in the callback. There is no error on opening the device.

Any idea about what this might be?

Are you opening channels numbered above 1? If so the buffer array could have null for the first two channels, and the pointers would be beyond that at the indexes that match their channel number.

No, only channels 0 and 1…

ok - well do these audio devices actually have any input channels??

I would assume so…

If i go into control panel and set my default recording device to the on board sound, and select Primary sound capture driver in my app, it works. If i select the on board sound directly in the app, no dice. Same goes for the other sound card in my computer.

Am I missing something here?

Could be a naming problem - because DSound’s rubbish, the only way to match an input and output device is by looking at their names.

If you step into the code that opens the device, it should be fairly obvious what goes wrong - any more info you could give me by looking at that would help.

Have you looked at PortAudio? I’ve only used it through other libraries but it does input/output and it multi-platform.

jules:

have you removed support for sampling rates below 44.1kHz? I’m working on a ham radio application than uses an 8kHz sample rate.

How would that help…?

[quote]jules:

have you removed support for sampling rates below 44.1kHz? I’m working on a ham radio application than uses an 8kHz sample rate.[/quote]

I don’t think I ever included sample rates below 44.1! It’s easy enough to find the list of rates in the code and hack it.

Just mentioned DSound having issues.