Audio hardware with a queue, not a circular buffer
I'm (still) writing a driver for the Gadget Labs Wave/4.
I don't know what to return for the pointer callback:
on 09/26/2001, Paul Davis advised:
Quoted 4 lines
Quoted 1 line
pointer
this is called to find out where the h/w pointer is in the ring buffer used for capture/playback. some devices do not support it, but most do.
My card uses a queue, not a ring buffer. What should I do for this function? I can read a value for queue depth out of the card, but this doesn't appear to be what the mid-level code is looking for.
Regards,
Mark
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
We have stuff for geeks like you.
http://thinkgeek.com/sf
Quoted 6 lines
Quoted 2 lines
this is called to find out where the h/w pointer is in the ring buffer used for capture/playback. some devices do not support it, but most do.
My card uses a queue, not a ring buffer. What should I do for this function? I can read a value for queue depth out of the card, but this doesn't appear to be what the mid-level code is looking for.
since queues and ring buffers are really rather similar, perhaps you could explain what the card does when it reaches the end of the queued data.
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
We have stuff for geeks like you.
http://thinkgeek.com/sf
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 10 lines · Paul Davis
Quoted 6 lines
Quoted 2 lines
this is called to find out where the h/w pointer is in the ring buffer used for capture/playback. some devices do not support it, but most do.
My card uses a queue, not a ring buffer. What should I do for this function? I can read a value for queue depth out of the card, but this doesn't appear to be what the mid-level code is looking for.
since queues and ring buffers are really rather similar, perhaps you could explain what the card does when it reaches the end of the queued data.
I'll have to perform the experiment. Hopefully, this week sometime.
If the value wraps around, then it is a ring buffer after all (and I can return something like (sw_pointer+queue_depth) % buffer_length ??)
If the value stays at zero, then... well, I just hope it doesn't.
Mark
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
We have stuff for geeks like you.
http://thinkgeek.com/sf