[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Playing 8-bit raw Audio with mplayer



Tzafrir Cohen writes:
> In the worst case, convert it to a wav file:
> 
>   sox -r8000 -u -c1 -8 streamfile file.wav

	That definitely does work. Thanks.

	It turned out I was reading the wrong part of the man
page so searches for what one might think works turned up
nothing. It turns out that the following will directly play the
file:

mplayer -quiet -rawaudio samplesize=1:channels=1:rate=8000 -demuxer rawaudio \
/tmp/rawaudio.tmp

	I did discover an interesting little bug that is either
a misunderstanding on my part or an off-by-one situation.

	If you listen to the dump with headphones or a good pair
of speakers, you can hear a rhythmic throbbing effect with a
rate of about 1 throb per second. It reminds me of the effect
you get when the tape guides on a tape machine are allowing the
tape to scue a little so the movement over the head is not
perfectly horizontal. You almost don't notice it but it is there
at times and somewhat annoying.

	It made me wonder if the codec was feeding audio that
was being sampled a little faster than it should be.

	I changed the sample rate to 8001 and the throb effect
doubled in speed, telling me that this was the problem but I had
gone in the wrong direction.

	At 7999, the throb is totally gone and the effect is the
same as what you get if you cat a raw audio file directly to
/dev/dsp.

	For all I know, it might not even show up on another
computer with a different sound card and possibly a different
time base.

	I tried it on a computer I use at work that has a SBLive
sound card and I think I did still hear the slight throb effect.

	I have since subscribed to the mplayer list and will
post this same description to see if somebody else can shed some
light/sound knowledge as to why the slight timing problem.

Martin McCormick WB5AGZ  Stillwater, OK 
Systems Engineer
OSU Information Technology Department Telecommunications Services Group


Reply to: