summaryrefslogtreecommitdiffstats
path: root/media/jni/soundpool
diff options
context:
space:
mode:
authorJean-Michel Trivi <jmtrivi@google.com>2015-05-13 19:03:21 -0700
committerJean-Michel Trivi <jmtrivi@google.com>2015-05-13 19:26:12 -0700
commit6c307879b75f3eac2179b23ac309df0e4ce9cedd (patch)
tree798b2296e1d1355d08e6c4fb57155a705a812df3 /media/jni/soundpool
parent857c3019bac34bbabaa8d5ebb4ab0047ca07cfc5 (diff)
downloadframeworks_base-6c307879b75f3eac2179b23ac309df0e4ce9cedd.zip
frameworks_base-6c307879b75f3eac2179b23ac309df0e4ce9cedd.tar.gz
frameworks_base-6c307879b75f3eac2179b23ac309df0e4ce9cedd.tar.bz2
AudioTrack in SoundPool uses audio_attributes_t parameter
Bug 20731155 Change-Id: I62ce9d5c5a88aaf534cfd1861378215f9253248d
Diffstat (limited to 'media/jni/soundpool')
-rw-r--r--media/jni/soundpool/SoundPool.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/media/jni/soundpool/SoundPool.cpp b/media/jni/soundpool/SoundPool.cpp
index 84ae3b4..6c1bd97 100644
--- a/media/jni/soundpool/SoundPool.cpp
+++ b/media/jni/soundpool/SoundPool.cpp
@@ -738,12 +738,16 @@ void SoundChannel::play(const sp<Sample>& sample, int nextChannelID, float leftV
// do not create a new audio track if current track is compatible with sample parameters
#ifdef USE_SHARED_MEM_BUFFER
newTrack = new AudioTrack(streamType, sampleRate, sample->format(),
- channelMask, sample->getIMemory(), AUDIO_OUTPUT_FLAG_FAST, callback, userData);
+ channelMask, sample->getIMemory(), AUDIO_OUTPUT_FLAG_FAST, callback, userData,
+ 0 /*default notification frames*/, AUDIO_SESSION_ALLOCATE,
+ AudioTrack::TRANSFER_DEFAULT,
+ NULL /*offloadInfo*/, -1 /*uid*/, -1 /*pid*/, mSoundPool->attributes());
#else
uint32_t bufferFrames = (totalFrames + (kDefaultBufferCount - 1)) / kDefaultBufferCount;
newTrack = new AudioTrack(streamType, sampleRate, sample->format(),
channelMask, frameCount, AUDIO_OUTPUT_FLAG_FAST, callback, userData,
- bufferFrames);
+ bufferFrames, AUDIO_SESSION_ALLOCATE, AudioTrack::TRANSFER_DEFAULT,
+ NULL /*offloadInfo*/, -1 /*uid*/, -1 /*pid*/, mSoundPool->attributes());
#endif
oldTrack = mAudioTrack;
status = newTrack->initCheck();