Code example for AudioManager

Methods: getProperty

0
    } 
 
    @CalledByNative 
    private int getNativeOutputSampleRate() { 
        if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.JELLY_BEAN_MR1) {
            String sampleRateString = mAudioManager.getProperty(
                    AudioManager.PROPERTY_OUTPUT_SAMPLE_RATE);
            return (sampleRateString == null ?
                    DEFAULT_SAMPLING_RATE : Integer.parseInt(sampleRateString));
        } else { 
            return DEFAULT_SAMPLING_RATE;
        } 
    } 
 
  /** 
   * Returns the minimum frame size required for audio input. 
   * 
   * @param sampleRate sampling rate 
   * @param channels number of channels 
   */ 
    @CalledByNative