No RecordNumDrivers on Android

Hi there!

I’m actually developing a tool on Android and I wan’t to capture the Microphone on Android devices. My problem is, that FMOD can’t see any Input devices.

I’m developing in C# & Mono.

    result = this.system.getRecordNumDrivers(out this.recordingSources);
    ERRCHECK(result);

I always get zero drivers back to this.recordingSources. It actually works fine on Windows, I just can’t get any sources on Android. I also gave access to the microphone in the Manifest.xml file:

<uses-feature android:name="android.hardware.microphone" android:required="true" />

I also don’t get any error message from the Android device via logcat.
Any ideas?

BTW: the rest is working fine with FMOD. I can play mp3 files and use FFT via DSP etc.

Cheers
Goran

Anybody? :frowning:

You need permission in your manifest for android.permission.RECORD_AUDIO

Thanks for the answer Nicholas.

I placed a android.permission.RECORD_AUDIO, still no devices detected.
I also don’t get any error or warning over the console… ?

You are probably using the Audio Track output mode, which doesn’t support recording.

You’ll need to switch to the OpenSL output mode. See the System::setOutputMode() and “Basic Information” page in the FMOD Android API docs.

Whoop, it works! Thanks Nicholas, the wrong OutputMode was the problem!

haha, after setOutputMode, it works. thanks Nicholas Wilcox