Commit 2ab5ad96 authored by Glenn Kasten's avatar Glenn Kasten
Browse files

Don't specify sub-buffer count for non-fast tracks

Bug: 28695447
Change-Id: I81bfd3a02c9600e3f1d9abc68bb2d70d45112260
parent f9300116
......@@ -1489,16 +1489,18 @@ SLresult android_audioPlayer_realize(CAudioPlayer *pAudioPlayer, SLboolean async
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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment