Running test files in PhatBeat


#1

How should I run test files located in /Pimoroni/phatbeat/test ? Running “speaker-test -c2 -t wav” in terminal, I get"
speaker-test 1.1.3

Playback device is default
Stream parameters are 48000 Hz, S16_LE, 2 channels
WAV file(s)
Playback open error: -16,Device or resource busy
"
Running “python test.py” I think behave as expected.

On boot my setup RPi0W & phatbeat runs under Stretch Lite sept 7. and starts playing my preprogrammed streaming service correctly. Does this prevent running the tests ? Can i kill the streaming service ?

This question is also applicable with SpeakerpHat

I am just curious to understand these marvelous devices…


#2

What service are you using for streaming? It’s highly likely that it will grab exclusive hold of the output device, and prevent things like speaker-test or any other direct audio-output working.

This is normal, since ALSA does not by default support mixing multiple streams on digital output devices. You can fix this using intermediate software such as the dmix plugin for ALSA, or pulseaudio but in your case you’re likely only ever going to want the one output stream- so stopping the audio streamign service for your tests, and then restarting it, would be the best approach.


#3

Yes, I am listening to http://bonk.solutions:3699/3699.ogg or http://mediau.yle.fi/livevega. Uncommenting these I can run the speaker-test.

Thanks


#4

No problem! Happy hacking!