Logo Search packages:      
Sourcecode: jacktrip version File versions  Download package

int JackAudioInterface::getSampleRateFromType ( samplingRateT  rate_type ) [static]

Helper function to get the sample rate (in Hz) for a JackAudioInterface::samplingRateT.

Parameters:
rate_typeJackAudioInterface::samplingRateT enum type
Returns:
Sample Rate in Hz

Definition at line 235 of file JackAudioInterface.cpp.

References SR192, SR22, SR32, SR44, SR48, SR88, and SR96.

Referenced by DefaultHeader::checkPeerSettings().

{
  int sample_rate = 0;
  switch (rate_type)
    {
    case SR22 :
      sample_rate = 22050;
      return sample_rate;
      break;
    case SR32 :
      sample_rate = 32000;
      return sample_rate;
      break;
    case SR44 :
      sample_rate = 44100;
      return sample_rate;
      break;
    case SR48 :
      sample_rate = 48000;
      return sample_rate;
      break;
    case SR88 :
      sample_rate = 88200;
      return sample_rate;
      break;
    case SR96 :
      sample_rate = 96000;
      return sample_rate;
      break;
    case SR192 :
      sample_rate = 192000;
      return sample_rate;
      break;
    default:
      return sample_rate;
      break;
    }

  return sample_rate;
}

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index