merge in nyc-release history after reset to nyc-dev
diff --git a/src/android/AudioPlayer_to_android.cpp b/src/android/AudioPlayer_to_android.cpp
index 05fc5dd..4492d02 100644
--- a/src/android/AudioPlayer_to_android.cpp
+++ b/src/android/AudioPlayer_to_android.cpp
@@ -1489,16 +1489,18 @@
channelMask);
audio_output_flags_t policy;
+ int32_t notificationFrames;
if (canUseFastTrack(pAudioPlayer)) {
policy = (audio_output_flags_t)(AUDIO_OUTPUT_FLAG_FAST | AUDIO_OUTPUT_FLAG_RAW);
+ // negative notificationFrames is the number of notifications (sub-buffers) per track buffer
+ // for details see the explanation at frameworks/av/include/media/AudioTrack.h
+ notificationFrames = -pAudioPlayer->mBufferQueue.mNumBuffers;
} else {
policy = AUDIO_OUTPUT_FLAG_NONE;
+ // use default notifications
+ notificationFrames = 0;
}
- // negative notificationFrames is the number of notifications (sub-buffers) per track buffer
- // for details see the explanation at frameworks/av/include/media/AudioTrack.h
- const int32_t notificationFrames = -pAudioPlayer->mBufferQueue.mNumBuffers;
-
pAudioPlayer->mAudioTrack = new android::AudioTrack(
pAudioPlayer->mStreamType, // streamType
sampleRate, // sampleRate