summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorChih-Hung Hsieh <chh@google.com>2014-12-12 01:08:20 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-12-12 01:08:20 +0000
commit105e6e0c38947e97f9e199d9f07f9be64ae3cfe1 (patch)
tree09df304495199fc253b97d1db9ba5acc809e4fb1 /services
parent2590fc421ccf5e8199d511ff3022b428ee9122e9 (diff)
parent7b2b26750fb0a567f2d1b7a3547ae877d336e405 (diff)
downloadframeworks_av-105e6e0c38947e97f9e199d9f07f9be64ae3cfe1.zip
frameworks_av-105e6e0c38947e97f9e199d9f07f9be64ae3cfe1.tar.gz
frameworks_av-105e6e0c38947e97f9e199d9f07f9be64ae3cfe1.tar.bz2
am 7b2b2675: am 67c93ad7: am f1b12df3: Merge "Trigger error only when a template is instantiated."
* commit '7b2b26750fb0a567f2d1b7a3547ae877d336e405': Trigger error only when a template is instantiated.
Diffstat (limited to 'services')
-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) {