Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Playing "silence" to an AudioQueue (with VBR format)




On Jan 23, 2008, at 9:22 PM, Neil Clayton wrote:

I understand that - but I don't see how else I am to pass the buffer back to the queue. If I don't attempt to enqueue it again, I am never called back (after all buffers are "consumed").

Are you saying that it's perfectly valid within an AudioQueue callback to do no enqueing at all?

yes. All that the callback (for an output queue) does is tells you that the buffer it gives you it is now finished with. You could just mark this in a list as a buffer that is now available for reuse and exit... or whatever... there's no expectation that you are doing anything special in this function.



So on this topic, can I please check a few assumptions I have?

1) When a callback is called with an AudioQueueBufferRef - that buffer reference is now locked / consumed. It cannot be used by the queue again until you enque it (give it back to the queue).

It won't be used by the queue until you enqueue it again, yes.

2) Within every callback, you must re-enque the supplied buffer back to the queue.

no



--
Regards,
Neil Clayton,  http://shinywhitebox.com







On 24/01/2008, at 4:00 PM, William Stewart wrote:

But there's no requirement that you enqueue more data from a callback - all that the cb is telling you is that the buffer it is supplying has been consumed by the queue.

kAudioQueueErr_BufferEmpty is the error you are getting - you are trying to enqueue a buffer that has nothing in it.

Bill

On Jan 22, 2008, at 8:15 PM, Neil Clayton wrote:



_______________________________________________ Do not post admin requests to the list. They will be ignored. Coreaudio-api mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/coreaudio-api/email@hidden

This email sent to email@hidden
References: 
 >Playing "silence" to an AudioQueue (with VBR format) (From: Neil Clayton <email@hidden>)
 >Re: Playing "silence" to an AudioQueue (with VBR format) (From: William Stewart <email@hidden>)
 >Re: Playing "silence" to an AudioQueue (with VBR format) (From: Neil Clayton <email@hidden>)
 >Re: Playing "silence" to an AudioQueue (with VBR format) (From: William Stewart <email@hidden>)
 >Re: Playing "silence" to an AudioQueue (with VBR format) (From: Neil Clayton <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.