• 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: Does kAudioUnitProperty_BypassEffect work once and never again?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Does kAudioUnitProperty_BypassEffect work once and never again?


  • Subject: Re: Does kAudioUnitProperty_BypassEffect work once and never again?
  • From: Aran Mulholland <email@hidden>
  • Date: Thu, 08 Dec 2011 20:12:59 +1100

Did you ever resolve this issue Chris?

On Fri, Nov 11, 2011 at 5:56 PM, tahome izwah <email@hidden> wrote:
> This may be a long shot but do you get anything on the meters when the
> app goes quiet? Like a large DC component? If you do it might be an
> indication that somehow NaNs are introduced into your audio stream
> which will mess up state variables. Usually this happens when you have
> an invalid ABL that points to some nonsensical data. Try running with
> Guard Malloc enabled to see if it crashes somewhere.
>
> HTH
> --th
>
>
> 2011/11/8 Chris Adamson <email@hidden>:
>> I've got an AUGraph demo with three units (AURemoteIO bus 1, AUSampler, and
>> AUFilePlayer) going into a mixer and then through a chain of effects before
>> going to  the AURemoteIO bus 0 for output to h/w.
>> A UISwitch lets you set the kAudioUnitProperty_BypassEffect on the effect
>> units.
>> All the effects default to non-bypass (ie, the effect is active).  When I
>> bypass the effect, I stop hearing the distortion or whatever, and that's
>> great.  But when I set kAudioUnitProperty_BypassEffect back to 0, the effect
>> stops processing sound and the app goes quiet.  And when I bypass again, the
>> sound goes through (w/out the effect, naturally).  So what I have is an
>> effect that works so long as I never bypass it.
>> In other words, by state, with just the distortion effect:
>>    0 (default): Switch ON, bypass off, sound distorted
>>    1: Switch OFF, bypass on, sound non-distorted
>>    2: Switch ON, bypass off, no sound
>>    3: Switch OFF, bypass on, sound non-distorted
>>    [repeat states 2 and 3]
>> Is there some other cleanup I have to do after setting BypassEffect?  Trying
>> AudioUnitReset didn't do anything.
>> Here's the relevant code:
>> -(IBAction)handleEffectEnabledSwitchValueChange:(id)sender {
>>    UInt32 bypassed = self.effectEnabledSwitch.on ? 0 : 1;
>>    NSLog (@"setting bypassed to %ld", bypassed);
>>    CheckError(AudioUnitSetProperty (self.audioUnit,
>>                             kAudioUnitProperty_BypassEffect,
>>                             kAudioUnitScope_Global,
>>                             0,
>>                             &bypassed,
>>                             sizeof(bypassed)),
>>             "Couldn't set bypassed status");
>> //   does noting
>> //   CheckError(AudioUnitReset(self.audioUnit, kAudioUnitScope_Global, 0),
>> //            "Couldn't reset audio unit");
>>
>> }
>> ("CheckError" is the same function as in the Core Audio book: check the
>> return against noErr, pretty print and exit if there's an error)
>> I can put my project on my Dropbox if anyone wants to look… this is for my
>> Core Audio talk at VTM:iOS next weekend in Boston, so I'll eventually be
>> putting the finished version there in any case (i.e., don't ask me to post
>> the buggy version now just because you don't think you'll never get it
>> otherwise)
>> --Chris
>>
>>  _______________________________________________
>> 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
 _______________________________________________
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

  • Prev by Date: Re: iOS audio processing graph demonstration
  • Next by Date: Sample code or resources for audio play through with echo cancellation?
  • Previous by thread: Re: iOS audio processing graph demonstration
  • Next by thread: Sample code or resources for audio play through with echo cancellation?
  • Index(es):
    • Date
    • Thread