Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Audio Starting Microphone failed. result=25 (Unsupported file or audio format.)

Discussion in 'Audio & Video' started by unity_YLJngzsjDCCl9g, Mar 28, 2019.

  1. unity_YLJngzsjDCCl9g

    unity_YLJngzsjDCCl9g

    Joined:
    Apr 23, 2018
    Posts:
    5
    Hey guys,

    I was recently trying to use a new Mic-Array in my project to record and I'm receiving this error:

    Starting Microphone failed. result=25 (Unsupported file or audio format.)

    I used Audacity to make sure the mic array was working (Audio Host: MME, 1 channel Mono recording, 48kHz) and there was no problem..

    I'm using a standard recording code: AudioClip recording = Microphone.Start(Microphone.devices[0], false, 60, micSampleRate);

    Anybody have an idea?
     
    Last edited: Mar 28, 2019
  2. unity_YLJngzsjDCCl9g

    unity_YLJngzsjDCCl9g

    Joined:
    Apr 23, 2018
    Posts:
    5
  3. r618

    r618

    Joined:
    Jan 19, 2009
    Posts:
    788
    Well, that happens sometimes with certain hardware when Unity's FMOD can't work with it
    Since you seem to be needing a solution, I suppose it's acceptable if I plug my asset - link in the signature - ; download demo application for your platform from the asset store page and run one of the Input scenes to see if your device is recognized and can be opened to get its audio
    Let me know if that helps !
     
  4. unity_YLJngzsjDCCl9g

    unity_YLJngzsjDCCl9g

    Joined:
    Apr 23, 2018
    Posts:
    5
    Hey, thanks for the response! I downloaded the demo app and it recognized my device, but then when I tried to record it didn't work (State: Stopped ERR_RECORD An error ocurred trying to initalize the recording device)

    I've added a screenshot of the error
     

    Attached Files:

  5. r618

    r618

    Joined:
    Jan 19, 2009
    Posts:
    788
    Hey, thanks for testing and for trying it out !

    Unfortunately, I don't have a good answer - my guess is that ReSpeaker drivers support only MME audio host and FMOD doesn't work with it - but don't quote me on that please )

    - out of curiosity - do other audio hosts (DirectSound/WASAPI) work with it in Audacity ?
    if not, you'll probably have to request support for them

    You can verify on FMOD forums - qa.fmod.com - you can include Unity's Microphone class example and can mention you tried also with FMOD 1.10.11 with the same result
     
  6. unity_YLJngzsjDCCl9g

    unity_YLJngzsjDCCl9g

    Joined:
    Apr 23, 2018
    Posts:
    5
    So in Audacity (1 mono-recording channel at 16kHz) it works with both MME and Direct Sound but not with WASAPI, does that indicate anything to you?

    And yeah I've been contacting ReSpeaker support as well but they don't seem to understand, I'll tell them what you said though, thanks for all the feedback!
     
  7. r618

    r618

    Joined:
    Jan 19, 2009
    Posts:
    788
    Yea, according to FMOD documentation (https://www.fmod.com/resources/documentation-api?version=2.0&page=platforms-windows.html) that should be in line with FMOD using WASAPI by default on Windows
    ^ that's for latest (2.0) version but it's probably never changed

    - I'm not sure audio host type can be requested during initialization on windows, but I'll look into it and might provide an option to choose one, if yes [no guarantees )]
     
  8. r618

    r618

    Joined:
    Jan 19, 2009
    Posts:
    788
    It seems that WASAPI is the only reasonable option for FMOD on windows ( the other two being asio and windows sonic - neither of which is relevant here ), so requesting its support from ReSpeaker is probably the only way on how to make it work in Unity @unity_YLJngzsjDCCl9g
     
  9. unity_YLJngzsjDCCl9g

    unity_YLJngzsjDCCl9g

    Joined:
    Apr 23, 2018
    Posts:
    5
    OK, I've reached out to them about the problem with recording using WASAPI, now I just have to wait and sort it with them I guess.. Thanks again for all the replies, you were a huge help!
     
    r618 likes this.