Hi,

   I'm currently writing an image flipbook tool
   that uses ALSA to synchronize a sequence of 
   images to a given audio track.  I originally wrote 
   the program using ALSA 0.5, however, I'm having
   trouble re-writing my application to use the newer
   0.9 alsa-lib API.

   Specifically, my application used the so-called 
   "stream" PCM playback mode in v0.5, where I could 
   setup the playback buffer size like so:

   snd_pcm_channel_params_t params;
   params.mode                  = SND_PCM_MODE_STREAM;
   params.channel               = SND_PCM_CHANNEL_PLAYBACK;
   params.buf.stream.queue_size = bufferSizeInBytes
   params.buf.stream.fill       = SND_PCM_FILL_NONE;
   snd_pcm_channel_params(m_alsa,&params);

   Here, I could write an arbitrary number of bytes
   to the buffer using snd_pcm_write, and I could
   tell how many bytes were currently free in the
   buffer using snd_pcm_channel_status.  I could 
   also set the queue_size as large as I wanted.

   I need the same setup from alsa-lib 0.9, but I'm
   not sure what snd_pcm_hw_params to set in order
   to get the same behavior (period_size? buffer_size?).

   Any tips and help is appreciated,   

   - Philip 

-------------------------
Philip Hunter  
Software Developer
Weta Digital Effects
http://www.wetafx.co.nz
-------------------------

_______________________________________________
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

Reply via email to