From owner-freebsd-questions@FreeBSD.ORG Thu Apr 21 20:32:33 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1293A106566C for ; Thu, 21 Apr 2011 20:32:33 +0000 (UTC) (envelope-from jwdevel@gmail.com) Received: from mail-iw0-f182.google.com (mail-iw0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id D52FB8FC0A for ; Thu, 21 Apr 2011 20:32:32 +0000 (UTC) Received: by iwn33 with SMTP id 33so104109iwn.13 for ; Thu, 21 Apr 2011 13:32:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:date:message-id:subject:from:to :content-type; bh=i5+u9RGsnASr5FQ1bdsbuuADwHM6bvw3yl9icZ11z2Q=; b=Uz/7g6v8fKNWPkR2QeuKIsXZ9aUkByLBIGwZZUuBOWFdcRfF1ezVgEQpjSotl2R7Lt sVWZN1UOHoTltc7IKWKVtQMc+FlrGZLw65i/0r4rtlh9952byoRdQN7UiQHjBafYGTFH EY81EKBZteJvK4UOnxu3lKeVC0hkziwAlfsjk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=PlNcH50dFds4gW1FTfVw1UBXGhxw+ZUCLfDfArDxsXxDmH6ZJl9M48vtMDvcdDYPfr y+ArclyffnqslRmlc5HcgvgMGGRy34rPKBtlfujstr+mYYlMSJkY0uHYXSuid4B0sajH pxR5Pn+IEhZcvh42kT0S7FM+vBOYSHDG+DCS4= MIME-Version: 1.0 Received: by 10.42.148.194 with SMTP id s2mr482162icv.126.1303416536927; Thu, 21 Apr 2011 13:08:56 -0700 (PDT) Received: by 10.42.87.195 with HTTP; Thu, 21 Apr 2011 13:08:56 -0700 (PDT) Date: Thu, 21 Apr 2011 13:08:56 -0700 Message-ID: From: John W To: freebsd-questions Content-Type: text/plain; charset=ISO-8859-1 Subject: Forcefully change a program's volume X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Apr 2011 20:32:33 -0000 Hi, 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? Thanks -John