• 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
Re: audiograph 5ms fade
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: audiograph 5ms fade


  • Subject: Re: audiograph 5ms fade
  • From: Robert Carroll <email@hidden>
  • Date: Wed, 08 Jan 2014 08:35:30 -0500

Thanks for your reply.

Being able to set a ramped event on the mixer's output volume parameter would be a great solution, but, looking through the earlier thread, it appears that no one was able to get that approach to work.

All I am trying to accomplish for now, is to stop the fileplayers without any click or artifact from abruptly cutting the playback, then load new audio files and resume playback as quickly as possible. I wrote a fade in 100 steps using an NSTimer, but the audio threads have higher priority and the fade would sometimes run beyond the time taken to reload the fileplayers. 

Advice from this list was to tie all critical timing to msampletime, which I can get from one of the fileplayerAU's. If I poll the fileplayer's CurrentPlayTime property from outside the callback, ie. with a simple do...loop I get values that stay the same for a while then increase by 512 samples. I'm thinking this is the buffer size that the fileplayer is using.

At the moment, I've moved the original fade out into an untimed do...loop with more steps. At least with this the order of calls stays in place, but some files still click when stopping. This is a little too rough an approach to be able to evaluate if fading the mixer's output volume is the best way to get a clean file stop.

I'll try to get timestamps from inside the callback loop and then schedule a fade based on that timing. Otherwise, it looks like I will need to fade the actual sample values down to zero.

If any of this seems misguided, I'm open to any suggestions.

regards,

Robert Carroll
RSM Records
Toronto
http://www.rsmrecords.com



On Jan 7, 2014, at 6:30 PM, Aran Mulholland wrote:

Specifying your own callback will break the chain but you can manually call render on the FilePlayerAU from inside your callback. If all you are looking to do is fade out audio, wouldn't it be better to turn down the volume of the mixer?

see https://developer.apple.com/library/mac/documentation/AudioUnit/Reference/AUComponentServicesReference/Reference/reference.html#//apple_ref/c/func/AudioUnitRender

other people have wanted to do this too: http://lists.apple.com/archives/coreaudio-api/2013/May/msg00032.html


 _______________________________________________
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: audiograph 5ms fade
      • From: Daniel Hams <email@hidden>
References: 
 >audiograph 5ms fade (From: Robert Carroll <email@hidden>)
 >Re: audiograph 5ms fade (From: Aran Mulholland <email@hidden>)

  • Prev by Date: RE: clean AudioServerDriver plugin unload
  • Next by Date: Re: audiograph 5ms fade
  • Previous by thread: Re: audiograph 5ms fade
  • Next by thread: Re: audiograph 5ms fade
  • Index(es):
    • Date
    • Thread