Connecting and AudioDevice to a Mixer
Connecting and AudioDevice to a Mixer
- Subject: Connecting and AudioDevice to a Mixer
- From: Craig Bakalian <email@hidden>
- Date: Mon, 12 Jan 2004 19:14:23 -0500
From: email@hidden
Subject: Connecting an AudioDevice to a Mixer?
Date: January 12, 2004 7:00:26 PM EST
To: email@hidden
Hi,
I am not sure about how to do this yet, is this possible ->
To tie this InputIOProc from a microphone
AudioDeviceAddIOProc([mInputDevice mID], InputIOProc, self);
static OSStatus InputIOProc ( AudioDeviceID inDevice,
const AudioTimeStamp* inNow,
const AudioBufferList* inInputData,
const AudioTimeStamp* inInputTime,
AudioBufferList* outOutputData,
const AudioTimeStamp* inOutputTime,
void* inClientData)
{
blah, blah...
}
to a mixer unit like this ->
Boolean setUpMixerInputCallback(AudioUnitRenderCallback callback, void
*refCon, UInt32 busNumber)
{
struct AudioUnitInputCallback callbackStruct;
OSStatus err;
callbackStruct.inputProc = callback;
callbackStruct.inputProcRefCon = refCon;
err = AudioUnitSetProperty(mixerAudioUnit,
kAudioUnitProperty_SetInputCallback, kAudioUnitScope_Input, busNumber,
&callbackStruct, sizeof(callbackStruct));
return (noErr == err);
}
OSStatus myMixerInputCallback(void *inRefCon,
AudioUnitRenderActionFlags inActionFlags, const AudioTimeStamp
*inTimeStamp, UInt32 inBusNumber, AudioBuffer ioData)
{
}
Where the tie would be to store the AudioBufferList * outOutputData of
the InputIOProc in some object, and fetch it and place it in the
AudioBuffer ioData of the myMixerInputCallback?
I am thinking about this correctly, I mean I know I am leaving things
out, but do I can I do this?
Craig Bakalian
www.eThinkingCap.com
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.