No RecordNumDrivers on Android

(Goran Saric) #1

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);

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.


(Goran Saric) #2

Anybody? :frowning:

(Nicholas Wilcox) #3

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

(Goran Saric) #4

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… ?

(Nicholas Wilcox) #5

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.

(Goran Saric) #6

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

(playwind) #7

haha, after setOutputMode, it works. thanks Nicholas Wilcox