Re: Using the default output as an input to an audio unit
Re: Using the default output as an input to an audio unit
- Subject: Re: Using the default output as an input to an audio unit
- From: Brian Willoughby <email@hidden>
- Date: Mon, 17 Nov 2008 14:39:17 -0800
Is the "sound generator" an actual AudioUnit, or is it just part of
the application code?
How is the default audio output connected? Does the application use
the AUGraph API to make this connection? ... or does the application
simply fill in the audio samples during the callback?
No, you cannot 'play' audio into the default audio input, and you
cannot force the default audio output to be redirected to additional
software without writing a driver. Instead, what you want to do is
alter the graph in your application, and how you do this depends
greatly upon how the application is written.
Brian Willoughby
Sound Consulting
On Nov 17, 2008, at 09:33, James Udo Ludtke wrote:
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.
_______________________________________________
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