I use some software to capture audio and send it along to another server in MP3 format... working great... what I need to be able to do is
ENCODE this stream
AND
Then based on some even triggers RECORD one of the inputs under Python (if I can find a library that does it in MP3 format) or via BASH if I have to called from a Python program ie: arecord (options) myaudio.wav then feed to LAME or ffmpeg to turn it into MP3 (or again if there is a direct way to do it via Python or BASH with out the ffmpeg/LAME layer... I am all ears...)...
BUT
Trying this on the test setup results in:
trying to record either plugin via arecord or anything else seems to be "blocked?"
[code]
arecord -d:plug:plug_onboard_right -d 20 -r 48000 -c 1 -f S32_LE Test.wav
arecord: main:682: audio open error: Device or resource busy
[/code]
Doing this on a "DESKTOP" under Kubuntu works.. same plugins... the same software is running on the desktop, and it will record the plugin in, or hw:0,0 with out issue.
I thought that maybe having another DSNOOP might solve it.. but that doesn't seem to solve it either, same error.
Any ideas??? Comments, Suggestions, Buehler?
.asoundrc below for reference....
[code]
pcm.wolfson_pi_soundcard {
type hw
card sndrpiwsp
device 0
}
pcm.softvol {
type softvol
slave {
pcm "wolfson_pi_soundcard"
}
control {
name "Master"
card 0
}
}
pcm.onboard{
type hw
card 0
}
ctl.onboard {
type hw
card 0
}
### Dsnoop both channels
pcm.dsnoop_onboard {
type dsnoop
ipc_key 32
slave {
pcm "onboard"
channels 2
period_size 320
rate 48000
buffer_size 8192
format S32_LE
}
bindings {
0 0
1 1
}
}
### Dsnoop splited channels
pcm.onboard_left {
type dsnoop
ipc_key 32
slave {
pcm "onboard"
channels 2
}
bindings.0 0
}
pcm.onboard_right {
type dsnoop
ipc_key 32
slave {
pcm "onboard"
channels 2
}
bindings.0 1
}
### PLUGS ##
### used with encoders
### device = plug:plug_onboard_left
pcm.plug_onboard_left{
type route
slave.pcm "onboard_left"
slave.channels 1
ttable.0.0 1
}
pcm.plug_onboard_right{
type route
slave.pcm "onboard_right"
slave.channels 1
ttable.0.0 1
}
pcm.plug_onboard_RECCHAN{
type route
slave.pcm "onboard_left"
slave.channels 1
ttable.0.0 1
}
[/code]