[linux-audio-dev] alsa-playback (in plain c)

Julien Claassen julien at c-lab.de
Fri Feb 6 00:01:53 UTC 2004


Hi all!
  I wanted to do a simple task. I just want to playback a raw file (16BIT,
stereo, 44100Hz). So I used the alsa_pcm_seq-howto and compied a bit of code
from it. But it doesn't work. I get the device read for playing and I get
sound... But it's just noise. I'm frustrated. I tried to copy the relevant
part out of the aplay-sources, but they have so many config stuff... Can
anyone help me with a bit of code or a place where I should just get some code
for only:
  1. opening a raw-file
  2. setting up the alsa-driver for playbakc
  3. Read data from the file and write it to the soundcard.
  I want nothing fancy. Just a stupid little part of c-code, which performs
just that task.
  Kindest regards and thanks for any help
         Julien

http://ltsb.sourceforge.net - the Linux TextBased Studio guide

---------------------------------------------------------
SBS C-LAB
Fuerstenallee 11
33102 Paderborn

Phone: (+49) 5251 60 6060
Fax: (+49) 5251 60 6065

www.c-lab.de/~wegge



More information about the Linux-audio-dev mailing list