Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Audio Error with Video Player and Microphone Recording on iOS

Discussion in 'Audio & Video' started by BillyCY, Jan 23, 2019.

  1. BillyCY

    BillyCY

    Joined:
    Sep 3, 2015
    Posts:
    3
    I am working on a project that playing a video, and recording the player audio response on the same time.
    I am using Unity 2017.2.2f1 on iOS. I have setup a scene with video player and a microphone recording (by Microphone.Start() ). I am facing the 2 problems.

    First, if I play a video clip first, then start the microphone recording. The audio part of the video clip will be muted after started the microphone recording 3 seconds. But the video is still playing, and the mic is still recording. iOS will return following error on xCode:"AVAudioSession.mm:1049:-[Deactivating an audio session that has running I/O. All I/O should be stopped or paused prior to deactivating the audio session."

    Second, if I start the microphone recording, then play a video clip. The video clip would be perfectly played on both screen and audio. However, the recording clip will be faster than normal.

    BTW, I have tried to do a bug report. But it stopped at the middle when uploading the report for over 2 hours.
     
  2. OneLemon

    OneLemon

    Joined:
    Apr 27, 2013
    Posts:
    12
    Have you found the fix for this yet?
     
  3. robertslr

    robertslr

    Joined:
    Sep 24, 2015
    Posts:
    11
  4. mason_c

    mason_c

    Joined:
    Mar 6, 2019
    Posts:
    2
    Has anyone had any luck with this?
     
  5. kk3hi3123

    kk3hi3123

    Joined:
    Aug 17, 2016
    Posts:
    31
    I get this problem also when I play a rewarded video sometimes.