[Alsa-devel] Callback after a specified number of samples

2002-09-29 Thread Wolfgang Hesseler
Hello, is it possible to get a callback after a specified number of samples (e.g. 4000) are played? I'd like to refill the buffer then and need the exact number to synchronize audio and video. -- Werden Sie mit uns zum "OnlineStar 2002"! Jetzt GMX wählen - und tolle Preise absahnen! http://www.o

Re: [Alsa-devel] Callback after a specified number of samples

2002-09-29 Thread Jaroslav Kysela
On Sun, 29 Sep 2002, Wolfgang Hesseler wrote: > Hello, > is it possible to get a callback after a specified number > of samples (e.g. 4000) are played? > I'd like to refill the buffer then and need the exact > number to synchronize audio and video. Look to alsa-lib/test/pcm.c and "async" method.

Re: [Alsa-devel] Callback after a specified number of samples

2002-09-30 Thread Wolfgang Hesseler
Paul Davis <[EMAIL PROTECTED]> wrote > >Hello, > >is it possible to get a callback after a specified number > >of samples (e.g. 4000) are played? > >I'd like to refill the buffer then and need the exact > >number to synchronize audio and video. > > you can get this to a limited extent by setting

Re: [Alsa-devel] Callback after a specified number of samples

2002-09-30 Thread tomasz motylewski
I do the following: knowing the sample rate and the current position of the HW pointer (via snd_pcm_avail_update - why there is no function which would tell me directly that - the current position in the buffer?) I can calculate when the required position _will_ happen. So I can just schedule th

Re: [Alsa-devel] Callback after a specified number of samples

2002-09-30 Thread Jaroslav Kysela
On Mon, 30 Sep 2002, tomasz motylewski wrote: > I do the following: knowing the sample rate and the current position of the HW > pointer (via snd_pcm_avail_update - why there is no function which would tell > me directly that - the current position in the buffer?) I can calculate when > the requi

Re: [Alsa-devel] Callback after a specified number of samples

2002-09-30 Thread Wolfgang Hesseler
Paul Davis <[EMAIL PROTECTED]> wrote: >[ please forward to [EMAIL PROTECTED] thanks. ] > > >> however, it won't do what you want, because the resolution is limited > >> to the interrupt frequency of the audio card, and for just about every > >> interface out there, this is almost always a p

Re: [Alsa-devel] Callback after a specified number of samples

2002-09-30 Thread tomasz motylewski
On Mon, 30 Sep 2002, Jaroslav Kysela wrote: > > me directly that - the current position in the buffer?) I can calculate when > > the required position _will_ happen. So I can just schedule the timer or sleep > > until that time. When it arrives I can check again snd_pcm_avail_update to see > > w

Re: [Alsa-devel] Callback after a specified number of samples

2002-10-08 Thread Jaroslav Kysela
On Mon, 30 Sep 2002, tomasz motylewski wrote: > On Mon, 30 Sep 2002, Jaroslav Kysela wrote: > > > > me directly that - the current position in the buffer?) I can calculate when > > > the required position _will_ happen. So I can just schedule the timer or sleep > > > until that time. When it ar