Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Apr 2011 13:08:56 -0700
From:      John W <>
To:        freebsd-questions <>
Subject:   Forcefully change a program's volume
Message-ID:  <>

Next in thread | Raw E-Mail | Index | Archive | Help

I'm aware that in FreeBSD 8+ there is the VPC (Volume Per Channel)
feature which allows separate programs to have separate sound volumes.

But suppose there is a (bad) program that does not let me control its
volume from within its interface.
Is there a way for me to control it at the OS level?

In other words, I'm trying to perform these steps:

    Given the program X:
    1) Find out what channel(s) X is using
    2) Forcibly modify the VPC settings for those channels

Is it possible?
I realize there are probably issues where if X opens/closes new
channels on the fly it might be hard to keep track of, but is the
underlying support even there?

I imagine if I can open the appropriate device, I can use the
SNDCTL_DSP_SETPLAYVOL ioctl. But how do I open the appropriate device?


Want to link to this message? Use this URL: <>