ALaw/uLaw サンプルフォーマット ------------------------------ このドライバは ALaw/uLaw 形式のサンプルフォーマットをサポートしません。 ALaw はサウンドデバイスを OSS/Free を使ってオープンした時のデフォルト モードです。サポートのない理由は、このハードウェアがこれらのフォーマット をサポートせず、カーネルに変換ルーチンを加えるとドライバとの mmap イン ターフェースのところでコードが非常に見苦しくなってしまうためです。 xquake が mmap を使っているので、mmap は重要だと思われています :-) し、 それにどちらにしても最近は普通のアプリケーションは ALaw/uLaw を 使っていません。 手短に言うと、Sun の .au ファイルを cat my_file.au > /dev/dsp のように再生するのはうまく行きません。代わりに Chris Bagwell の sox-12.14 パッケージ (以下の URL から入手可能)にある再生スクリプトを 使えば、多くの種類のオーディオフォーマットが再生できます。このスクリ プトは自動的にオーディオフォーマットを判定して必要なら変換をします。 http://home.sprynet.com/sprynet/cbagwell/projects.html ブロッキングとノンブロッキング IO --------------------------------- OSS/Free と違って、このドライバはオープンの時だけでなく読み込みや 書き込みの時にも O_NONBLOCK ファイルフラグを有効にします。 これはサウンドドライバインターフェースをより標準的なものにするための ものです。このことで Timidity に問題があれば http://www.ife.ee.ethz.ch/~sailer/linux/pciaudio.html からパッチが入手できます(このパッチを当てても OSS/Free で動作します)。 MIDI UART --------- このドライバは ioctl がサポートされないシンプルな MIDI UART インター フェースをサポートします。 MIDI シンセサイザ ----------------- このサウンドカードはハードウェア MIDI シンセサイザを全く持っていません。 MIDI シンセサイズはソフトウェアで行わなければいけません。そのために このドライバ/サウンドカードは2つの PCM (/dev/dsp) インターフェースを サポートします。 Timidity と呼ばれるこのサウンドカードで MIDI ファイルを再生できるように する無料のソフトウェアパッケージがあります。 http://www.cgs.fi/~tt/timidity/ を見て下さい。 Thomas Sailer sailer@ife.ee.ethz.ch 日本語訳:林(hayashi884@geocities.co.jp) 1999.5.5 (Ver.0.1) ----------------------------------------------------------- (以下原文) ALaw/uLaw sample formats ------------------------ This driver does not support the ALaw/uLaw sample formats. ALaw is the default mode when opening a sound device using OSS/Free. The reason for the lack of support is that the hardware does not support these formats, and adding conversion routines to the kernel would lead to very ugly code in the presence of the mmap interface to the driver. And since xquake uses mmap, mmap is considered important :-) and no sane application uses ALaw/uLaw these days anyway. In short, playing a Sun .au file as follows: cat my_file.au > /dev/dsp does not work. Instead, you may use the play script from Chris Bagwell's sox-12.14 package (available from the URL below) to play many different audio file formats. The script automatically determines the audio format and does do audio conversions if necessary. http://home.sprynet.com/sprynet/cbagwell/projects.html Blocking vs. nonblocking IO --------------------------- Unlike OSS/Free this driver honours the O_NONBLOCK file flag not only during open, but also during read and write. This is an effort to make the sound driver interface more regular. Timidity has problems with this; a patch is available from http://www.ife.ee.ethz.ch/~sailer/linux/pciaudio.html. (Timidity patched will also run on OSS/Free). MIDI UART --------- The driver supports a simple MIDI UART interface, with no ioctl's supported. MIDI synthesizer ---------------- This soundcard does not have any hardware MIDI synthesizer; MIDI synthesis has to be done in software. To allow this the driver/soundcard supports two PCM (/dev/dsp) interfaces. There is a freely available software package that allows MIDI file playback on this soundcard called Timidity. See http://www.cgs.fi/~tt/timidity/. Thomas Sailer sailer@ife.ee.ethz.ch