TatriX / pomidor

Pomidor is a simple and cool pomodoro technique timer.
239 stars 17 forks source link

Use a dedicated emacs daemon for playing sounds #31

Closed juergenhoetzel closed 3 months ago

juergenhoetzel commented 4 years ago

I experienced stuttering sound and sometimes the UI was lagging on a slow device. Using a dedicated daemon fixes this issue for me.

TatriX commented 4 years ago

Thanks for the PR! I'm getting

Error running timer ‘play-sound-file’: (error "No usable sound device driver found")

in the pomidor server.

Also it seems that running server will stay in the background, even if you close *pomidor* buffer or Emacs itself.

I think we can add this as a new function so those who need it can customize pomidor-play-sound-file to use it.

juergenhoetzel commented 4 years ago

Error running timer ‘play-sound-file’: (error "No usable sound device driver found")

What system do you have? On GNU/Linux Emacs uses alsa and most distributions use a pulseaudio config for alsa:

cat /etc/asound.conf 
# Use PulseAudio by default
pcm.!default {
  type pulse
  fallback "sysdefault"
  hint {
    show on
    description "Default ALSA Output (currently PulseAudio Sound Server)"
  }
}

ctl.!default {
  type pulse
  fallback "sysdefault"
}

# vim:set ft=alsaconf:

and thus has the ability to synchronize multiple playback streams.

in the pomidor server.

Also it seems that running server will stay in the background, even if you close *pomidor* buffer or Emacs itself.

Good catch! I think we can add this as a new function so those who need it can customize pomidor-play-sound-file to use it. :+1: