audacity / audacity/audacity

High CPU usage (40%) for only playing a wav file

Open
#9,055 0 comments 0 reactions 0 assignees View on GitHub
AU3-bug
Dominant language
C++
Stars
18.4k
Forks
2.7k
Avg merge
3d 1h
Merged PRs (30d)
78

Description

### Bug description

Just playing a wav file on Audacity 3.7.4 on MacOS M2 machine results in 40% reported CPU usage for Audacity and around 10% at idle. Attempting to use VST3 plugins results in broken audio, most likely due to this high CPU usage figure. For comparison, playing the same file with Apples music app results in 1.4% usage. Note that the 40% figure was without any effects plugins!

The Build
Program build date:
Jun 10 2025
Commit Id:
9cbf47 of Tue Jun 10 15:52:05 2025 +0300
Build type:
CMake Release build (debug level 1), 64 bits
Compiler:
GCC 4.2.1 (Audacity)
Compiler:
clang 15.0.0 (clang-1500.1.0.2.5)
Cache folder:
/Users/paavojumppanen/Library/Application Support/audacity
Settings folder:
/Users/paavojumppanen/Library/Application Support/audacity
Data folder:
/Users/paavojumppanen/Library/Application Support/audacity
State folder:
/Users/paavojumppanen/Library/Application Support/audacity
Core Libraries
wxWidgets
(Cross-platform GUI library)
3.1.3 (Audacity)
PortAudio
(Audio playback and recording)
v19
libsoxr
(Sample rate conversion)
Enabled
File Format Support
libmpg123
(MP3 Import)
Enabled
libmp3lame
(MP3 Export)
Enabled
libvorbis
(Ogg Vorbis Import and Export)
Enabled
libopus
(Opus Import and Export)
Enabled
libid3tag
(ID3 tag support)
Enabled
libflac
(FLAC import and export)
Enabled
libtwolame
(MP2 export)
Enabled
ffmpeg
(FFmpeg Import/Export)
Enabled
Features
Nyquist
(Plug-in support)
Enabled
LADSPA
(Plug-in support)
Enabled
Vamp
(Plug-in support)
Enabled
Audio Units
(Plug-in support)
Enabled
VST
(Plug-in support)
Enabled
LV2
(Plug-in support)
Enabled
PortMixer
(Sound card mixer support)
Enabled
SoundTouch
(Pitch and Tempo Change support)
Enabled
SBSMS
(Extreme Pitch and Tempo Change support)
Enabled

Mac M2 16GB
MacOS 14.6.1

### Steps to reproduce

Open wav file and press play.

### Expected behavior

Much lower CPU usage for the application. I would typically expect around 2% or less on this computer.

### Actual behavior

40% CPU usage reported for Audacity under Activity Monitor

### Audacity Version

Audacity 3.7.4

### Operating system

macOS

### Additional context

_No response_

Contributor guide

Open the contributing guide

Research direction

No source file or test is named. Reproduce WAV playback on the reported Mac M2/macOS 14.6.1 setup and observe Audacity in Activity Monitor, comparing the idle and playback CPU figures; done means playback uses substantially less CPU and VST3 playback no longer produces broken audio.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, macos
Domain
audio-video-rtc, desktop, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.