Re: Monitoring input level
Re: Monitoring input level
- Subject: Re: Monitoring input level
- From: Neil Clayton <email@hidden>
- Date: Thu, 22 Jun 2006 19:41:20 +0100
I am please to report that I have found my own silly mistake:
checkErr(err);
enableIO = 0;
before setting the flag to enable output IO.
Onwards!
---
Neil Clayton
On 22 Jun 2006, at 19:12, Neil Clayton wrote:
Sigh. I think I'm going insane.
I've just pretty much copied what SimplePlayThru does - for a
single HAL.
I've verified that SimplePlayThru works with my Edirol - and I've
carefully crawled through the code, checking that mine is the
same. Line by line, as far as I can tell, I'm making the same
calls, in the same order. checkErr() never returns anything, so I
assume my graph and it's connections are being made OK.
My entire code is now reduced to:
ComponentDescription desc;
desc.componentType = kAudioUnitType_Output;
desc.componentSubType = kAudioUnitSubType_HALOutput;
desc.componentManufacturer = kAudioUnitManufacturer_Apple;
desc.componentFlags = 0;
desc.componentFlagsMask = 0;
OSStatus err;
err = NewAUGraph(&auGraph);
checkErr(err);
err = AUGraphNewNode(auGraph, &desc, 0, NULL, &inputNode);
checkErr(err);
err = AUGraphConnectNodeInput(auGraph, inputNode, 1, inputNode, 0);
checkErr(err);
err = AUGraphOpen(auGraph);
checkErr(err);
err = AUGraphGetNodeInfo(auGraph, inputNode, NULL, NULL, NULL,
&inputUnit);
checkErr(err);
UInt32 enableIO = 1;
err = AudioUnitSetProperty(inputUnit,
kAudioOutputUnitProperty_EnableIO,
kAudioUnitScope_Input,
1, // input element
&enableIO,
sizeof(enableIO));
checkErr(err);
enableIO = 0;
err = AudioUnitSetProperty(inputUnit,
kAudioOutputUnitProperty_EnableIO,
kAudioUnitScope_Output,
0, //output element
&enableIO,
sizeof(enableIO));
checkErr(err);
err = AUGraphInitialize(auGraph);
checkErr(err);
err = AUGraphStart(auGraph);
checkErr(err);
NSLog(@"Monitoring from %@ to %@", [self deviceNameIn], [self
deviceNameOut]);
NSLog(@"Is valid? %d - isrunnning? %d", [self isValid], [self
isRunning]);
---------------------------------------------------------------
The output of which is:
2006-06-22 19:07:13.191 AudioLevelMonitor[4406] Selected: -1, (null)
2006-06-22 19:07:13.450 AudioLevelMonitor[4406] Monitoring from
EDIROL UA-25 44.1kHz to EDIROL UA-25 44.1kHz
2006-06-22 19:07:13.451 AudioLevelMonitor[4406] Is valid? 1 -
isrunnning? 1
Yet ... still nothing!
Can anyone spot what I'm doing wrong?
Neil
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40cloudnine.net.nz
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