Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Control all devices? #48

Open
WhyNotHugo opened this issue Jun 17, 2017 · 2 comments
Open

Control all devices? #48

WhyNotHugo opened this issue Jun 17, 2017 · 2 comments

Comments

@WhyNotHugo
Copy link

I'd like to mute/unmute all microphones together (the same applies to volume control, etc).

Right now, this does not seem to be trivially possible. I need to wrap ponymix and:

  • run ponymix list-cards-short --source
  • for each card listed, run ponymix -c $CARD --source mute

An --all-cards flag that does this (rather than just work on the default one) would be really really useful.

@WhyNotHugo
Copy link
Author

WhyNotHugo commented Aug 26, 2018

I'm using this bash script as a workaround, for anybody interested.

#!/bin/sh

set -x
set -e

if [ -z $1 ]; then
  true
elif [ $1 == decrease ]; then
  COMMAND="decrease 3"
elif [ $1 == increase ]; then
  COMMAND="increase 3"
elif [ $1 == min ]; then
  COMMAND="set-volume 0"
elif [ $1 == max ]; then
  COMMAND="set-volume 100"
elif [ $1 == toggle ]; then
  COMMAND="toggle"
else
  echo "Bad argument"
  exit -1
fi

if [ -z "$COMMAND" ]; then
  true  # No command to run
else
  for dev in $(ponymix --sink --short list | cut -f 3); do
    ponymix -d $dev $COMMAND
  done
fi

@mindrunner
Copy link

For me, your script mutes all sinks. To mute all sources (microphones), I use:

for dev in $(ponymix --source --short list | cut -f 3); do
  ponymix --source -d $dev mute
done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants