Java 类android.media.audiofx.AudioEffect.Descriptor 实例源码

项目:AppRTC-Android    文件:WebRtcAudioEffects.java   
@TargetApi(18)
private static boolean isAcousticEchoCancelerExcludedByUUID() {
  for (Descriptor d : getAvailableEffects()) {
    if (d.type.equals(AudioEffect.EFFECT_TYPE_AEC)
        && d.uuid.equals(AOSP_ACOUSTIC_ECHO_CANCELER)) {
      return true;
    }
  }
  return false;
}
项目:AppRTC-Android    文件:WebRtcAudioEffects.java   
@TargetApi(18)
private static boolean isNoiseSuppressorExcludedByUUID() {
  for (Descriptor d : getAvailableEffects()) {
    if (d.type.equals(AudioEffect.EFFECT_TYPE_NS) && d.uuid.equals(AOSP_NOISE_SUPPRESSOR)) {
      return true;
    }
  }
  return false;
}
项目:AppRTC-Android    文件:WebRtcAudioEffects.java   
private static Descriptor[] getAvailableEffects() {
  if (cachedEffects != null) {
    return cachedEffects;
  }
  // The caching is best effort only - if this method is called from several
  // threads in parallel, they may end up doing the underlying OS call
  // multiple times. It's normally only called on one thread so there's no
  // real need to optimize for the multiple threads case.
  cachedEffects = AudioEffect.queryEffects();
  return cachedEffects;
}
项目:AppRTC-Android    文件:WebRtcAudioEffects.java   
private static boolean isEffectTypeAvailable(UUID effectType) {
  Descriptor[] effects = getAvailableEffects();
  if (effects == null) {
    return false;
  }
  for (Descriptor d : effects) {
    if (d.type.equals(effectType)) {
      return true;
    }
  }
  return false;
}
项目:AndroidRTC    文件:WebRtcAudioEffects.java   
@TargetApi(18)
private static boolean isAcousticEchoCancelerExcludedByUUID() {
  for (Descriptor d : getAvailableEffects()) {
    if (d.type.equals(AudioEffect.EFFECT_TYPE_AEC)
        && d.uuid.equals(AOSP_ACOUSTIC_ECHO_CANCELER)) {
      return true;
    }
  }
  return false;
}
项目:AndroidRTC    文件:WebRtcAudioEffects.java   
@TargetApi(18)
private static boolean isNoiseSuppressorExcludedByUUID() {
  for (Descriptor d : getAvailableEffects()) {
    if (d.type.equals(AudioEffect.EFFECT_TYPE_NS) && d.uuid.equals(AOSP_NOISE_SUPPRESSOR)) {
      return true;
    }
  }
  return false;
}
项目:AndroidRTC    文件:WebRtcAudioEffects.java   
private static Descriptor[] getAvailableEffects() {
  if (cachedEffects != null) {
    return cachedEffects;
  }
  // The caching is best effort only - if this method is called from several
  // threads in parallel, they may end up doing the underlying OS call
  // multiple times. It's normally only called on one thread so there's no
  // real need to optimize for the multiple threads case.
  cachedEffects = AudioEffect.queryEffects();
  return cachedEffects;
}
项目:AndroidRTC    文件:WebRtcAudioEffects.java   
private static boolean isEffectTypeAvailable(UUID effectType) {
  Descriptor[] effects = getAvailableEffects();
  if (effects == null) {
    return false;
  }
  for (Descriptor d : effects) {
    if (d.type.equals(effectType)) {
      return true;
    }
  }
  return false;
}