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

Commit 09508611 authored by Eric Laurent's avatar Eric Laurent
Browse files

Fix issue 4988574: 8 bit PCM audio playback broken.

Fixed regression in audio track control block frame size
calculation introduced by commit c310dcbe.

Change-Id: Ia731b946ae4e43316b98d80229e3b08a696e47d6
parent ec89a2b6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2954,7 +2954,7 @@ AudioFlinger::PlaybackThread::Track::Track(
        mStreamType = streamType;
        // NOTE: audio_track_cblk_t::frameSize for 8 bit PCM data is based on a sample size of
        // 16 bit because data is converted to 16 bit before being stored in buffer by AudioTrack
        mCblk->frameSize = audio_is_linear_pcm(format) ? mChannelCount * audio_bytes_per_sample(format) : sizeof(uint8_t);
        mCblk->frameSize = audio_is_linear_pcm(format) ? mChannelCount * sizeof(int16_t) : sizeof(uint8_t);
    }
}