Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Auto select/mute the rest GQRX/dsd multiple radios[SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
zeronullity
Tux's lil' helper
Tux's lil' helper


Joined: 16 Oct 2010
Posts: 103

PostPosted: Thu Oct 16, 2014 7:36 pm    Post subject: Auto select/mute the rest GQRX/dsd multiple radios[SOLVED] Reply with quote

I was wondering if there is a easy way to auto select audio from one process and mute the rest..
and once the process is done playing sound it goes to the next available process that is playing sound and
mutes the rest non-stop. Some thing that can do this quickly and efficiently.. that way there is not 2+ streams playing at once?

btw - I'm currently using phonon + pulseaudio


Last edited by zeronullity on Tue Oct 21, 2014 12:37 am; edited 2 times in total
Back to top
View user's profile Send private message
keet
Guru
Guru


Joined: 09 Sep 2008
Posts: 571

PostPosted: Thu Oct 16, 2014 8:20 pm    Post subject: Reply with quote

With Pavucontrol, you can adjust volume separately for each program, but I am not sure what could do the rest of what you want.
Back to top
View user's profile Send private message
zeronullity
Tux's lil' helper
Tux's lil' helper


Joined: 16 Oct 2010
Posts: 103

PostPosted: Thu Oct 16, 2014 9:10 pm    Post subject: Reply with quote

Manual adjustment is not a option. (can do that now with pulseaudio)
I'm using gqrx and tired of having to adjust volumes from multiple radios all the time.
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3846
Location: Austro Bavaria

PostPosted: Fri Oct 17, 2014 12:19 pm    Post subject: Reply with quote

sounds like the old gnu linux behavour when mixing was not available.

just kick out pulseaudio and any other stuff and just keep alsa. you may get your desired behaviour. Though oyu need to gurantee that the process who used alsa completly gives up the sound device after it finished.
Back to top
View user's profile Send private message
zeronullity
Tux's lil' helper
Tux's lil' helper


Joined: 16 Oct 2010
Posts: 103

PostPosted: Fri Oct 17, 2014 4:09 pm    Post subject: Reply with quote

tw04l124 wrote:
sounds like the old gnu linux behavour when mixing was not available.

just kick out pulseaudio and any other stuff and just keep alsa. you may get your desired behaviour. Though oyu need to gurantee that the process who used alsa completly gives up the sound device after it finished.


I thought about that, but don't think it will work correctly.. I was thinking some sort of pulseaudio script might work.
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3846
Location: Austro Bavaria

PostPosted: Fri Oct 17, 2014 5:53 pm    Post subject: Reply with quote

it helps when you can explain your certain use case why you need that in teh first place.

i think a box without anything except alsa does teh job when you can guarantee which sound process runs first, which you should handle by the script. so when the desired software runs it blocks the soundoutput source and therefore no second software can use it, when that process ends you need to ensure that the device for sound is freed which is sometimes not done => points at microsoft skype for example
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Fri Oct 17, 2014 9:09 pm    Post subject: Reply with quote

I understand what you're asking for - something like the solo button in Audacity but automated. module-role-cork does something vaguely like that. It might be possible to configure (or hack the source up) to do the right thing. Haven't tried though.
Back to top
View user's profile Send private message
zeronullity
Tux's lil' helper
Tux's lil' helper


Joined: 16 Oct 2010
Posts: 103

PostPosted: Sat Oct 18, 2014 2:23 pm    Post subject: Reply with quote

tw04l124 wrote:
it helps when you can explain your certain use case why you need that in teh first place.

i think a box without anything except alsa does teh job when you can guarantee which sound process runs first,
which you should handle by the script. so when the desired software runs it blocks the soundoutput source and
therefore no second software can use it, when that process ends you need to ensure that the device for sound is
freed which is sometimes not done => points at microsoft skype for example


I think I was clear when I said it was for gqrx for use with multiple radios.. i.e. multiple software defined radios
listening to multiple frequencies at a time.. Sure I can simply record the output to a wave file and listen to it later..
but for live monitoring I would like it to listen to one frequency at a time so it doesn't get garbled with 5 live transmission
at a time. And there is no trunk tracking or digital voice software for linux unless you run it on a virtual environment such
as wine or vmware.. even then it has it's limitations. I also would like to keep phonon/pulseaudio if possible and not have to
switch to something like alsa.
Back to top
View user's profile Send private message
zeronullity
Tux's lil' helper
Tux's lil' helper


Joined: 16 Oct 2010
Posts: 103

PostPosted: Tue Oct 21, 2014 12:33 am    Post subject: Reply with quote

I came up with a application specific solution on my own which is almost better than what I was requesting.

I disabled sound device output in dsd with option "-n" then save the mbe data files to a directory using the option "-d".
Then using a infinite loop script.. I have dsd playback the mbe data files and then move them to a backup
directory when done.. In a non-stop loop, that way everything is played almost live with only slight delay and everything is played in order from radio to radio.

Although it would be nice to have a analog solution for gqrx.. I'm happy with the dsd [digital voice] solution, works perfectly.


I have 2 bash scripts one to record & one to play.. script can be changed to add or delete radios... may expand it later to do trunk tracking.

dsdrec.sh
------ bash script starts here ---------


echo "Enter SDR1 tuned frequency followed by [ENTER]:"
read freq1
echo "Enter SDR2 tuned frequency followed by [ENTER]:"
read freq2
echo "Enter SDR3 tuned frequency followed by [ENTER]:"
read freq3
echo "Enter SDR4 tuned frequency followed by [ENTER]:"
read freq4

#run multiple subshells, if dsd dies do to bugs in P25 decoder respawn dsd.

(
until dsd -q -n -d SDR1-$freq1- -i <(nc -ul -p 7350); do
echo "dsd SDR1 crashed with exit code $?. Respawning.." >&2
sleep 1
done
)&

(
until dsd -q -n -d SDR2-$freq2- -i <(nc -ul -p 7351); do
echo "dsd SDR2 crashed with exit code $?. Respawning.." >&2
sleep 1
done
)&

(
until dsd -q -n -d SDR3-$freq3- -i <(nc -ul -p 7352); do
echo "dsd SDR3 crashed with exit code $?. Respawning.." >&2
sleep 1
done
)&

(
until dsd -q -n -d SDR4-$freq4- -i <(nc -ul -p 7353); do
echo "dsd SDR4 crashed with exit code $?. Respawning.." >&2
sleep 1
done
)&


------ bash script ends here ---------

dsdplay.sh
------ bash script starts here ---------

mkdir -p backup
sleeptime=30

while :
do

files1=$(ls SDR1-*)
files2=$(ls SDR2-*)
files3=$(ls SDR3-*)
files4=$(ls SDR4-*)
echo $files1 $files2 $files3 $files4

sleep $sleeptime

if [ ! -z "$files1" ]
then
dsd -r $files1
fi


if [ ! -z "$files2" ]
then
dsd -r $files2
fi

if [ ! -z "$files3" ]
then
dsd -r $files3
fi

if [ ! -z "$files4" ]
then
dsd -r $files4
fi

sleep 2

mv -t backup $files1 $files2 $files3 $files4

done


------ bash script ends here ---------
Back to top
View user's profile Send private message
minskpower
Tux's lil' helper
Tux's lil' helper


Joined: 16 Jun 2005
Posts: 94
Location: /dev/null

PostPosted: Tue Nov 25, 2014 11:30 am    Post subject: Reply with quote

Just saw this. Posting in case someone else might need to do something similar.

Seems to me like you are over complicating your setup. If you need to use gqrx and dsd, there is no need to run them separately.
Gqrx-digital is a fork of gqrx based on the gr-dsd module (which is a gnuradio module based on a modified version of dsd). Gqrx-digital integrates dsd seamlessly and allows you to listen to digital signals without doing anything special.
About having multiple receivers running at the same time: that can also be done entirely inside gqrx since it's based on gnuradio. So you can have as many receivers as you want, provided you have enough computing power and the signals fit within the sampling bw of the receiving hardware.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum