summaryrefslogtreecommitdiffstats
path: root/src/itf
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2011-12-20 12:48:42 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-12-20 12:48:42 -0800
commit4bcfac513e073db89f72e2345be365f95895ca28 (patch)
tree8a56bc39838bc0b47f20f9c4aa97a4c2f72a193f /src/itf
parent017d5e6abe9135e67d32c55801d94eb1d5ecba61 (diff)
parent72042d4448cee63528c619537321ba73944c6382 (diff)
downloadandroid_frameworks_wilhelm-4bcfac513e073db89f72e2345be365f95895ca28.tar.gz
android_frameworks_wilhelm-4bcfac513e073db89f72e2345be365f95895ca28.tar.bz2
android_frameworks_wilhelm-4bcfac513e073db89f72e2345be365f95895ca28.zip
Merge "Cleanup CreateAudioPlayer and CreateMediaPlayer"
Diffstat (limited to 'src/itf')
-rw-r--r--src/itf/IEngine.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/itf/IEngine.c b/src/itf/IEngine.c
index b024fca..4b6d2b6 100644
--- a/src/itf/IEngine.c
+++ b/src/itf/IEngine.c
@@ -212,7 +212,7 @@ static SLresult IEngine_CreateAudioPlayer(SLEngineItf self, SLObjectItf *pPlayer
thiz->mSampleRateMilliHz = UNKNOWN_SAMPLERATE;
// More default values, in case destructor needs to be called early
- thiz->mDirectLevel = 0;
+ thiz->mDirectLevel = 0; // no attenuation
#ifdef USE_OUTPUTMIXEXT
thiz->mTrack = NULL;
thiz->mGains[0] = 1.0f;
@@ -237,6 +237,8 @@ static SLresult IEngine_CreateAudioPlayer(SLEngineItf self, SLObjectItf *pPlayer
android::sp<android::CallbackProtector>();
(void) new (&thiz->mAuxEffect) android::sp<android::AudioEffect>();
(void) new (&thiz->mAPlayer) android::sp<android::GenericPlayer>();
+ // Android-specific POD fields are initialized in android_audioPlayer_create,
+ // and assume calloc or memset 0 during allocation
#endif
// Check the source and sink parameters against generic constraints,
@@ -1087,8 +1089,6 @@ static XAresult IEngine_CreateMediaPlayer(XAEngineItf self, XAObjectItf *pPlayer
// More default values, in case destructor needs to be called early
thiz->mNumChannels = UNKNOWN_NUMCHANNELS;
- // (assume calloc or memset 0 during allocation)
- // placement new
#ifdef ANDROID
// placement new (explicit constructor)
// FIXME unnecessary once those fields are encapsulated in one class, rather
@@ -1096,6 +1096,8 @@ static XAresult IEngine_CreateMediaPlayer(XAEngineItf self, XAObjectItf *pPlayer
(void) new (&thiz->mAVPlayer) android::sp<android::GenericPlayer>();
(void) new (&thiz->mCallbackProtector)
android::sp<android::CallbackProtector>();
+ // Android-specific POD fields are initialized in android_Player_create,
+ // and assume calloc or memset 0 during allocation
#endif
// Check the source and sink parameters against generic constraints