Search Issue Tracker
Won't Fix
Votes
1
Found in
2018.4
2019.3.11f1
2020.2
Issue ID
1246695
Regression
No
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
Notes:
-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
-
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
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Articulation Body with 'Revolute' Joint Type has erratic behavior when Upper Limit is set to above 360
- WebGL Player fails to render Scene when Terrain with Detail Mesh is added and WebGPU Graphics API is used
- Inconsistent errors are logged when different types are passed into the Query "Q<>" method in UIToolkit and the ancestor VisualElement is null
- Crash on GetMaterialPropertyByIndex when opening a specific Scene
- Discrepancies in the styling are present when using a TSS file instead of a USS file in custom EditorWindow
Resolution Note:
Duplicate of https://issuetracker.unity3d.com/product/unity/issues/guid/1102585 - It is as designed and we wont be able to fix this.