mordak / Term48

50 stars 20 forks source link

Play a beep (sound) #10

Open schef opened 8 years ago

schef commented 8 years ago

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

mordak commented 8 years ago

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.

schef commented 8 years ago

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.

idispatch commented 8 years ago

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 notifications@github.com 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 commented 8 years ago

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

karawitan commented 5 years ago

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