Search Unity

  1. Get all the Unite Berlin 2018 news on the blog.
    Dismiss Notice
  2. Unity 2018.2 has arrived! Read about it here.
    Dismiss Notice
  3. We're looking for your feedback on the platforms you use and how you use them. Let us know!
    Dismiss Notice
  4. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  5. Improve your Unity skills with a certified instructor in a private, interactive classroom. Learn more.
    Dismiss Notice
  6. ARCore is out of developer preview! Read about it here.
    Dismiss Notice
  7. Magic Leap’s Lumin SDK Technical Preview for Unity lets you get started creating content for Magic Leap One™. Find more information on our blog!
    Dismiss Notice
  8. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

Audio How to record stereo sound in Unity

Discussion in 'Audio & Video' started by yuki_abe, Mar 12, 2018.

  1. yuki_abe

    yuki_abe

    Joined:
    May 28, 2014
    Posts:
    2
    I have a question about Microphone class.
    https://docs.unity3d.com/540/Documentation/ScriptReference/Microphone.html

    I tried to record stereo sounds by using the Microphone class, but I noticed the sounds turned to monaural. The channel in AudioClip which was generated by Microphone.Start() was 1, so I'm guessing that Unity is recognizing the sound is monaural.

    The version of Unity I'm using is 2017.1.1f1.
    The recording device I'm using is:
    https://www.amazon.com/Roland-UA-4FX2-interface-STATION-UA-4FXII/dp/B01N2OG32G

    Could you tell me how to record stereo sound in Unity?
    Any advice and suggestions will be greatly appreciated.

    Thanks,
     
  2. r618

    r618

    Joined:
    Jan 19, 2009
    Posts:
    590
    It's .. complicated - Microphone class does not support multichannel input

    you can try kzr's audio input plugin: https://github.com/keijiro/Lasp - you have to try it out since I'm not sure whether PortAudio - which it uses - supports multichannel input.

    Another option would be looking at some 3rd party plugins such as FMOD or WWise and their unity integrations.
    I've only used FMOD, so that works, but you'd have to do some coding to make it work, or possibly use FMOD Studio.

    To spare some time still you can use my plugin - link in signature - which is built on top of FMOD low level API and exposes it for unity's AudioSource
     
  3. yuki_abe

    yuki_abe

    Joined:
    May 28, 2014
    Posts:
    2
    I really appreciate your detailed answer.
    I will try the method you taught me.

    Thanks,
    Yuki
     
    r618 likes this.
  4. asifoncue

    asifoncue

    Joined:
    Dec 8, 2014
    Posts:
    12
    Did you solve your issue, Yuki? I'm having trouble using multiple channels from my audio interface in Unity, and I've yet to find an efficient solution.