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

sound command is not working #46

Open
Snirivasa opened this issue May 12, 2024 · 8 comments
Open

sound command is not working #46

Snirivasa opened this issue May 12, 2024 · 8 comments

Comments

@Snirivasa
Copy link

It seems that the sound command is not working.
It produces no sound even if executes from multiples OS with diverse Ocaml installations.
Is there a specif reason or is this just a bug?

@nojb
Copy link
Contributor

nojb commented May 12, 2024

Hello, thank you for your report. However, precise reproduction instructions are needed in order to investigate any issue: what exact system are you using, how exactly did you try to use Graphics, what was the output (if any), etc.

@Snirivasa
Copy link
Author

I ran my code on VSCode which is installed on virtual machine powered by Debian.
Whenever I tried to execute the sound command, the code would compile correctly with no errors or abnormal output.
It would just not produce the sound.
I checked everything audio parameter and configuration and everything is fine.
The problem really seems to come from sound if I'm not mistaken.
Have I given enough data?

@Octachron
Copy link
Member

Did you open a graphics windows before using Graphics.sound?
How is the system bell configured in your system?
Can you hear the system bell?

@Snirivasa
Copy link
Author

I opened a graphic window before using the command.
I can hear the bell if testing the sound with speaker-test tests this parameter.
How can I check the bell configuration if it's not this?

@Octachron
Copy link
Member

As far as I can see speaker-test does not have an option to test the system bell?
You can try

echo -e "\a"

in a terminal.
However, it is important to note that Graphics.sound is not really a useful function; and I would be in fact in favor to deprecate it.

@xavierleroy
Copy link
Contributor

Graphics.sound might still work under Windows, but the X11 implementation based on XBeep seems to have stopped working a while ago. With Ubuntu 22.04 and with macOS, I get a standard terminal beep, but pitch and duration are ignored.

@xavierleroy
Copy link
Contributor

(For Ubuntu: remember to un-mute "System Sounds" in the Sound settings.)

@Snirivasa
Copy link
Author

Ok, thank you very much for your answers !
I took into account what you said. However, I confirm definitively that it's not working for Debian...
If Graphics.sound is not working, I'll, maybe, search for another solution if it exists.
Thanks

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

No branches or pull requests

4 participants