stream position when playing nothing
stream position when playing nothing
- Subject: stream position when playing nothing
- From: email@hidden
- Date: Tue, 06 Sep 2011 16:33:18 +0200
- Acceptlanguage: de-DE
- Thread-topic: stream position when playing nothing
Hi,
I'm looking for a function that will return either:
- the position of the sample currently playing, or
- the last such position in case of underrun or silence.
For instance, consider a (hypothetical) Morse beep emiting application
(or simply mouse clicks). From time to time, it would send a short or
long beep to the speakers, then send nothing (silence) until it's time
for the next beep.
AudioQueueGetCurrentTime (or rather outTimeStamp.mSampleTime) appears
to return a time-based position since the stream was started, i.e. it
increases even when I don't call AudioQueueEnqueueBuffer and nothing plays.
I tried adding a Timeline object, however outTimelineDiscontinuity
always returned 0. Perhaps it's for capture only?
I don't think sending silence is a great idea because I don't know
when the next beep is going to happen. If I insert too much silence,
the next beep is delayed. If not enough, we're back at the initial
question, since underrun or silence should not matter (in other words,
the function should not return incorrect values when the machine is
very loaded and underruns occur).
What is there that does not increase while nothing plays?
Thank you for your help,
Jörg Höhle
_______________________________________________
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