periodic crackling sound on MacOS
Author: RomiRandCreated Jul 30, 2026Updated Aug 3, 2026
Labelsbugm:sfml-audiop:macos
Prerequisite Checklist
- I searched for existing issues to prevent duplicates
- I searched for existing discussions on the forum to prevent duplicates
- I am here to report an issue and not to just ask a question or look for help (use the forum or Discord instead)
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
- OS / distro / window manager: MacOS Tahoe 26.5
- SFML version: 3.1.0 (introduced in https://github.com/SFML/SFML/commit/991ad426c3dcc4e9b6deaf353586b2d0ef9a2093)
- Compiler / toolchain: Apple Clang 17
- Special compiler / CMake flags: None
Steps to reproduce
- Run this program on a MacBook and listen to the unexpected crackling sound
#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
Source: SFML/SFML