Re: Playback hiccups with Quicktime and CoreAudio
Re: Playback hiccups with Quicktime and CoreAudio
- Subject: Re: Playback hiccups with Quicktime and CoreAudio
- From: William Stewart <email@hidden>
- Date: Thu, 20 Oct 2005 12:11:16 -0700
Have a look at the PlayAudio code in the Simple directory of our
latest SDK releases. This is using the AUFilePlayer AU (you can see
this also working in AU Lab by adding a Generator track) - This AU
(as you can see in its UI) can be used to play regions of files, to
track the progress of the playback. If you want to do more of this
yourself, then the lower level ScheduledSlice AU is the interesting
one to look at. There are some notes about it in
AudioUnitProperties.h - basically, you'd need to set up a read
thread, then from that read thread you can schedule slices of audio
for it to play - you get a callback from it when its finished playing
one of the buffers you queued, etc...
As its a generator AU, you can of course use it as a source unit for
any other AU in a graph.
Bill
On 19/10/2005, at 11:16 PM, Frank Vernon wrote:
Hi all-
I'm having an issue with a modified version of Kurt Revis'
PlayBufferedSoundFile that I'm hoping someone here might be able to
shed some light on. I've already contacted Kurt and he's unaware of
the problem so I'm hoping someone on the list may have some insight
for me.
In a nutshell, the issue is that I'm seeing intermittent playback
hiccups when I pause the playback, 'rewind' to the head of the
track, and start playback over again. The hiccups seem to be
correlated with the position in the file where I had previously
stopped the playback. This leads me to believe that there may be
some sort of file caching issue with the OS that is temporarily
delaying the QT decode process. Is anyone aware of such issues with
Quicktime decoding or playback from file in general? If so, any
suggestions on how to best deal with them?
Here are few facts regarding my modifications to
PlayBufferedSoundFile that might have some bearing on the
situation... I have modified the QTSoundFilePlayer class to use an
AUGraph as its output so that I can add effects to the playback and
select alternate output devices. As a result of this change I have
also modified a few things like start/stop/pause/resume so they are
based on the operation of the graph rather than the quicktime
decode as in Kurt's original. There are also a number of other mods
related to more accurate tracking of the playback position (based
on the number of frames served to CoreAudio rather than the
Quicktime decode process) but nothing I believe to be related to
this issue. I'd be happy to post the source if it would help
diagnose the problem.
It has already been recommended that I investigate moving to the
new AudioFile APIs as a possible replacement. Given that I need
fairly accurate tracking of playback position, accurate playback
position seeking, and the ability to configure an arbitrary output
graph, can anyone advise me if these new APIs would be appropriate
for my application?
Thanks-
Frank Vernon
_______________________________________________
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
--
mailto:email@hidden
tel: +1 408 974 4056
________________________________________________________________________
__
"Much human ingenuity has gone into finding the ultimate Before.
The current state of knowledge can be summarized thus:
In the beginning, there was nothing, which exploded" - Terry Pratchett
________________________________________________________________________
__
_______________________________________________
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