numdrivers and numconnected both always return 0 when ran on the Android Unity app I made. It works fine on PC when I run it in the Unity editor. I’ve gone through the previous threads about the issue and I implemented the solutions I found but they haven’t worked.
// CODE
void Start () {
string filePath1 = Application.persistentDataPath + "/micList.txt";
File.AppendAllText(filePath1, "Start List:\n");
foreach (var device in Microphone.devices)
{
File.AppendAllText(filePath1, "(" + device.ToString() + ")\n");
}
var lowlevelSystem = FMODUnity.RuntimeManager.LowlevelSystem;
FMOD.System system;
FMOD.Factory.System_Create(out system);
uint version;
lowlevelSystem.getVersion(out version);
lowlevelSystem.setOutput(FMOD.OUTPUTTYPE.OPENSL);
lowlevelSystem.init(100, FMOD.INITFLAGS.NORMAL, (System.IntPtr)null);
int numdrivers, numconnected;
lowlevelSystem.getRecordNumDrivers(out numdrivers, out numconnected);
//Debug.Log("numdrivers: " + numdrivers + "\nnumconnected: " + numconnected + "\n");
string filePath = Application.persistentDataPath + "/UWVRdrivers.txt";
File.AppendAllText(filePath, "Start List:\n");
File.AppendAllText(filePath, "numdrivers: " + numdrivers + "\nnumconnected: " + numconnected + "\n");
}