From owner-freebsd-questions Tue Jun 24 15:23:44 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id PAA10670 for questions-outgoing; Tue, 24 Jun 1997 15:23:44 -0700 (PDT) Received: from glacier.wise.edt.ericsson.se (glacier-ext.wise.edt.ericsson.se [193.180.251.38]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id PAA10664 for ; Tue, 24 Jun 1997 15:23:41 -0700 (PDT) Received: from erlang (erlang.ericsson.se [147.214.36.16]) by glacier.wise.edt.ericsson.se (8.7.5/8.7.3/glacier-0.9) with SMTP id AAA17683 for ; Wed, 25 Jun 1997 00:23:35 +0200 (MET DST) Received: from townsend.ericsson.se by erlang (SMI-8.6/LME-2.2.4) id AAA25775; Wed, 25 Jun 1997 00:23:34 +0200 Received: from townsend by townsend.ericsson.se (SMI-8.6/client-1.5) id AAA21442; Wed, 25 Jun 1997 00:24:06 +0200 Message-Id: <199706242224.AAA21442@townsend.ericsson.se> To: freebsd-questions@FreeBSD.ORG cc: kent@erlang.ericsson.se Subject: How to make FreeBSD output sound? Reply-To: kent@erlang.ericsson.se X-Mailer: Mew version 1.70 on Emacs 19.34.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Wed, 25 Jun 1997 00:24:05 +0200 From: Kent Boortz Sender: owner-questions@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk I have a portable with built in SoundBlaster Pro compatible (ESS) sound card. Seems to work. I can do % cat somesound.au > /dev/audio and it is output to the speaker. But I can't find any documentation *how* to work with sound on FreeBSD. - Are there any other devices that I can use to play sampled sound (not MIDI)? What file format? - How about different sample frequences? Do I need to configure the device? If so, how? I have a C program that works on a SparcStation that write small sound samples to the "/dev/audio" with "write()". Problem is when I run it under FreeBSD it don't output any sound directly when it is written. It seem to buffer it for a while until it got some more data and then output it to the speaker. To my knowledge "write()" is unbuffered (The only call I could find that flushes a write on a file descriptor was "fsync()" so I tried it just in case but it didn't help). Do you know what is going on? Any pointers to documentation? It may be the case that I lack the basic understanding on devices and device configuration. Any pointers? /kgb