• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Still stuck on sample rate changes to input.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Still stuck on sample rate changes to input.
      • From: Chris Reed <email@hidden>
  • Prev by Date: What now ???
  • Next by Date: Changing the refCons
  • Previous by thread: Re: What now ???
  • Next by thread: Re: Still stuck on sample rate changes to input.
  • Index(es):
    • Date
    • Thread