Re: [racket-users] Fix linux (play-sound) sound output as aplay does not work, swap for something else
Woops so I left: (put-preferences '(GRacket:playcmd) '("mpv --no-audio-display ~a")) which changes it to use mpv instead. This fixes the issue but nonetheless we should fix this out of the box and have it not look for aplay first On Tuesday, August 24, 2021 at 12:31:27 PM UTC-7 hen...@topoi.pooq.com wrote: > On Tue, Aug 24, 2021 at 12:19:25PM -0700, jest array wrote: > > https://github.com/racket/gui/issues/239 > > > > So this does not work on both Arch Linux with prebuilt racket binaries > and > > Debian with built from source binaries(according to a user JSGRANT on > the > > racket discord server > > > https://discord.com/channels/571040468092321801/618895179343986688/879797867903057921 > ): > > Ten years ago I remarked that audio on Linux is a black art. Ten years > later, it is still a back art. > > -- hendrik > -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/0185a27c-092f-4e98-855a-66cc9b4d39a5n%40googlegroups.com.
Re: [racket-users] Fix linux (play-sound) sound output as aplay does not work, swap for something else
On Tue, Aug 24, 2021 at 12:19:25PM -0700, jest array wrote: > https://github.com/racket/gui/issues/239 > > So this does not work on both Arch Linux with prebuilt racket binaries and > Debian with built from source binaries(according to a user JSGRANT on the > racket discord server > https://discord.com/channels/571040468092321801/618895179343986688/879797867903057921): Ten years ago I remarked that audio on Linux is a black art. Ten years later, it is still a back art. -- hendrik -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/20210824193121.u7nlsexsiayl2j6b%40topoi.pooq.com.
[racket-users] Fix linux (play-sound) sound output as aplay does not work, swap for something else
https://github.com/racket/gui/issues/239 So this does not work on both Arch Linux with prebuilt racket binaries and Debian with built from source binaries(according to a user JSGRANT on the racket discord server https://discord.com/channels/571040468092321801/618895179343986688/879797867903057921): ``` #lang racket (require 2htdp/image (only-in racket/gui/base play-sound)) (put-preferences '(GRacket:playcmd) '("mpv --no-audio-display ~a")) ; https://upload.wikimedia.org/wikipedia/commons/5/5d/Nl-honk.ogg (play-sound "./Nl-honk.ogg" #t) ``` because of this: https://github.com/racket/gui/blob/8aca4a224e887175975315895a42dd05b2d9ce77/gui-lib/mred/private/misc.rkt#L79 It uses `aplay` first to try and play the sound but according to this: https://unix.stackexchange.com/questions/363176/ogg-audio-file-and-aplay-white-noise > You cannot decode ogg files with aplay. According to the man page, the only formats aplay understands are voc, wav, raw and au. My guess is that aplay interprets the ogg file as raw data, hence the white noise. so I suggest swapping the order to `sndfile-play` or whichever command line audioplayer is available on most linux installations. A side issue is that we should probably provide an easier way to import `play-sound` because I want to use it with 2htdp/image with students. -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/3d8d52e7-931b-4a89-938d-01982cf4f3ben%40googlegroups.com.