AudioResamplerPublic.h revision cd04484f4837b8ca0041d118286ab6a98e84fc75
1/* 2 * Copyright (C) 2014 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17#ifndef ANDROID_AUDIO_RESAMPLER_PUBLIC_H 18#define ANDROID_AUDIO_RESAMPLER_PUBLIC_H 19 20// AUDIO_RESAMPLER_DOWN_RATIO_MAX is the maximum ratio between the original 21// audio sample rate and the target rate when downsampling, 22// as permitted in the audio framework, e.g. AudioTrack and AudioFlinger. 23// In practice, it is not recommended to downsample more than 6:1 24// for best audio quality, even though the audio framework permits a larger 25// downsampling ratio. 26// TODO: replace with an API 27#define AUDIO_RESAMPLER_DOWN_RATIO_MAX 256 28 29#endif // ANDROID_AUDIO_RESAMPLER_PUBLIC_H 30