diff options
| author | Andy Hung <hunga@google.com> | 2015-05-12 18:42:59 +0000 | 
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-05-12 18:43:00 +0000 | 
| commit | d9f493ebcd1830c76d7b1782e64c7ba9ad8ab4bd (patch) | |
| tree | 1d075b113943a8e3a032b9162100f05490213250 /include | |
| parent | 69dce3343ffe33d2ba60ab4c6755953a7ec96899 (diff) | |
| parent | db4c031f518ae5806af73756273ff32cd8d0e4f8 (diff) | |
| download | frameworks_av-d9f493ebcd1830c76d7b1782e64c7ba9ad8ab4bd.zip frameworks_av-d9f493ebcd1830c76d7b1782e64c7ba9ad8ab4bd.tar.gz frameworks_av-d9f493ebcd1830c76d7b1782e64c7ba9ad8ab4bd.tar.bz2  | |
Merge "Update sampling rate to 192kHz for devices" into mnc-dev
Diffstat (limited to 'include')
| -rw-r--r-- | include/media/AudioResamplerPublic.h | 10 | 
1 files changed, 10 insertions, 0 deletions
diff --git a/include/media/AudioResamplerPublic.h b/include/media/AudioResamplerPublic.h index 53b8c13..6cf2ca9 100644 --- a/include/media/AudioResamplerPublic.h +++ b/include/media/AudioResamplerPublic.h @@ -143,6 +143,16 @@ static inline size_t sourceFramesNeededWithTimestretch(      return required * (double)speed + 1 + 1; // accounting for rounding dependencies  } +// Identifies sample rates that we associate with music +// and thus eligible for better resampling and fast capture. +// This is somewhat less than 44100 to allow for pitch correction +// involving resampling as well as asynchronous resampling. +#define AUDIO_PROCESSING_MUSIC_RATE 40000 + +static inline bool isMusicRate(uint32_t sampleRate) { +    return sampleRate >= AUDIO_PROCESSING_MUSIC_RATE; +} +  } // namespace android  // ---------------------------------------------------------------------------  | 
