Term48 icon indicating copy to clipboard operation
Term48 copied to clipboard

Play a beep (sound)

Open schef opened this issue 8 years ago • 5 comments

Is it possible? I would want to try to write a simple app in python.

schef avatar Jan 07 '16 22:01 schef

Term48 implements the terminal BEL character as a screen flash, and doesn't make the system audibly beep. Linking to the audio system should be doable from python though, but I am not familiar with how to do it myself. Most of the stuff I found on the topic point to winsound (Windows only) or suggest printing a BEL character, which will just make Term48 flash the screen.

mordak avatar Jan 07 '16 23:01 mordak

Ok..i tried to cat something to /dev/snd/* but i had permission denied. I installed pyglet and tried loading a wav file but i got some other riffformat error. I will try something more.

schef avatar Jan 07 '16 23:01 schef

Please try https://github.com/blackberry/Core-Native-Community-Samples/tree/master/ToneGenerator/src https://github.com/blackberry/Core-Native-Community-Samples/tree/master/ToneGenerator/src

For Python, it should be possible to make python extension wrapping ALSA.

On Jan 7, 2016, at 18:03, schef [email protected] wrote:

Ok..i tried to cat something to /dev/snd/* but i had permission denied. I installed pyglet and tried loading a wav file but i got some other riffformat error. I will try something more.

— Reply to this email directly or view it on GitHub https://github.com/mordak/Term48/issues/10#issuecomment-169834841.

idispatch avatar Jan 07 '16 23:01 idispatch

This works too: https://github.com/idispatch/SDL_mixer I use it in https://github.com/idispatch/toppler

idispatch avatar Jan 07 '16 23:01 idispatch

Hi,

you may play any sound easily through Term48 using lib-nixtla-audio, based on OpenAL; https://github.com/nicaraguabinary/lib-nixtla-audio

I had to make some very slight ajustments to have it compile for bb10 https://github.com/berryamin/lib-nixtla-audio/tree/compile_on_ElCapitan_for_bb10

karawitan avatar Sep 01 '18 00:09 karawitan