unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Björn Bidar" <bjorn.bidar@thaodan.de>
To: emacs-devel@gnu.org
Subject: Re: `play-sound-file', no mp3 support, sets global volume w/o reset
Date: Sun, 22 Sep 2024 15:19:04 +0300	[thread overview]
Message-ID: <44962.2410976858$1727007625@news.gmane.org> (raw)
In-Reply-To: <878qvyqtqs.fsf@dataswamp.org> (Emanuel Berg's message of "Wed, 11 Sep 2024 14:07:07 +0200")

Emanuel Berg <incal@dataswamp.org> writes:

>> But play-sound-file has another problem, namely, if you do
>> e.g.
>>
>>   (play-sound-file (file-name-concat bad-dir "data" "up.au") 0.4)
>>
>> it sets the global volume to 40% and worse, after it is
>> done, it isn't reset.

> Also, another bad thing is that the command monopolizes
> execution. I know Elisp is single-threaded and the idle timer
> and C threads don't change that, but what about
> a child process?


I recently looked into this as I wanted to play a sound when sending a
notification in Emacs.

There's package that implements a async play-sound using the async
package:
https://github.com/jcs-elpa/sound-async/blob/master/sound-async.el#L43



      parent reply	other threads:[~2024-09-22 12:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-04 21:52 `play-sound-file', no mp3 support, sets global volume w/o reset Emanuel Berg
2024-09-11 12:07 ` Emanuel Berg
2024-09-11 20:43   ` Stefan Kangas
2024-09-12  4:50     ` Emanuel Berg
2024-09-22 12:19   ` Björn Bidar [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='44962.2410976858$1727007625@news.gmane.org' \
    --to=bjorn.bidar@thaodan.de \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).