lukasjapan / bt-speaker

A simple Bluetooth Speaker Daemon for the Raspberry Pi 3
GNU General Public License v3.0
495 stars 95 forks source link

open audio device only when used #18

Open gpancot opened 7 years ago

gpancot commented 7 years ago

thanks for the great job! I installed it successfully on my i686 pc (codec use PLATFORM = mmx). it is possible to open audio device only when used? when bt device is connect and play?

lukasjapan commented 7 years ago

Great to hear it works on a desktop machine too. I haven't tried that yet.

Not sure if that would make things better, as it would introduce latency (and there is a pseudo hardware mixer at least on the pi that make things work smooth).

I would suggest to change the play command to something else than aplay in your case, if blocking the sound card is your main concern.

gpancot commented 7 years ago

do you have any idea what I can use instead of aplay not to block the card?

lukasjapan commented 7 years ago

As far as I know, the state of the art is to use a more sophisticated sound daemon/solution like pulseaudio or jack. That should also be the most comfortable way on desktop machines.

I think alsa also has some configuration settings to setup software mixing but I have never succeeded in making it work. Maybe I just didn't try hard enough.