Search Issue Tracker

Won't Fix



Found in




Issue ID




OnAudioFilterRead doesn't handle Sample Rate mismatch when playing the project in the Editor



How to reproduce:
1. Make sure that the Sample Rate of your default Audio Input Device isn't set to 8kHz in the Windows Sound Control Panel
2. Open the attached "1246695 repro" project
3. Open the "SampleScene" from Assets > Scenes folder
4. Enter Play Mode
5. Hit the "Record/Stop" button in the middle of the Game window
6. Input any audio with the default Audio Input Device

Expected result: the audio is low quality but not distorted
Actual result: the audio is very distorted and has a delay between 1 and 20 seconds

Reproducible with: 2018.4.23f1, 2019.3.15f1, 2020.1.0b10, 2020.2.0a12

-8kHz Sample Rate is only an example and most combinations of mismatching Sample Rates between Audio Device and Unity will result in distorted and delayed audio in the Editor
-Only when the Sample Rate of Audio Device being used, System Sample Rate in the Project Settings and Sample Rate used in "Microphone.Start" Method match the resulting audio is clear and not delayed in the Editor
-Choosing different DSP Buffer Sizes can result in either better results (Best latency) or worse (Best Performance)
-Best Performance DSP Buffer Size can sometimes result in delays so long (~20 seconds) that the Audio seems completely missing at first glance
-None of the above-mentioned issues appear in the built game, only in the Editor

  1. Resolution Note:

    Duplicate of - It is as designed and we wont be able to fix this.

Comments (1)

  1. Davide

    May 26, 2020 11:30

    I'm the one who discovered the bug in the process of developing a real-time streaming chat.
    This issue is delaying the project even if there's the workaround :)
    I would be very happy if it could be fixed.
    Thanks for your time.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.