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