Re: Audio Unit synth how-to
Re: Audio Unit synth how-to
- Subject: Re: Audio Unit synth how-to
- From: h <email@hidden>
- Date: Wed, 11 May 2005 04:42:30 -0700 (PDT)
- Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys
I am still working on my soft synth with the assistance of everyone
here. But it is burning 100% CPU - is there any way to run the audio
unit in a profiler (gprof?). I presume I need a suitable host.
Thanks
Hamish
--- William Stewart <email@hidden> wrote:
>
> You have to understand that the host basically controls your
> behaviour. It calls Render, not you. The host may "take you offline"
>
> in this case - ie. not call your Render call, or it may not - and
> just pump silence through. You don't know (nor do you care) _ you
> just have to respond to what the host asks you to do.
>
> Have a look through the documentation we do have:
>
> /Developer/Examples/CoreAudio/Documentation
>
> There's some comments there about the general rendering process from
>
> the host's perspective, and how AudioUnitReset ties into that process
>
> as well.
>
> > Never mind, I found the answer - set the
> > kAudioUnitRenderAction_OutputIsSilence flag.
>
> Not really. You set this flag ***whenever*** you are returning a
> buffer that is completely silent.
>
> This need have nothing to do with whether the user has "hit the stop
>
> button" or not. For instance, a synth maybe silent for a large part
> of a song because there's no notes being played by it - but the song
>
> is still playing.
>
> Bill
>
> On 10/05/2005, at 9:47 AM, h wrote:
>
> > Here's an easy one: Once the user has hit the stop button, how do I
> > signal to the audio unit host to stop calling my Render() function?
> > If this is all documented somewhere, please let me know.
> >
> > Cheers,
> > Hamish
> >
> > --- James McCartney <email@hidden> wrote:
> >
> >>
> >> On May 8, 2005, at 2:59 PM, h wrote:
> >>
> >>
> >>> I just want to check - given that I have to call GetParameter()
> >>>
> >> during
> >>
> >>> Render() - I take it that if the parameter cannot change partway
> >>> through my Render() call? (Or else some kind of mutex would be
> >>> needed)?
> >>>
> >>>
> >>
> >>
> >> Since setting a 32 bit word (e.g. a 32 bit float) is atomic, no
> mutex
> >>
> >> is needed.
> >> The value of GetParameter could change midway. It isn't likely to
> >> change on a single processor because of the priority of the render
> >> thread, but it may happen on a dual processor.
> >>
> >> --- james mccartney --- apple coreaudio
> >>
> >>
> >>
> >>
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam? Yahoo! Mail has the best spam protection around
> > http://mail.yahoo.com
> > _______________________________________________
> > 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
> >
>
> --
> mailto:email@hidden
> tel: +1 408 974 4056
>
________________________________________________________________________
>
> __
> "Much human ingenuity has gone into finding the ultimate Before.
> The current state of knowledge can be summarized thus:
> In the beginning, there was nothing, which exploded" - Terry
> Pratchett
>
________________________________________________________________________
>
> __
>
>
Discover Yahoo!
Have fun online with music videos, cool games, IM and more. Check it out!
http://discover.yahoo.com/online.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