From owner-freebsd-multimedia Tue Nov 30 23:20:11 1999 Delivered-To: freebsd-multimedia@freebsd.org Received: from lips.borg.umn.edu (lips.borg.umn.edu [160.94.170.50]) by hub.freebsd.org (Postfix) with ESMTP id 2C74C15A88 for ; Tue, 30 Nov 1999 23:20:03 -0800 (PST) (envelope-from cattelan@thebarn.com) Received: from thebarn.com (lupo.borg.umn.edu [160.94.170.114]) by lips.borg.umn.edu (8.9.3/8.9.1) with ESMTP id BAA20708; Wed, 1 Dec 1999 01:19:47 -0600 (CST) Message-ID: <3844CC13.3687E4EA@thebarn.com> Date: Wed, 01 Dec 1999 01:19:47 -0600 From: Russell Cattelan X-Mailer: Mozilla 4.7 [en] (X11; I; FreeBSD 4.0-CURRENT i386) X-Accept-Language: en MIME-Version: 1.0 To: wkt@cs.adfa.edu.au Cc: freebsd-multimedia@FreeBSD.ORG Subject: Re: Help ioctl()ing /dev/audio References: <199912010256.NAA06269@henry.cs.adfa.edu.au> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-multimedia@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Warren Toomey wrote: I would talk a look at the elightenment sound daemon. (esd) ... ports/audio/esound > Hi all, > I've just joined the multimedia list, but have searched/browsed > thru the back-issues to find an answer with no luck. > > I want to encode 16-bit mono/stereo audio (at different samplerates) > on the fly using Lame (http://www.sulaco.org/mp3/). Lame can read > raw PCM data from standard input and save as an MP3 file. > > However, running lame [options] < /dev/audio isn't going to work, because > I'll need to issue the correct ioctls to the sound device. I'm thinking of > writing a front-end C program which does: > > - reads cmd-line args, works out sound format required > - opens /dev/audio > - issues appropriate ioctl()s to /dev/audio > - closes file descriptor 0 > - dup2()s /dev/audio down to file descriptor 0 > - closes /dev/audio > - execs Lame with the original cmd-line args > > However, I'm having a damn hard time trying to find the correct ioctls > to issue to /dev/audio, or even if I should be using /dev/dsp instead. > I'm running FreeBSD-3.2 with the following kernel options: > > # css: Crystal Sound System (CSS 423x PnP) > controller snd0 > device css0 at isa? port 0x534 irq 5 drq 1 flags 0x08 vector adintr > > and the device works fine. Could somebody point me at the right place > to find the right ioctls to set up: sample rate, stereo/mono etc. > I've found machine/sound.h to be extremely confusing. > > Many thanks in advance! > > Warren > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-multimedia" in the body of the message -- Russell Cattelan cattelan@thebarn.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-multimedia" in the body of the message