• 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
Controlling AUGraph playback repeats
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Controlling AUGraph playback repeats


  • Subject: Controlling AUGraph playback repeats
  • From: Ron Fleckner <email@hidden>
  • Date: Mon, 3 Jul 2006 10:44:12 +1000

Hi,

just getting my toes wet with Core Audio. I have a very short sound file (.09 of a second) which I'd like to play only once through. It is played through an AUGraph with a mixer. I've used the MatrixMixerTest example as a guide. I want to use a mixer because I want the user to be able to adjust the volume. It works OK and I can get metering to work, but because the sound file is so short, it sounds like a jack-hammer. I'd like to be able to set the graph to NOT repeat so that I can control when it plays. I'm trying to create a metronome.

I know I can do this:

AUGraphStart(graph);
usleep(1 * 1000 * (int)fileDuration);// fileDuration is 0.09 (approx) times 1000
AUGraphStop(graph);


but then the metering looks poor, I suppose because the graph is stopped during usleep.

Is there any way I can tell the graph to play the file only once then stop?

I've looked at AUGraphAddRenderNotify and AUGraphRemoveRenderNotify, but can't get either of those to work.

I'd be grateful for any guidance on this.

Ron Fleckner
_______________________________________________
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: Controlling AUGraph playback repeats
      • From: William Stewart <email@hidden>
  • Next by Date: Re: Oxford OXFW971
  • Next by thread: Re: Controlling AUGraph playback repeats
  • Index(es):
    • Date
    • Thread