• 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
Observing CurrentPlayTime in AUScheduledSoundPlayer
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Observing CurrentPlayTime in AUScheduledSoundPlayer


  • Subject: Observing CurrentPlayTime in AUScheduledSoundPlayer
  • From: "Stephen F. Booth" <email@hidden>
  • Date: Thu, 31 May 2007 12:50:08 -0700

Hello all,

I'm using an AUScheduledSoundPlayer to feed an AUGraph, and I would like to have an UI indication of playback position. Is there a way to observe changes in kAudioUnitProperty_CurrentPlayTime without polling? I've tried using AUEvents, but my callback is never called even when I know the property is changing (because audio is playing). Here is how I register for the event:

AudioUnitEvent propertyEvent;
propertyEvent.mEventType = kAudioUnitEvent_PropertyChange;
propertyEvent.mArgument.mProperty.mAudioUnit = _generatorUnit;
propertyEvent.mArgument.mProperty.mPropertyID = kAudioUnitProperty_CurrentPlayTime;
propertyEvent.mArgument.mProperty.mScope = kAudioUnitScope_Global;
propertyEvent.mArgument.mProperty.mElement = 0;

err = AUEventListenerAddEventType(_listener, NULL, &propertyEvent);


I was under the impression (after some googling and reading the list archives) that anytime an AudioUnit property changes, a notification should be generated, so I'm stumped. I also tried using AudioUnitPropertyListeners directly, but couldn't get that to work either.

Currently I'm using an NSTimer that fires every so often to query the property and causes an UI update- which works- but I don't like it.

Stephen

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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: Observing CurrentPlayTime in AUScheduledSoundPlayer
      • From: William Stewart <email@hidden>
  • Prev by Date: Re: 'pass through' audio units
  • Next by Date: Re:'pass through' audio units
  • Previous by thread: Re: 'pass through' audio units
  • Next by thread: Re: Observing CurrentPlayTime in AUScheduledSoundPlayer
  • Index(es):
    • Date
    • Thread