[mythtv] audio.isPaused not working for OpenSLES audio

Mark Spieth mark at digivation.com.au
Sat Jul 21 07:09:09 UTC 2018


On 7/21/2018 9:04 AM, Peter Bennett 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 
>>> or 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 
>>> problems.
>>>
>> 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.
>>
>> Mark
> Stretch was not enabled. This is the code that pauses audio right at 
> the 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 audio.pause(). 
What it should be doing is initially its in pause until bufferred mode. 
If you ry an unpause it will stay in that mode until the first audio 
data is written/queued.
So when you start playing, yes it is in paused mode until you write the 
first audio data, when it un-pauses.
If you are withholding audio data, then it will stay paused until you 
write the first data.
Can you post a patch as to what you are trying to do and I will see if 
there is a better way.
Building your latest patch with master now.

Mark

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus



More information about the mythtv-dev mailing list