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

Commit f9007940 authored by Steve Kondik's avatar Steve Kondik Committed by Gerrit Code Review
Browse files

Merge "framework/base: Fix for Camera shutter sound heard twice" into gingerbread

parents c241a242 38ce282c
Loading
Loading
Loading
Loading
+4 −9
Original line number Diff line number Diff line
@@ -941,7 +941,6 @@ status_t AwesomePlayer::play_l() {
        }
}
#endif
    bool deferredAudioSeek = false;

    if (mAudioSource != NULL) {
        if (mAudioPlayer == NULL) {
@@ -949,6 +948,10 @@ status_t AwesomePlayer::play_l() {
                mAudioPlayer = new AudioPlayer(mAudioSink, this);
                mAudioPlayer->setSource(mAudioSource);

                // If there was a seek request while we were paused
                // and we're just starting up again, honor the request now.
                seekAudioIfNecessary_l();

                // We've already started the MediaSource in order to enable
                // the prefetcher to read its data.
                status_t err = mAudioPlayer->start(
@@ -970,8 +973,6 @@ status_t AwesomePlayer::play_l() {

                mTimeSource = mAudioPlayer;

                deferredAudioSeek = true;

                mWatchForAudioSeekComplete = false;
                mWatchForAudioEOS = true;
            }
@@ -1007,12 +1008,6 @@ status_t AwesomePlayer::play_l() {
        postVideoEvent_l();
    }

    if (deferredAudioSeek) {
        // If there was a seek request while we were paused
        // and we're just starting up again, honor the request now.
        seekAudioIfNecessary_l();
    }

    if (mFlags & AT_EOS) {
        // Legacy behaviour, if a stream finishes playing and then
        // is started again, we play from the start...