pydoro
pydoro copied to clipboard
[BUG] No sound for OpenBSD
Describe the bug No sound using Pydoro using OpenBSD
To Reproduce pydoro --audio-test OR pydoro
Expected behavior expected to play sound
Desktop (please complete the following information):
- OS: OpenBSD
- Version 7.1
Additional context I am pretty sure the solution is to add to the sound.py under platforms. I will try to create a pull request to fix this for openbsd under fallback. There is probably another library to use in OpenBSD as OpenBSD does not use linux utilites like ALSA, pulse audio, jack, etc. (im pretty sure the linux version uses alsa). Since OpenBSD uses sndio, I will see if there is a related python library.
Can you try installing pygame to virtual environment, it will use it if it's available. 👍🏽 (If that works just change it in README to indicate that for both Linux/BSD can work with pygame)
If you like to send a PR, add the necessary audio libraries to setup.py as well. 👍🏽
pygame will not install automatically because of dependency issues. I tried manually compiling pygame. An issue faced was that it did not recognize camera libraries and did not build; however I removed the camera dependencies and was able to build pygame (commented pygame/build/Setup_Unix.in) (also using the auto option which skips over dependencies not found)
Sound still does not work with pygame though. Pydoro still runs, but with some warnings. I am gonna try adding a platform to sound.py instead
python3.9:/usr/local/lib/python3.9/site-packages/pygame-2.1.3.dev5-py3.9-openbsd-7.1-amd64.egg/pygame/rwobject.cpython-39.so: undefined symbol 'lseek64'
@yuuwe-n do you know of any library that works with OpenBSD? I'm not using BSD at the moment and do not have much experience in that :( Anyway send a PR if you can get it working 👍🏽
It seems that pydub works as it uses ffmpeg. pydub
according to https://stackoverflow.com/questions/26387571/playing-audio-in-pydub
from pydub import AudioSegment
from pydub.playback import play
song = AudioSegment.from_wav("explosion.wav")
play(song)
allows you to play audio. But I assume this is synchronous. will need to look at an async play method..
Closing this as I do not want to support OpenBSD.