Re: Acquiring input Data
Re: Acquiring input Data
- Subject: Re: Acquiring input Data
- From: Paul Barbot <email@hidden>
- Date: Wed, 22 Jun 2005 19:41:44 +0200
On 6/22/05, Heath Raftery <email@hidden> wrote:
> > I got that on the console :
> > AudioStreamBasicDescription: 0 ch, 44100 Hz, ' ' (0x00000000) 0
> > bits/channel, 0 bytes/packet, 0 frames/packet, 0 bytes/frame
> > I have a bad feeling about all these zero, is that normal ?.
>
> No, I'm afraid that is not normal. Something has gone wrong here. Are
> you doing the OpenAComponent bit (I assume that's your OpenUnit()
> function)?
>
> desc.componentType = kAudioUnitType_Output;
> desc.componentSubType = kAudioUnitSubType_HALOutput;
> desc.componentManufacturer = kAudioUnitManufacturer_Apple;
> desc.componentFlags = 0;
> desc.componentFlagsMask = 0;
> comp = FindNextComponent(NULL, &desc);
> OpenAComponent(comp, &InputUnit);
Yes, that's exactly my OpenUnit() function .
> What about your SetDefaultInputDeviceAsCurrent()? You need to find
> the system input device, and then set the input unit's device to that
> device:
>
> theSize = sizeof(AudioDeviceID);
> AudioHardwareGetProperty(kAudioHardwarePropertyDefaultInputDevice,
> &theSize,
> &InputDeviceID);
> AudioUnitSetProperty(InputUnit,
> kAudioOutputUnitProperty_CurrentDevice,
> kAudioUnitScope_Input,
> 1,
> &InputDeviceID,
> sizeof(InputDeviceID));
That strange, from the technote I have a kAudioUnitScope_Global,0
instead of kAudioUnitScope_Input,1 !
Watever it stil doesn't work with this...
> After all that is done, printing the StreamBasicDescription should
> give you something like this:
> AudioStreamBasicDescription: 2 ch, 44100 Hz, 'lpcm' (0x0000002B) 32-
> bit big-endian float, deinterleaved
[...]
> Well that's progress :)
> Keep an eye on your InputUnit in the debugger. It should start to
> fill with values as you go through the functions to set it up. Follow
> the technote you were reading, and make sure you have included the
> functions we've mentioned in this thread. You'll get there!
I hope so ...
--
Paul Barbot
_______________________________________________
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