From owner-freebsd-multimedia Tue Mar 17 09:33:49 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id JAA03186 for freebsd-multimedia-outgoing; Tue, 17 Mar 1998 09:33:49 -0800 (PST) (envelope-from owner-freebsd-multimedia@FreeBSD.ORG) Received: from wo-ppp1.cs.titech.ac.jp (26.gate7.tokyo.att.ne.jp [165.76.17.138]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id JAA03180 for ; Tue, 17 Mar 1998 09:33:45 -0800 (PST) (envelope-from nagao@cs.titech.ac.jp) Received: from localhost by wo-ppp1.cs.titech.ac.jp (8.8.8/3.6W) id CAA03206; Wed, 18 Mar 1998 02:33:39 +0900 (JST) To: accel@pacific.net.sg Cc: multimedia@FreeBSD.ORG Subject: Re: pcaudio volume In-Reply-To: Your message of "Mon, 16 Mar 1998 16:06:19 +0800" References: X-Mailer: xcite1.20> Mew version 1.93b25 on Emacs 19.34 / Mule 2.3 (SUETSUMUHANA) Mime-Version: 1.0 Content-Type: Multipart/Mixed; boundary="--Next_Part(Wed_Mar_18_02:31:19_1998_542)--" Content-Transfer-Encoding: 7bit Message-Id: <19980318023337U.abtk@wo-ppp1.cs.titech.ac.jp> Date: Wed, 18 Mar 1998 02:33:37 +0900 (JST) From: NAGAO -abtk- Tadaaki X-Dispatcher: imput version 980302 Lines: 63 Sender: owner-freebsd-multimedia@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org ----Next_Part(Wed_Mar_18_02:31:19_1998_542)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi, In message , accel@pacific.net.sg (Richard Goh) wrote: [pcaudio's volume is so low] > Is there a way to set the volume or any documentation on this. I have tried > the handbook, faq and the archives without much luck. Here attached a simple sample code to set the volume. Try to save it as "pcavolume.c", compile it and use, for example: ./pcavolume 500 (though the message in the code says that volume must be 0-100, much larger values can actually be specified.) Still low? Then try 1000, 2000 ..., as large as can be stored into "int". :-) ps. I'd like to recommend you to buy a sound card and use it instead of pcaudio which uses your "beep" hardware. (The "beep" hardware is not designed for high-quality audio sounds :-) Cheers, -- Tada NAGAO Tadaaki ----Next_Part(Wed_Mar_18_02:31:19_1998_542)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Description: pcavolume.c #include #include #include #include #include int main(int argc, char **argv) { int fd; audio_info_t ainfo; if (argc < 2) errx(1, "specify volume(0-100)"); AUDIO_INITINFO(&ainfo); ainfo.play.gain = atoi(argv[1]); if ((fd = open("/dev/pcaudioctl", O_RDONLY, 0)) < 0) err(1, "/dev/pcaudioctl"); if (ioctl(fd, AUDIO_SETINFO, &ainfo) < 0) err(1, "AUDIO_SETINFO"); return 0; } ----Next_Part(Wed_Mar_18_02:31:19_1998_542)---- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-multimedia" in the body of the message