Re: remoteIO - play audio file intermittently
Re: remoteIO - play audio file intermittently
- Subject: Re: remoteIO - play audio file intermittently
- From: Aran Mulholland <email@hidden>
- Date: Tue, 05 Jun 2012 08:33:00 +1000
If you know all sounds you wish to play before hand I would use the
AUSampler. this way you can set up a patch with all of your sounds and
trigger them using core midi when they need to be played. The sounds
still run through the AUGraph so you can have sample level access but
you don't need to worry about reading files, or filling buffers in
callbacks. You could also use AUFilePlayer which has the same
advantages.
But to answer your question
just fill the buffer with 0's when you don't want any sound. (use memset)
Aran
On Tue, Jun 5, 2012 at 7:43 AM, Ash Gibson - Smartface
<email@hidden> wrote:
> Hi everyone,
>
> Using AudioServicesPlaySystemSound I can fire off sounds from short audio
> files as needed. What I am hoping to do is the same functionality except
> using audio units.
>
> I have setup a remoteIO
> like http://atastypixel.com/blog/using-remoteio-audio-unit/ with recording
> and playback callbacks. I have also worked through the MixerHost sample app
> so I can see how to load audio files into memory. What I am not sure of is
> how to push these files in as needed, and produce silence when needed.
>
> For example on the MixerHost app there is the following line which makes the
> audio file loop:
>
> if (sampleNumber >= frameTotalForSound) sampleNumber = 0;
>
> What if I didn't want to loop and instead wanted silence after the first
> loop?
>
> Thanks,
>
> Ash
>
> _______________________________________________
> 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
>
_______________________________________________
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