Using the default output as an input to an audio unit
Using the default output as an input to an audio unit
- Subject: Using the default output as an input to an audio unit
- From: James Udo Ludtke <email@hidden>
- Date: Mon, 17 Nov 2008 12:33:14 -0500
I am updating an application, which contains a sound generator
connected to the default audio output. I am adding a feature, which
allows the user to create an audio file containing his customized
sound sequence.
The output of the sound-generator audio unit is set to
kAudioHardwarePropertyDefaultOutputDevice
and the created sounds dutifully appear at the default audio output.
If I set the input of the file-generator audio unit to
kAudioHardwarePropertyDefaultInputDevice
the created sound file contains the audio that was present at the
default audio input, and when I use a patch cord to patch the default
audio output to the default audio input, the sounds created by my
application are recorded to the audio file.
So far so good, but I have not been able to connect the output from
the sound generator to the file generator within my code.
If I set the ***output*** of the sound generator to
kAudioHardwarePropertyDefaultInputDevice,
I get no compile or run time errors, the code actually works and
creates valid audio file, but the file contains recorded silence.
If I set the ***input*** of the file generator to
kAudioHardwarePropertyDefaultOutputDevice, I get no compile errors,
but the audio file generated is only 4KB, and is not a valid audio file.
I appears that the input of audio units can only be set to input
devices. I have searched the Apple Developer site for documentation
and examples of how to get around that limitation, but did not find
any suggestions. It should be possible, but I just have not been able
to figure out how to do it. It would be nice if Xcode provided a “hand-
over“ channel, similar to the input or output channels, for that purpose
Any suggestions where I might find relevant information, or suggestion
what else I might try, would be welcome. _______________________________________________
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