#3734·SFML

periodic crackling sound on MacOS

Author: RomiRandCreated Jul 30, 2026Updated Aug 3, 2026
Labelsbugm:sfml-audiop:macos

Prerequisite Checklist

Describe your issue here

Upgrading SFML to version 3.1 introduced a noticeable, periodic crackling sound when playing sf::Music streams on macOS. Both external speakers and headphones are affected. It could not be recreated with sf::Sound. I only noticed this on MacOS, and it is most notable with the MacBook speakers. The issue was introduced by the commit linked below.

Your Environment

Steps to reproduce

  1. Run this program on a MacBook and listen to the unexpected crackling sound
cpp
#include <SFML/Audio.hpp>
#include <thread>
#include <chrono>

int main()
{
    sf::Music music;
    if (!music.openFromFile("background_music.ogg"))
        return -1;

    music.setLooping(true);
    music.play();

    std::this_thread::sleep_for(std::chrono::seconds(60));
}

Expected behavior

There should be no crackling sound on MacOS

Actual behavior

There is a crackling sound