[mythtv] audio.isPaused not working for OpenSLES audio
mark at digivation.com.au
Fri Jul 20 23:29:14 UTC 2018
On 21 July 2018 09:04:51 GMT+10:00, Peter Bennett <pb.mythtv at gmail.com> wrote:
>On 07/20/2018 06:19 PM, Mark Spieth wrote:
>> On 7/21/2018 3:48 AM, Peter Bennett wrote:
>>> Hi Mark
>>> I assume you created the android OpenSLES audio support in MythTV. I
>>> found that audio.isPaused() always returns true, even in the middle
>>> of playing audio and video. This was causing audio-video sync to not
>>> work correctly. I fixed it by taking that check out. It was not
>>> necessary to check audio.isPaused() before calling Pause(). I just
>>> made it unconditionally call Pause() whether it was already paused
>>> not. However I wonder if there is an error that is causing it to
>>> always return isPaused() as true and whether that may cause other
>> That is strange. All the paused processing is in AudioOutputBase, and
>> except for Jack and CA there is nothing in any of the other drivers.
>> This is probably affecting many drivers then.
>> Is this with or without stretch enabled? There is a bit of a
>> difference there. I will dig some more today.
>Stretch was not enabled. This is the code that pauses audio right at
>start of live tv to allow the video to catch up. the audio was never
>being paused. MythPlayer::PrebufferEnoughFrames - also
>MythPlayer::AVSync where audio.isPaused is checked before
I understand that. I'm saying it should be happening for alsa and everything else too. The actually_paused flag is not being cleared because it's started in pause mode. Timestretch setting clears it up front.
There is something fishy in the audio pause logic that needs fixing. I'm amazed this hasnt been discovered before.
More information about the mythtv-dev