diff options
| author | Andy Hung <hunga@google.com> | 2015-05-06 08:46:52 -0700 | 
|---|---|---|
| committer | Andy Hung <hunga@google.com> | 2015-05-12 09:30:51 -0700 | 
| commit | db4c031f518ae5806af73756273ff32cd8d0e4f8 (patch) | |
| tree | 62f9e0541acccc3acacf808d2a3cdad130eb819b /include | |
| parent | 18aa27016a94d0fee243637a80fd0741f89e08f2 (diff) | |
| download | frameworks_av-db4c031f518ae5806af73756273ff32cd8d0e4f8.zip frameworks_av-db4c031f518ae5806af73756273ff32cd8d0e4f8.tar.gz frameworks_av-db4c031f518ae5806af73756273ff32cd8d0e4f8.tar.bz2  | |
Update sampling rate to 192kHz for devices
Change-Id: I0a83206be51d7ae18ccf85b94b2127356307be69
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  // ---------------------------------------------------------------------------  | 
