Re: Notification of Audio Queue playback
Re: Notification of Audio Queue playback
- Subject: Re: Notification of Audio Queue playback
- From: Michael Becker <email@hidden>
- Date: Tue, 1 Dec 2009 23:04:58 +0100
Am 01.12.2009 um 22:24 schrieb Aaron B.:
> I'm no expert, but I've been trying to do something similar, and it
> sounds like what you need to do is use
> AudioQueueEnqueueBufferWithParameters to enqueue the playback buffer.
> Check it out in the online reference. It returns the exact time the
> buffer will start playing.
But I still don't know the actual *moment in real time* that my buffer starts playing. I merely know at which point it will start within the AudioQueue's timeline. Besides that, my app loops audio (meaning I do not want to delay audio playback) so AudioQueueEnqueueBufferWithParameters is not what I would use.
In the end, I would like to synch visuals to the audio every time a new loop starts.
> You can also request the buffer to play at
> a specific time, although it is not guaranteed---presumably it will
> play your buffer at the requested time or as soon as the previously
> scheduled buffers have finished playing, whichever is later.
>
> - Aaron
>
> On Tue, Dec 1, 2009 at 4:12 PM, Michael Becker <email@hidden> wrote:
>> Hi everyone,
>> I am still trying to synch what people hear and what people see on the
>> iPhone, and if I do not completely misunderstand the docs, AudioQueue is the
>> way to go. The audio part of my app actually works nicely. But I am
>> wondering, how to go about the "video synching". For starters, I would be
>> happy if I could get *any* kind of synching, e.g. displaying images
>> depending on what my AudioQueue does.
>> So I have two questions:
>> (1) Is there any way to know (code-wise) when an audio-buffer is being
>> played? At the moment, I have the AudioQueue run in a separate thread in a
>> loop, and the loop constantly polls the AudioQueue for its current playback
>> position. Although it works, this seems kind of awkward to me from a
>> technical point of view. Furthermore, I cannot see how this should be the
>> promised "audio-video-synching" feature of the AudioQueue.
>> (2) How else would one do this? I have asked this before (unfortunately
>> without any reaction), but to quote the documentation: "You can use
>> (AudioQueue) to synchronize (...) audio with video.". That's what I'd like
>> to do, but I don't know how.
>> Sorry for the rather long mail, but I am really lost here.
>> Kind regards,
>> Michael
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Coreaudio-api mailing list (email@hidden)
>> Help/Unsubscribe/Update your Subscription:
>>
>> This email sent to email@hidden
>>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden