shichao-an / soundmeter

Simple real-time sound meter
https://soundmeter.shichao.io
BSD 2-Clause "Simplified" License
82 stars 27 forks source link

non-exclusive access for alsa #34

Open maniac0r opened 2 years ago

maniac0r commented 2 years ago

Please would it be possible to allow other applications still use the same microphone when soundmeter is running Currently it seems it's having exclusive access to audio input it's working on:

arecord -f S16_LE -d 20 -r 44100 -D hw:1,0 /dev/shm/test2.wav arecord: main:828: audio open error: Device or resource busy

When I stop soundmeter , acrecord works just fine.

Raspbian 10 / alsa-base 1.0.27+1 / alsa-utils 1.1.8-2

lsusb | grep Audio Bus 001 Device 004: ID 0d8c:0014 C-Media Electronics, Inc. Audio Adapter (Unitek Y-247A)

arecord -l List of CAPTURE Hardware Devices card 1: Device [USB Audio Device], device 0: USB Audio [USB Audio] Subdevices: 0/1 Subdevice #0: subdevice #0