Still stuck on sample rate changes to input.
Still stuck on sample rate changes to input.
- Subject: Still stuck on sample rate changes to input.
- From: Michael Bonnice <email@hidden>
- Date: Sun, 26 Oct 2003 00:12:41 -0700
I used the property selectors that Jeff Moore showed in his recent
reply and it seems the number of available samples rates for the line
in is still limited to 44100. The code below returns:
found 1 ranges
For range 0, range is 44100.0 - 44100.0
Why doesn't the line input device have more available sample rates?
Mike
OSStatus err = kAudioHardwareNoError;
UInt32 count;
AudioValueRange * rangeArray;
UInt32 numRanges;
int x;
count = sizeof(indevice);
err =
AudioHardwareGetProperty(kAudioHardwarePropertyDefaultInputDevice,
&count, (void *) &indevice);
if (err != kAudioHardwareNoError) {
fprintf(stderr, "get kAudioHardwarePropertyDefaultInputDevice
error %ld\n", err);
return;
}
err = AudioDeviceGetPropertyInfo ( indevice, 0, true,
kAudioDevicePropertyAvailableNominalSampleRates, &count, NULL );
if ( err != kAudioHardwareNoError ) {
fprintf(stderr, "get
kAudioDevicePropertyAvailableNominalSampleRates error %ld\n", err);
return;
}
numRanges = count / sizeof(AudioValueRange);
rangeArray = malloc ( count );
err = AudioDeviceGetProperty ( indevice, 0, true,
kAudioDevicePropertyAvailableNominalSampleRates, &count, rangeArray );
if ( err != kAudioHardwareNoError ) {
fprintf(stderr, "get
kAudioDevicePropertyAvailableNominalSampleRates error %ld\n", err);
return;
}
fprintf (stderr, "found %ld ranges\n", numRanges );
for ( x = 0; x < numRanges; x++ )
{
fprintf( stderr, "For range %d, range is .1f - .1f\n", x,
rangeArray[x].mMinimum, rangeArray[x].mMaximum );
}
_______________________________________________
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.