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

Commit 8a74f1bc authored by Andreas Huber's avatar Andreas Huber Committed by Android (Google) Code Review
Browse files

Merge "After failing to create an AudioTrack, only stop the source if we were...

Merge "After failing to create an AudioTrack, only stop the source if we were the ones starting it." into kraken
parents a7414ea2 69ec58ee
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -87,7 +87,9 @@ status_t AudioPlayer::start(bool sourceAlreadyStarted) {
                DEFAULT_AUDIOSINK_BUFFERCOUNT,
                &AudioPlayer::AudioSinkCallback, this);
        if (err != OK) {
            if (!sourceAlreadyStarted) {
                mSource->stop();
            }

            return err;
        }
@@ -108,7 +110,9 @@ status_t AudioPlayer::start(bool sourceAlreadyStarted) {
            delete mAudioTrack;
            mAudioTrack = NULL;

            if (!sourceAlreadyStarted) {
                mSource->stop();
            }

            return err;
        }