Search Issue Tracker
By Design
Votes
3
Found in
2021.3.4f1
2022.1.3f1
2022.2.0a13
Issue ID
UUM-358
Regression
No
Microphone playback is frequently corrupted - #AudioHAL
Prerequisites: You need a microphone
Steps to reproduce:
1. Open "MicTest" project
2. Open "test" scene
3. Play in editor
4. Say something to microphone
5. Repeat steps 3-4 until you hear corrupted sound in the playback
Results: Microphone sometimes playback corrupted sound
Note: This issue reproduces ~ 4/10 times
Reproduced with: 5.6.0a3, 5.5.0f1, 5.4.2f2
-
BOGUnity01
Mar 07, 2018 01:57
This seems to be happening, at least with iOS. Does anyone have a work-around, or a fix to this issue? Microphone seems to stutter second time its used.
-
madsnowman
Mar 27, 2017 08:34
I am seeing this as well. The current workaround is disarming and re-arming the microphone, but corruption occurs around 25% of the time. It doesn't appear to be related to the length of the microphone being armed. Sometimes it corrupts immediately, and sometimes it runs well for over an hour before happening.
For me, I can hear that the corruption is related to an audio sample being played back as an echo of the user's microphone input, and is related to the length of the buffer. So, with the following code that has a 1-second buffer, if you listen closely you can hear the previous 1 second of audio played back as a corrupted echo.
Microphone.Start(selectedMic, true, 1, maxFrequency);
while (!(Microphone.GetPosition(selectedMic) > 0)) {}The only way to remove this corrupted echo is to disarm and re-arm the microphone.
This occurs with every "DSP Buffer Size" configured in the Audio settings (Default, Best latency, Good latency, Best performance). It seems that "Best performance" has slightly less chance of corrupting, but not by much.
Reproduced with 5.5.2f1, 5.5.0f1
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
- EditorGUILayout.LabelField displays black text when the "EditorStyles.whiteBoldLabel" parameter is passed in
- The UI Toolkit TreeView Items get clipped when resizing the Game view window when Scale with Screen Size is set as the Scale Mode in the Panel Settings
- Components of a Prefab instance lose their values that are updated with the Reset() method when entering Play Mode
- UI Builder Broken Direct Asset Reference Overrides
- Universal 3D Sample project template takes a very long time to build.
Resolution Note:
The project provided for the reproduction was allowing to pursue the recording while playing back the same recorded audio. Allowing to start a recording and playing it before or without stopping the same recording, made it so we could record the playback, producing the "echo corruption" mentioned.
We made our own recording test project, based on the provided one, and we were not able to recreate the issue when making sure that recording would always be stopped before playback.