Send Coreaudio-api mailing list submissions to
email@hidden
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.apple.com/mailman/listinfo/coreaudio-api
or, via email, send a message with subject or body 'help' to
email@hidden
You can reach the person managing the list at
email@hidden
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Coreaudio-api digest..."
Today's Topics:
1. Getting available sample rates and bit depths (nominal vs.
physical vs. Audio MIDI Setup) (Gunnar Proppe)
----------------------------------------------------------------------
Message: 1
Date: Fri, 5 Oct 2007 13:10:20 -0700
From: Gunnar Proppe <email@hidden>
Subject: Getting available sample rates and bit depths (nominal vs.
physical vs. Audio MIDI Setup)
To: email@hidden
Message-ID: <email@hidden>
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
I'm attempting to provide the user with pop-up menus for setting the
sample rate and bit depth along with the audio output device
selection pop-up in a preference panel. I've tried a few approaches
and I'm confused by the varying results. Here's some output from my
test code:
FireOne (0007)
-- Physical rates: --
192000 24
176400 24
96000 24
88200 24
-- Virtual rates: --
192000 32
176400 32
96000 32
88200 32
-- Nominal rates: --
44100
48000
88200
96000
176400
192000
Built-in Output
-- Physical rates: --
96000 16
48000 16
44100 16
96000 20
48000 20
44100 20
-- Virtual rates: --
96000 32
48000 32
-- Nominal rates: --
44100
48000
96000
I used AudioDeviceGetProperty(...) with
kAudioStreamPropertyAvailablePhysicalFormats ,
kAudioStreamPropertyAvailableVirtualFormats,
kAudioDevicePropertyAvailableNominalSampleRates to obtain these
results.
As you can see, the FireOne reports only rates higher than 48000 Hz
for physical rates. I get a similar result with another device, a
TASCAM US-428 reports only 48000 Hz, not 44000.
Audio MIDI Setup also shows different results: it adds 24 bits to the
Built-in Output's bit depth pop-up.
I was hoping to use the results of
kAudioStreamPropertyAvailablePhysicalFormats because it pairs the bit
depths and sample rates (I'm guessing there are devices that don't
offer all sample rates at all bit depths). This is also the only way
I've found to get the native bit depths (there's no such thing as
kAudioDevicePropertyAvailableBitDepths, right?). Could our devices be
responding incorrectly to these requests (the FireOne is using the
built-in OS firewire driver)?
It's quite possible I'm doing something boneheaded in my code. If
none of this rings a bell I'll provide an excerpt.
What are the definitions of physical, virtual and nominal in this
context?
In short, how do I provide the same choices in my GUI as are shown in
Audio MIDI Setup?
Thanks,
Gunnar
NOTICE: This electronic mail message and its contents, including
any attachments hereto (collectively, "this e-mail"), is hereby
designated as "confidential and proprietary." This e-mail may be
viewed and used only by the person to whom it has been sent and his/
her employer solely for the express purpose for which it has been
disclosed and only in accordance with any confidentiality or non-
disclosure (or similar) agreement between TEAC Corporation or its
affiliates and said employer, and may not be disclosed to any other
person or entity.
------------------------------
_______________________________________________
Coreaudio-api mailing list
email@hidden
http://lists.apple.com/mailman/listinfo/coreaudio-api
End of Coreaudio-api Digest, Vol 4, Issue 272
*********************************************