-
-
Notifications
You must be signed in to change notification settings - Fork 71
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
Fix linux(and windows) sound output as aplay does not work, swap for something else #239
Comments
That doesn't sound right (pun not intended). gui/gui-lib/mred/private/misc.rkt Line 77 in 8aca4a2
says that if |
@sorawee yes, I am sure, for both .ogg and .wav files(it should support wav files but not the one i have apparently) aplay_sound_error.mp4 |
That's not what I meant. I understand that |
OHH i forgot to remove that line ! thought I did.... yeah, if i set it to mpv or sndfile-play it works fine, nonetheless we should fix this not using aplay out of the box |
FWIW my (mostly) default Ubuntu and Xubuntu desktop systems do not have |
|
Try `paplay` before other defaults, and fix problems with ports and closing. Related to #239
I've pushed some repairs, including making As far as I can tell, ".ogg" files just aren't supported (without installing something extra?) on Windows, and that's the error that the MCI layer reports for a ".ogg" file. |
So I tried playing a .wav file and I'm getting:
Which is strange because I have nothing thats playing audio atm nor did I open any audio applications. I tried a fresh reboot and still no luck. It's probably unrelated to the .wav file but in case you want try it: https://opengameart.org/sites/default/files/vgmenuselect.wav
Can anyone else produce on Windows 10 on the May 2021 update(21h1) ? |
According to: https://en.wikipedia.org/wiki/Media_Control_Interface so it might come up again, let's just hope windows 11 doesn't phase it out completely. I think microsoft is generally ok at backwards compatibility though. I might look into writing bindings to https://github.com/mackron/miniaudio , single file C header library that's crossplatform EDIT: Someone said MCI really only works with 16bit wav files and not 32bit, among a few other formats. |
alright closing, MCI works with mp3 but some wav files don't work. for those using gui/play-sound on windows may need to be updated to use direct sound or something in the future.. re-open if you'd like |
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):
because of this:
gui/gui-lib/mred/private/misc.rkt
Line 79 in 8aca4a2
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
so I suggest swapping the order to
sndfile-play
or whichever command line audioplayer is available on most linux installations.A second issue that crops up is when i try to re-run the file and play the sound again I get the following and it wont go away until i restart racket:
UPDATE: Playing sound also doesn't work on more recent versions of windows, see comments below
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.The text was updated successfully, but these errors were encountered: