I’m trying to get PiMusicbox v0.5.2 working with the PiTFT resistive screen. Followed the instructions from:
Everything seems to work (I’m doing this on a remote location, no USB-DAC attached at the PiMUSICBOX) but as soon as I connect the USB Audio DAC I get the error:
ERROR GStreamer error: state change failed and some element failed to
post a proper error message with the reason for the failure.
Debug message: gstplaysink.c(1899): gen_audio_chain ():
The display and the pmb-pitft script (ui.py) still work, but no sound…
Can anyone help me or point me in the right direction?
There was a similar case in another extension that also uses pygame. It seems that pygame takes full control of the sound card and mopidy is not able to use it.
The solution was to add some variables. I am not sure if your problem is the same but you can try the same solution. Find in ui.py these lines
# OS enviroment variables for pitft
os.environ["SDL_FBDEV"] = "/dev/fb1"
os.environ["SDL_MOUSEDEV"] = "/dev/input/touchscreen"
os.environ["SDL_MOUSEDRV"] = "TSLIB"
After those lines add:
os.environ["SDL_AUDIODRIVER"] = "disk"
os.environ["SDL_PATH_DSP"] = "/dev/null"
I had read the tread but lost track of what the problem and what the solution was…
I have now added the two lines and it works!!!
Thank you so much for helping