Menu ▾ ▴

#1388 low audio buffer size

v3.5
open-need-info
dqh
None
Windows
Sound
2026-09-30
2020-12-26
No

-Buffer sizes >=30ms are fine.

-Buffer sizes between 18ms and 29ms add crackle to the sound emulation. At 29ms it can only be heard when certain notes are played.

-Buffer sizes between 6ms and 17ms:
Emulation starts at 100% cpu and 50 fps. Then it gradually shows lower and lower cpu and fps speed until it reaches 12.93% cpu and 6.480fps. It takes more than 2 minutes 30 seconds to reach the lowest value.
Windows taskmanager shows 0% CPU usage at all times.
Pausing/unpausing lets cpu jump to 100% and fps to 50, then it gradually slows down again.
The real emulation speed is never higher than 12.93% cpu and 6.480fps.
Warp speed still goes to 890%.
The drive sound emulation is adding a strange sound.

-Buffer sizes between 3ms to 5 ms speed up the emulator to 600-680% cpu.

-Buffer sizes 1ms and 2ms produce an error:
VICE Error
Sound: Sound buffer overflow (cycle based)

Discussion

  • dqh

    dqh - 2020-12-26

    Thanks for the info, what changes when you use the 'very small' fragment size? (Generally you want the fragment size as small as possible anyway)

    No need to keep testing lower sizes once you've found a buffer size that's too small btw.

     
  • Thomas Witek

    Thomas Witek - 2020-12-26

    With very small fragments:
    22ms and higher are fine
    20ms and 21ms produce crackles in the sound
    19ms to 2ms lower the emulation speed to different speeds.
    1ms speeds up the emulation

     
  • Thomas Witek

    Thomas Witek - 2020-12-26

    Update: after deleting the %appdate%\vice\vice.ini, the behavior changed.
    default (26ms / medium fragments, 44.1kHz): emulation runs at 95.9%
    26ms, very small fragments: 95.9%, no change.
    30ms: around 95%
    30ms, 48kHz: swinging between 94.9% and 95.5%
    40ms, 44.1kHz: 100%
    40ms, 48kHz: 93.7%
    starting at 50ms, 48kHz mostly 99.9%, sometimes 100%

     
  • gpz

    gpz - 2020-12-26

    Please describe the audio hardware you are using (and name the driver if you can). Something around 30ms should really work.

     
  • Thomas Witek

    Thomas Witek - 2020-12-26

    Onboard Soundchip on Gigabyte Z170-HD3P-CF: Realtek ALC887 codec
    In device manager:
    Realtek(R) Audio
    driver vendor Realtek Semiconductor Corp.
    driver date 15.05.2019
    driver version 6.0.8703.1
    c:\windows\system32\drivers\rtkvhd64.sys
    file version 6.0.8703.1 built by: WinDDK

     
  • gpz

    gpz - 2020-12-26

    Ok, just another Realtek - i have same (and it works fine) shrug

     
  • dqh

    dqh - 2021-03-27

    Hi Thomas, can you please check how the latest code runs for you on that same computer? https://github.com/VICE-Team/svn-mirror/releases

     
  • gpz

    gpz - 2021-10-26
    • status: open --> open-need-info
    • assigned_to: dqh
    • Category: x64sc --> Sound
     
  • gpz

    gpz - 2021-10-26

    repeating the respect :)

     
  • gpz

    gpz - 2026-09-12

    can this be closed?

     
  • Thomas Witek

    Thomas Witek - 2026-09-13

    Testing in Windows x64 3.10 r46229, default settings. Active loud speakers at 50% volume over normal listening volume.
    Starting x64sc, I hear a low noise sound. Goes away when i close x64sc.

    Fragment size Medium:
    At buffer size 10ms, the noise starts sounding metallic. Emulation speed jumps around between 91% and 100%. In a demo everything is running in slow motion.
    Back at 11ms, all is normal again.
    At size 8ms, the noice changes to a higher pitch.
    At 5ms, the pitch goes very high. x64sc emulation speed jumps around wildly between 130% to 500%, mostly around 300-400%. The cursor flickers like crazy. In a demo, it's running at turbo speed.
    At 1ms and 2ms, CPU speed is between 100% and 130%. Highest pitch noise. In demo the sound is extremely distorted.

    At fragment size Very Small:
    At 10ms, the sound goes silent and the cursor stops blinking. It doesn't return to normal if put back to 11ms. A running demo stops and doesn't continue at 11ms. Power cycle C64 (alt+f12) does nothing.

    Maybe just remove buffer sizes <11ms from menu?

     
    • dqh

      dqh - 2026-09-30

      It depends on the audio hardware and drivers. On a mac I can reliably use a 5ms buffer. I suspect Windows and Linux bottom out around 11ms, but i haven't tested with ASIO drivers. Just use the lowest value that reliably works.

       

Log in to post a comment.