OK, here is more data. The enclosed files are: 1) The "minimal playback program" described in the original message, modified to clear the buffer, and do the "dump" of the parameters. The buffer size is lengthened a bit (maybe this makes a difference??) 2) The output of 'strace' on the program, it stops at the 'poll' instruction (broken out with a ^c at the terminal). 3) A cut/pasted copy of the output sent to the terminal. In particular, it has the output from "snd_pcm_dump" which ought to help a bit.
The source was compiled with 'cc simple.c -lasound -o simple'. It was executed with './simple surround40'. I think I'm doing everything OK, and if I solve this goodie (on the simple program), I suspect tha I can solve the problem with my program. P.S. The sound card is a Turtle Beach Santa Cruz. It can handle the 4 channel things OK (I used 'aplay' very nicely!!) While the C++ program is nice, I'm not really into that. It seemed to work OK (as given). My program is C, thus the enclosed files. Maybe there is a solution out there. Thanks to all. ALSA is the way of the future!! --- Carlo Wood <[EMAIL PROTECTED]> wrote: > I found that a better example for playback is > the 'pcm.c' file that you can find on the alsa site. > It contains many ways to deliver the data (a nice > sine) to your soundcard. Playing with the parameters > gives some insight (more than reading the overall poor > documentation imho :(). > <<<deletia>>> > On Tue, Jul 22, 2003 at 11:54:49PM -0700, Tom Watson wrote: > > I am attempting to write a "simple" audio playback program. Well, > I > > thought it would be, but... > > Somehow (thru strace) the 'snd_pcm_writei' call goes and eventually > > does a system 'poll' call, but it doesn't return indicating that a > > write is OK to do. > > I've used similar parameters in 'aplay' and I see that it works. > > > > The basis of the program I'm writing is the one described in _A > > Tutorial on Using the ALSA API_ > > (http://equalarea.com/paul/alsa-audio.html), section entitled "A > > Minimal Playback Program". > > > > One thing I've noted: Some of the data printed out by > "snd_pcm_dump" > > is different between my program and 'aplay'. I suspect that there > is a > > clue somewhere, but what is the "magic"?? > > > > If necessary, I can provide the 'strace' or the output from > > 'snd_pcm_dump', but in the interest of brevity... > > > > Any "great clue" would be appreciated. <<<deletia of C++ program...>>> ===== -- Tom Watson [EMAIL PROTECTED] __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com
simple.c
Description: simple.c
simple.tr
Description: simple.tr
simple.sout
Description: simple.sout