Opened 4 years ago

Closed 3 years ago

#12457 closed Bug Report - General (Fixed)

livetv not saving volume

Reported by: takuya <8twfr79wnyvqjfkp@…> Owned by: Roger Siddons
Priority: minor Milestone: unknown
Component: MythTV - Audio Output Version: Master Head
Severity: medium Keywords: livetv volume save
Cc: Ticket locked: no

Description

related: ticket:12144

tested same behavior with both software and alsa mixers
livetv channel change SOMETIMES resets volume to previous saved
exit livetv NEVER saves volume
exit recording ALWAYS saves volume

From trying to follow the source, I believe TV::PrepareToExitPlayer is the only place where the volume is saved.
This function is called when exiting a recording or video, but not livetv.
This was determined by a gdb breakpoint on TV::PrepareToExitPlayer.

When exiting a recording TV::PrepareToExitPlayer
was called by TV::ActiveHandleAction
which was called by TV::ProcessKeypress.

I noticed the "if (StateIsLiveTV(GetState(ctx)))" and that TV::PrepareToExitPlayer is only called if false.
Most of TV::PrepareToExitPlayer is not meaningful for livetv, but the following clip was added in ticket:12144 .

        if (ctx->player->GetAudio()->ControlsVolume())
        {
            ctx->player->SaveVolume();
        }

file: libmythtv/tv_play.cpp
function: TV::ActiveHandleAction

    else if (has_action("ESCAPE", actions) ||
             has_action("BACK", actions))
... clip ...
        if (StateIsLiveTV(GetState(ctx)))
        {
            if (ctx->HasPlayer() && (12 & db_playback_exit_prompt))
            {
                ShowOSDStopWatchingRecording(ctx);
                return handled;
            }
            else
            {
                do_exit = true; // ### this gets called exiting livetv
            }
        }
        else
        {
            if (ctx->HasPlayer() && (5 & db_playback_exit_prompt) &&
                !underNetworkControl && !isDVDStill)
            {
                ShowOSDStopWatchingRecording(ctx);
                return handled;
            }
            PrepareToExitPlayer(ctx, __LINE__); // ### this gets called exiting recording
            requestDelete = false;
            do_exit = true;
        }

Change History (2)

comment:1 Changed 3 years ago by Karl Egly

Owner: changed from JYA to Roger Siddons
Status: newassigned

Roger, seeing your work on #12534 this might be something for you. Feel free to unassign.

FWIW The volume is reset on audio stream change,too. (manual or automatic, e.g. at beginning/end of an ad break) But I'm not finding the ticket for that right now.

comment:2 Changed 3 years ago by Roger Siddons

Resolution: Fixed
Status: assignedclosed

The changes introduced by #12144 that caused this issue have been reverted in favour of an alternative solution, which saves the volume whenever it is changed.

Note: See TracTickets for help on using tickets.