• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to monitor what is being recorded?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to monitor what is being recorded?


  • Subject: Re: How to monitor what is being recorded?
  • From: William Stewart <email@hidden>
  • Date: Fri, 11 Jun 2004 18:37:12 -0700

On 11/06/2004, at 12:15 AM, Roni Music wrote:

> ----- Original Message -----
> From: "William Stewart" <email@hidden>
> To: "Rolf Nilsson" <email@hidden>
> Cc: <email@hidden>
> Sent: Thursday, June 10, 2004 4:02 AM
> Subject: Re: How to monitor what is being recorded?
>
>
>> What's the failure case when you set the connection?
>
> There is no failure but also no sound so it seems there is something I
> do not understand?
>
> When I set up the connection below, I expect that whatever arrives at
> the input (bus 1?) is also sent to the output device at bus 0?
>
> AudioUnitConnection connection;
> connection.sourceAudioUnit = theInputUnit;
> connection.sourceOutputNumber = 1;
> connection.destInputNumber = 0;
> AudioUnitSetProperty( theOutputUnit,
> kAudioUnitProperty_MakeConnection, kAudioUnitScope_Input,
> 0/*inElement*/, &connection,
> sizeof(AudioUnitConnection));
>
>
> But if I make the connection, the render callback for the output is
> never called.
> So when I make the connection does that mean that there is no need for
> the render callback?

Yes - the callback is there really to tell you that Input is there...
but if you already in the I/O Proc because you are doing output to the
device you are getting input from, then you don't need it... However,
if you've installed it, it should still fire, so I expect that
something is not quite right... If you install an AU between the
connection between the input and output, then that would be a good test
case, as I'm not quite convinced that connecting the output unit to
itself is really working...

Bill


> The output unit works fine by itself (trying it with a simple sinus
> tone) and is created with
> kAudioUnitType_Output, kAudioUnitSubType_HALOutput and
> kAudioUnitManufactor_Apple
>
> then
> FinNextComponent() and OpenAComponent()
>
> then
> _SetRenderCallback
> and _StreamFormat to the sames as the input
>
> and lastly _MakeConnection as above and AudioUnitInitialize()
>
> The InputDevice is set up exactly as in your CAAudioFileRecorder
> example (the output is disabled and the input is enabled)
>
> Is there any example of playthru with
> kAudioUnitProperty_MakeConnection in the develop examples?
>
> Any help appreciated
>
> Rolf
>
>
>>
>> Bill
>>
>> On 09/06/2004, at 1:18 PM, Rolf Nilsson wrote:
>>
>>>
>>>
>>> Thanks for replying!
>>>
>>>
>>>> To monitor what is going out - lets say (like Chilton's previous
>>>> example) that you've established a connection between the AUHAL
>>> (input)
>>>> to something to AUHAL for output...
>>>
>>> Maybe the word "monitor" is not what I mean?
>>> I want what is coming in at the input should be sent to the output.
>>>
>>> Is it possible to make a connection between the input and output like
>>> this (it does not work as I try it)
>>>
>>> AudioUnitConnection connection;
>>> connection.sourceAudioUnit = theInputUnit;
>>> connection.sourceOutputNumber = 1;
>>> connection.destInputNumber = 0;
>>> AudioUnitSetProperty( theOutputUnit,
>>> kAudioUnitProperty_MakeConnection, kAudioUnitScope_Input,
>>> 0/*inElement*/, &connection, sizeof(AudioUnitConnection));
>>>
>>>
>>> or
>>>
>>> must I transfer the incoming data from the input callback to the
>>> output callback via a queue/ringbuffer
>>> as in the /CoreAudio/HAL/AudioThru example?
>>>
>>>
>>>>
>>>> You can attach a render notification to the AUHAL - that gets called
>>>> whenever it renders (which is every I/O cycle)... In the AUHAL case
>>>> (because the same AU is doing input as well as output) you should
>>> check
>>>> the bus (element) number in the notification.
>>>>
>>>> When you see both:
>>>> post render flag
>>>> and
>>>> bus zero
>>>>
>>>> then the ABL that is passed to the render notification contains the
>>>> audio data that will then be fed to the device.
>>>
>>> I did set up a render notification with AudioUnitAddRenderNotify()
>>> for
>>> the output device (or should it be the input device?)
>>> and in the notification callback I check for
>>>
>>> if ( (*ioActionFlags & kAudioUnitRenderAction_PostRender) &&
>>> (inBusNumber == 0))
>>> {
>>> // what do I do here?
>>> }
>>>
>>>
>>>>
>>>> Does that make sense?
>>>
>>> Not sure? I guess I'm a bit confused?
>>>
>>> I just want the sound from the default input device to be sent to the
>>> default output device (play thru)
>>>
>>> Rolf
> _______________________________________________
> 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.
>
>
--
mailto:email@hidden
tel: +1 408 974 4056

________________________________________________________________________
__
Culture Ship Names:
Ravished By The Sheer Implausibility Of That Last Statement [GSV]
I said, I've Got A Big Stick [OU]
Inappropiate Response [OU]
Far Over The Borders Of Insanity And Still Accelerating [Eccentric]
________________________________________________________________________
__
_______________________________________________
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.


References: 
 >Re: How to monitor what is being recorded? (From: "Roni Music" <email@hidden>)

  • Prev by Date: Waves and Applied Acoustics AU view issues with Rax
  • Next by Date: Re: MusicSequenceLoadSMFWithFlags availability?
  • Previous by thread: Re: How to monitor what is being recorded?
  • Next by thread: Re: How to monitor what is being recorded?
  • Index(es):
    • Date
    • Thread