• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Audio Unit/AudioConverter and getting what's playing *now*
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Audio Unit/AudioConverter and getting what's playing *now*


  • Subject: Audio Unit/AudioConverter and getting what's playing *now*
  • From: Simon Fraser <email@hidden>
  • Date: Thu, 21 Oct 2004 23:23:41 -0700

I'm playing streamed PCM data via an output Audio Unit with on-the-fly
conversion with an AudioConverter and AudioConverterFillComplexBuffer(),
using code based on the "PlayAudioFileLite" sample:

<http://developer.apple.com/samplecode/PlayAudioFileLite/listing1.html>

My problem is that this sound has to sync to video. There's a delay
between calling AudioOutputUnitStart() and the sound coming out, I think
because of some thread starvation issues that mean that my
ACComplexInputProc can't always supply as many packets as the converter
wants (which may happen because of network bandwidth issues in the
normal course of events). So I need to be able to ask the audio device
(or some other component) the timestamp of the samples that are
currently being played.

I've tried getting the audio device for the AU with
AudioUnitGetProperty(myUnit, kAudioOutputUnitProperty_CurrentDevice,
kAudioUnitScope_Output...), and then calling
AudioDeviceGetCurrentTime(), but this just returns the number of samples
processed since I called AudioOutputUnitStart() (ie. it continues to
increase even during the initial period of silence).
AudioDeviceTranslateTime() didn't seem to help me either.

Any suggestions appreciated.

Simon

_______________________________________________
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


  • Follow-Ups:
    • Re: Audio Unit/AudioConverter and getting what's playing *now*
      • From: Doug Wyatt <email@hidden>
  • Prev by Date: important new version of M-Audio Delta driver
  • Next by Date: Re: Audio Unit/AudioConverter and getting what's playing *now*
  • Previous by thread: important new version of M-Audio Delta driver
  • Next by thread: Re: Audio Unit/AudioConverter and getting what's playing *now*
  • Index(es):
    • Date
    • Thread