Can't play a raw muLaw file through arts

Jorge j.windmeisser at elogix.info
Fri Dec 5 19:33:36 GMT 2003


I raised this question some time ago.

I have a muLaw sample with following parameters:

8000 bits/s
8 bit/resolution
1 channel

(it's data that came through isdn4linux's ttyI devices)

if I play the damned thing with cat sample.ulaw > /dev/sound/audio

the thing is played correctly

if I play it through a program I've written, the speed is ok, but the sample 
itself sounds like the Klingons attacking "Kampfstern Galaktika". Where 
silence should be I hear a lot of noise, the sounds are recognizable though.

I'm using artsc.h as API, what do I have to do in order to play the sample and 
to make it sound like the original?

This is what I have:

stream = arts_play_stream( 8000, 8, 1, "artsctest" );

... read from file byte wise...

errorcode = arts_write(stream, buffer, sizeof(buffer));

... buffer is an unsigned char buffer[8] ...

Greets Jorge



More information about the kde-multimedia mailing list