• 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: Monitoring input level
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Monitoring input level


  • Subject: Re: Monitoring input level
  • From: Neil Clayton <email@hidden>
  • Date: Wed, 21 Jun 2006 19:38:23 +0100

OK. I've taken a look at AMS ... I didn't even know you could do that! Learning as I go.

So now I have an aggregate, with inputs from the Edirol, and outputs to the Built in Audio. I've plugged this into the AU Lab, and sure enough, it passes through as I'd expect.

Question 1)
Is the recommended solution still to use a single AUHAL (with mixer) to the sampling of the level? (just using aggregates instead of single devices).


Part 2)
In answer to two other questions regarding setting the volume on the mixer. Yes, I do do this. I'm using code gleaned from MatrixMixerTest, which does:
- (void) setVolumes {
OSStatus err = AudioUnitSetParameter(mixerUnit, kMatrixMixerParam_Enable, kAudioUnitScope_Input, 0, 1, 0);
checkErr(err);
err = AudioUnitSetParameter(mixerUnit, kMatrixMixerParam_Enable, kAudioUnitScope_Output, 0, 1, 0);
checkErr(err);

// Set global volume
err = AudioUnitSetParameter(mixerUnit, kMatrixMixerParam_Volume, kAudioUnitScope_Global, 0, 1, 0);
checkErr(err);

// Set master volume
err = AudioUnitSetParameter(mixerUnit, kMatrixMixerParam_Volume, kAudioUnitScope_Global, 0xFFFFFFFF, 1, 0);
checkErr(err);

// Set input and output volumes
err = AudioUnitSetParameter(mixerUnit, kMatrixMixerParam_Volume, kAudioUnitScope_Input, 0, 1, 0);
checkErr(err);
err = AudioUnitSetParameter(mixerUnit, kMatrixMixerParam_Volume, kAudioUnitScope_Output, 0, 1, 0);
checkErr(err);
}




---
Neil Clayton



On 20 Jun 2006, at 22:26, Jeff Moore wrote:


On Jun 20, 2006, at 2:09 PM, Neil Clayton wrote:

Actually, you might be leading me somewhere useful anyway. I'm wanting to do this so that people can use whatever device they have. Obviously, people may well be using USB microphones and wot not (it's actually for a screen capturing app, with voiceover support).

If it's not going to work for USB devices, then .... I'll have to use some other approach anyway.

Indeed.

Would this other approach happen to be something like the ComplexPlayThru example? Where an Input AUHAL is used to capture data to a ring buffer, and that data is pumped into an AUGraph?

That is one way to do it. In it's plainest, simplest form, it's even easy to code up. However, you have the issue of synchronization to deal with. With two clocks in the picture, you have to compensate for the differences in how fast they are running relative to each other or risk over/underflowing your ring buffer if you run long enough.


Or something completely different?

Aggregate devices are the more complete solution to the problem as you don't have to worry about the synchronization as the HAL will do that work for you. To use aggregate devices, you either have to rely on the user constructing one for you to use using AMS or you can build them programatically.


For building them programatically, there was a fairly thorough discussion of how to do it on this list back a few months. You should be able to find the thread in the list archives.
_______________________________________________
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: Monitoring input level
      • From: Jeff Moore <email@hidden>
References: 
 >Monitoring input level (From: Neil Clayton <email@hidden>)
 >Re: Monitoring input level (From: Neil Clayton <email@hidden>)
 >Re: Monitoring input level (From: Jeff Moore <email@hidden>)
 >Re: Monitoring input level (From: Neil Clayton <email@hidden>)
 >Re: Monitoring input level (From: Doug Wyatt <email@hidden>)
 >Re: Monitoring input level (From: Neil Clayton <email@hidden>)
 >Re: Monitoring input level (From: William Stewart <email@hidden>)
 >Re: Monitoring input level (From: Neil Clayton <email@hidden>)
 >Re: Monitoring input level (From: Jeff Moore <email@hidden>)
 >Re: Monitoring input level (From: Neil Clayton <email@hidden>)
 >Re: Monitoring input level (From: Jeff Moore <email@hidden>)
 >Re: Monitoring input level (From: Neil Clayton <email@hidden>)
 >Re: Monitoring input level (From: Jeff Moore <email@hidden>)

  • Prev by Date: Re: Alvin and the Chipmunks
  • Next by Date: Re: Monitoring input level
  • Previous by thread: Re: Monitoring input level
  • Next by thread: Re: Monitoring input level
  • Index(es):
    • Date
    • Thread