Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[macos] High CPU usage in 'coreaudiod' while pianobar is running #692

Open
bhartshorn opened this issue Feb 21, 2020 · 1 comment
Open
Labels

Comments

@bhartshorn
Copy link

Subject of the issue

CPU usage of coreaudiod process sits at 6.5-8% while pianobar is running. CPU usage of this process drops to 0.0% on the same machine when pianobar is closed. While writing this issue, I noticed this is normal behavior for audio output on MacOS. It would be good if the audio device was released when playback is paused.

Your environment

  • pianobar version: 2019.02.14, installed via homebrew
  • macos 10.15.2 - MacBook Pro (15-inch, 2018)
  • ffmpeg
> brew info ffmpeg
ffmpeg: stable 4.2.2 (bottled), HEAD
  • libav:
> brew info libav
libav: stable 12.3 (bottled), HEAD
  • libao:
> brew info libao
libao: stable 1.2.2 (bottled), HEAD
  • config (uncommented lines, sans creds):
ban_icon =  �[37m</3�[0m
love_icon =  �[31m<3�[0m
tired_icon =  �[36mzZ�[0m
format_nowplaying_song = �[32m%t�[0m by �[34m%a�[0m on �[35m%l�[0m�[31m%r�[0m%@%s
format_nowplaying_station = Station �[31m%n�[0m
format_msg_info = (i) �[33m%s�[0m
format_msg_time = #  �[31m %s�[0m

Steps to reproduce

Should reproduce on any recent version of macos, I've noticed the problem for quite a while, but just narrowed it down to pianobar. The behavior persists even when playback is paused, any time pianobar is open. (I tend to just leave it open but paused)

Expected behaviour

I tested the Apple Music app, coreaudiod has similar CPU usage while it is playing audio. It seems this is 'normal' when an application is using the audio device. However, when playback is paused in Music, coreaudiod usage returns to 0, unlike pianobar.

Actual behaviour

It seems pianobar (probably libao?) holds the audio device open, possibly outputting silence, while playback is paused, thus keeping CPU usage of the audio daemon high.

I realize this might be an upstream issue with libao, but I wanted to make you aware. Thanks for maintaining this awesome software.

@PromyLOPh PromyLOPh added the bug label Feb 21, 2020
@PromyLOPh
Copy link
Owner

PromyLOPh commented Feb 21, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants