Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d176ec1e authored by Glenn Kasten's avatar Glenn Kasten Committed by Android (Google) Code Review
Browse files

Merge "Fix SoundPool.play() looping" into klp-dev

parents 7f91e5e0 8973c043
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@
#define LOG_TAG "SoundPool"
#include <utils/Log.h>

//#define USE_SHARED_MEM_BUFFER
#define USE_SHARED_MEM_BUFFER

#include <media/AudioTrack.h>
#include <media/mediaplayer.h>
@@ -602,7 +602,7 @@ 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(),
                channels, sample->getIMemory(), AUDIO_OUTPUT_FLAG_NONE, callback, userData);
                channels, sample->getIMemory(), AUDIO_OUTPUT_FLAG_FAST, callback, userData);
#else
        newTrack = new AudioTrack(streamType, sampleRate, sample->format(),
                channels, frameCount, AUDIO_OUTPUT_FLAG_FAST, callback, userData,