Re: Soft Play Thru Across Separate Devices
Re: Soft Play Thru Across Separate Devices
- Subject: Re: Soft Play Thru Across Separate Devices
- From: "Michael C. Thornburgh" <email@hidden>
- Date: Fri, 11 Jul 2003 17:12:24 -0700 (PDT)
AudioMonitor currently requires that input & output devices not
only have the same sample rate, but also the same buffer size (in
frames). AND it will only copy between the first streams of any
devices. that part of it is actually really junky, and has bothered
me for a long time.
as it happens, because the isight runs at 48000 Hz and has a variable
buffer size (in frames) of between 768 and 1248 each IO cycle, that
finally prompted me to fix AudioMonitor. :) my current development
version will perform soft play-through between any two devices
running at any sample rates, with disparate buffer sizes. i'm
still working on it so that it can be instructive/demonstrative
without being too obtuse, but if anyone would like to see it in
its currently working and stable (but not good enough for real
release) state, just let me know. it also requires a new
MTCoreAudio.framework for the
"kAudioDevicePropertyUsesVariableBufferFrameSizes" property, which
i just discovered yesterday while scratching my head over my isight.
;)
also, see the "/Developer/Examples/CoreAudio/Services/PlayEffect"
example from the CoreAudio SDK for a different way of copying audio
samples from the input to the output, using AudioDeviceRead().
-mike
On Friday, July 11, 2003, at 12:10 PM, Matthew Xavier Mora wrote:
>
> At 2:42 PM -0400 7/11/03, email@hidden wrote:
>
> Hi,
>
>
>
> I was wondering how you go about doing a soft play thru on separate devices
>
> (an iMic) with low latency?
>
>
>
> I was just going to move the input into a buffer with the same number of
>
> frames as what the device is set at and then play them in the output proc. Once
>
> 1 buffer is filled can the output proc start playing or is it better to wait
>
> until 2 buffers are filled? Or is there a better way to do it?
>
> Also about what is the smallest number of frames you can set the devices
>
> buffer size before you start getting dropouts?
>
>
>
>
Look at the MTCoreAudio framework sample app called AudioMonitor. It shows how to do soft play though. Be warned that the sample does not take into account hardware not locked together.
>
>
Matt
_______________________________________________
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.