Search Issue Tracker

By Design

Votes

0

Found in

2019.2.0a6

Issue ID

1129408

Regression

No

[Android] Small DSP Buffer size causes audio playback to pop and crackle

Audio

-

Steps to reproduce:
1. Open attached project
2. Build for Android
3. Press Start and Navigate to "20.AM_DSPBufferSize_scene"
4. Slide the slider to the smallest DSP buffer size and press Play
5. Audio comes out crackling and popping

Expected: Audio playback should not differ from a larger Buffer size
Actual: Audio playback quality is worse

Repro on Unity version: 2019.2.0a6,2019.1.0b4, 2018.3.7f1,

Reproduced:
VLNQA00231, Huawei HUAWEI Mate 20 Pro (LYA-L29), Android 9, CPU: HiSilicon Kirin 980, GPU: Mali-G76

Not reproduced:
VLNQA00136, Samsung Galaxy S9+ (SM-G965F), Android 8.0.0, CPU: Exynos 9 Series 9810, GPU: Mali-G72
VLNQA00110, Samsung Galaxy Note2 (GT-N7100), Android 4.4.2, CPU: Exynos 4 Quad 4412, GPU: Mali-400 MP
VLNQA00066, Lge LG Optimus G (LG-F180L), Android 4.1.2, CPU: Snapdragon S4 Pro APQ8064, GPU: Adreno (TM) 320
VLNQA00233, Meizu - (PRO 6 Plus), Android 7.0.0, CPU: Exynos 8 Octa 8890, GPU: Mali-T880
VLNQA00096, Samsung Galaxy S8 (SM-G950F), Android 8.0.0, CPU: Exynos 9 Octa 8895, GPU: Mali-G71
VLNQA00118, Google Pixel 2 XL (Pixel 2 XL), Android 8.1.0, CPU: Snapdragon 835 MSM8998, GPU: Adreno (TM) 540
VLNQA00107, Huawei Nexus 6P (Nexus 6P), Android 8.0.0, CPU: Snapdragon 810 MSM8994, GPU: Adreno (TM) 430
VLNQA00134, Samsung Galaxy S8 (SM-G950F), Android 8.0.0, CPU: Exynos 9 Octa 8895, GPU: Mali-G71
VLNQA00098, Lge LG G4 (LG-H815), Android 6.0, CPU: Snapdragon 808 MSM8992, GPU: Adreno (TM) 418
VLNQA00229, Oneplus OnePlus6T (ONEPLUS A6013), Android 9, CPU: Snapdragon 845 SDM845, GPU: Adreno (TM) 630

  1. Resolution Note:

    If you decrease the size of the dsp buffer, this increases the load on the CPU. At some point it will overburden the CPU and pop

Comments (3)

  1. tachyon-particle

    Apr 30, 2023 14:42

    Yes, DEZZELL's solution worked! I also had the same problem with audio crackling on the Android, especially when playing music. I had to set the "dspBufferSize" to 32 to fix the crackling issue.

  2. barisaxo

    Mar 09, 2022 22:11

    Yo I was having this same problem of audio crackling on android and Dezzell's snippet absolutely fixed it!

  3. dezzell

    May 01, 2020 22:14

    Found the fix to audio crackling on Android 9 Pie Galaxy S8 devices within Unity 3D!!!!!
    https://forum.unity.com/threads/dsp-buffer-size-differences-why-isnt-it-a-setting-per-platform.447925/

    void Start()
    {

    AudioConfiguration config = AudioSettings.GetConfiguration();
    config.dspBufferSize = 64;
    AudioSettings.Reset(config);
    }

    I found you can set this in C#. DSP on Audio Project Settings doesn't go down to 32 or 64. At 128 it starts crackling all the way up to 80192.

    The popping and crackling has gone away. Now just need to get audio working in the background when screen is off, or in another app.

    I've spent weeks looking for a fix, and would give up, and finally was determined today to figure it out, kept searching Google, lol, making tweaks and so on. All good now.

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.