Re: [Alsa-user] Problem with API, prepare fails
Brought to you by:
perex
From: Alfons A. <fon...@al...> - 2005-07-19 09:38:32
|
On Tue, Jul 19, 2005 at 11:11:41AM +0200, Michael Pfeiffer wrote: > Ah, thx, that may be the reason ... funny, I took my code out of an > example from alsa-project.org, but the sw-params weren't mentioned > there. What are useful values for recording here (nonblocking reading, > polling from the device)? The examples in the API-specification are for > replaying only... For some example code, you could grab the clalsadrv lib at http://users.skynet.be/solaris/linuxaudio (go to the bottom of that page) It's C++, but you will find some functions in there that do the setup of both hw and sw params. This is for mmap access to the device, but you'll find out what to change or leave out easily. (Or you could decide to use the lib of course, but it's fully undocumented ATM :-(. There is a small example program that just loops back capture to playback IIRC). -- FA |