Re: [linux-audio-dev] 8bit sound wav playing to a 16bit sound card...

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] 8bit sound wav playing to a 16bit sound card...
From: Erik de Castro Lopo (erikd-lad_AT_mega-nerd.com)
Date: Fri Jun 13 2003 - 00:19:00 EEST


On Thu, 12 Jun 2003 11:18:53 -0400
Derrick <derrick_AT_logicalsi.com> wrote:

> I'm new to OSS Programming, and I'm attempting to play some 8bit wav files.
> However OSS is telling me that my sound card will not play 8bit , only 16bit.
> If I force it. The sound changes pitch, and is very fast. ( obviously ).
>
> Is there anyway to convert 8bit to 16bit on the fly? I've noticed that XMMS
> also fails to play the 8bit wav file correctly.

You can fix this by disabling XMMS's built in WAV reader and using XMMS_Sndfile
instead:

    http://www.zip.com.au/~erikd/XMMS/

which will also allow you to play a large number of other file types.

> I've even tryed to convert the file from 8bit to 16bit using SOX. But with the
> same results. I would like to support 8bit file wavs in my program as MOST of
> the wavs available are in 8bit format...

For reading sound files from within a program libsndfile:

    http://www.zip.com.au/~erikd/libsndfile/

which is required by XMMS_Sndfile anyway. It contains an example program which
uses OSS to play back any sound file it can read.

Erik

-- 
+-----------------------------------------------------------+
  Erik de Castro Lopo  nospam_AT_mega-nerd.com (Yes it's valid)
+-----------------------------------------------------------+
I hack, therefore I am.


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Fri Jun 13 2003 - 00:37:44 EEST