Re: Actual Stream vs. Physical Stream ?
Re: Actual Stream vs. Physical Stream ?
- Subject: Re: Actual Stream vs. Physical Stream ?
- From: Jeff Moore <email@hidden>
- Date: Mon, 17 Dec 2001 17:00:41 -0800
on 12/17/01 3:44 PM, Jim Dolan <email@hidden> wrote:
>
What is the difference bewtween the actual and physical stream format? It
>
sounds like the hardware may be working one way, but the IOProc data may be
>
in a different format? How do I reconsile these two things?
The physical format represents the sample format the device is doing IO in.
The regular format represents the sample format your IO proc is going to
see.
The reason for the difference is that for all linear PCM formats, the HAL
will present them to your IOProc as 32 bit floating point, regardless of
what format the hardware is doing it's IO in.
>
If the mSampleRate comes back as 0 - Does this mean that the device will
>
sample rate convert? Can I give it samples at any rate? What rate should I
>
default to in the descriptor?
From <CoreAudio/CoreAudioTypes.h>:
kAudioStreamAnyRate = 0
// the format can use any sample rate (usually because it does
// its own rate conversion). Note that this constant can only
// appear in listings of supported descriptions. It should never
// appear in the current description as a device must always
// have a "current" nominal sample rate.
What this means in practice, is that you can set the sample rate to just
about anything you like and expect the device to do the right thing. It does
not necessarily imply that the device will be doing rate conversion,
although it might be.
--
Jeff Moore
Core Audio
Apple