Re: Beginner: How to set the sampling rate of a USB audio input device
Re: Beginner: How to set the sampling rate of a USB audio input device
- Subject: Re: Beginner: How to set the sampling rate of a USB audio input device
- From: William Stewart <email@hidden>
- Date: Fri, 26 May 2006 10:42:28 -0700
You shouldn't normally be changing the sample rate of a device in
this way. If you use the Output Unit, then all you need to do is to
tell it what the sample rate of your content is, and then it will do
any required rate conversions between your format and the device's
format. There's examples in the sample code /Developer/Examples/
CoreAudio for using the Default output unit (which is probably the
one that you want I think)
Bill
On 26/05/2006, at 12:50 AM, Hiroshi T. wrote:
Hello, I'm new to audio programming in OS X.
I have a USB audio device that is connected to S/PDIF output of
digital radio tuner.
The sampling rates of the tuner output are 48 and 32 KHz according
to the tuned channel.
When I change the channel from 48 to 32 KHz and vice versa, the
audio device does not send
a correct sound stream and I have to reset the sampling rate using
the system application
"Audio Midi Setup".
I run a timer recording script that controls the tuner. I want to
set the sampling rate of the
USB device from this script. I once tried Applescript solution to
control the "Audio Midi Setup"
but could not change the sampling rate of the device. I'm afraid I
have to learn about APIs to
accomplish this.
Are there any sample code to set the sampling rate of a USB audio
input device?
Could anyone tell me where to start?
Thank you in advance.
_______________________________________________
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
--
mailto:email@hidden
tel: +1 408 974 4056
________________________________________________________________________
__
"Much human ingenuity has gone into finding the ultimate Before.
The current state of knowledge can be summarized thus:
In the beginning, there was nothing, which exploded" - Terry Pratchett
________________________________________________________________________
__
_______________________________________________
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