summaryrefslogtreecommitdiffstats
path: root/services/audioflinger
diff options
context:
space:
mode:
authorChih-Hung Hsieh <chh@google.com>2014-12-12 00:54:15 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-12-12 00:54:15 +0000
commit67c93ad704d4418445c6d9693420f1cbaad98b0a (patch)
tree38add76831d864320989bd888ed5494eedda09c3 /services/audioflinger
parentab01c22a69da8750323a9bfddd023b7e46c6fa76 (diff)
parentf1b12df3dd7d070a62544d309593aea554f93c27 (diff)
downloadframeworks_av-67c93ad704d4418445c6d9693420f1cbaad98b0a.zip
frameworks_av-67c93ad704d4418445c6d9693420f1cbaad98b0a.tar.gz
frameworks_av-67c93ad704d4418445c6d9693420f1cbaad98b0a.tar.bz2
am f1b12df3: Merge "Trigger error only when a template is instantiated."
* commit 'f1b12df3dd7d070a62544d309593aea554f93c27': Trigger error only when a template is instantiated.
Diffstat (limited to 'services/audioflinger')
-rw-r--r--services/audioflinger/AudioMixerOps.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/services/audioflinger/AudioMixerOps.h b/services/audioflinger/AudioMixerOps.h
index f7376a8..2678857 100644
--- a/services/audioflinger/AudioMixerOps.h
+++ b/services/audioflinger/AudioMixerOps.h
@@ -52,15 +52,12 @@ struct is_same<T, T> // partial specialization
*
* For high precision audio, only the <TO, TI, TV> = <float, float, float>
* needs to be accelerated. This is perhaps the easiest form to do quickly as well.
+ *
+ * A generic version is NOT defined to catch any mistake of using it.
*/
template <typename TO, typename TI, typename TV>
-inline TO MixMul(TI value, TV volume) {
- COMPILE_TIME_ASSERT_FUNCTION_SCOPE(false);
- // should not be here :-).
- // To avoid mistakes, this template is always specialized.
- return value * volume;
-}
+TO MixMul(TI value, TV volume);
template <>
inline int32_t MixMul<int32_t, int16_t, int16_t>(int16_t value, int16_t volume) {