[linux-audio-dev] mmap problems

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

Subject: [linux-audio-dev] mmap problems
From: Andrew Post (apost_AT_cbmi.upmc.edu)
Date: Wed Jun 21 2000 - 17:20:42 EEST


Hi,

I'm trying to teach myself how to use mmap. So, I downloaded the
mmap_test.c sample code from www.opensound.com, and I've been playing
with it. The code in mmap_test takes a sound and plays it using mmap
repeatedly until you type Ctrl-C. The problem is, mmap_test doesn't work
correctly. After a few repetitions of the sample sound that I feed it, a
periodic popping noise is introduced in between repetitions. I've
discovered that the problem begins when mmap reaches the end of the dma
buffer and has to loop back to the beginning.

So, my questions are:
Does anyone familiar with the sample code know what's wrong with it (or
is it a driver problem?)

Does anyone have any sample code for mmap that's simple and is known to
work?

What is mmap really used for? I've been told that mmap is only useful
for occasional short samples (as in sound effects for a video game), and
that continuous playing is just as efficient using the standard read and
write calls.

My system:
Mandrake Linux 6.1
300MHz Pentium II, 128MB of RAM
SBLive! sound card
Commercial OSS sound drivers

Thanks,

Andrew


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

This archive was generated by hypermail 2b28 : Wed Jun 21 2000 - 18:01:13 EEST