Mailing List Archive

1 2  View All
Re: Mythmusic folder view [ In reply to ]
On Mon, 10 Dec 2012 01:24:23 -0000, Roger Siddons
<dizygotheca@ntlworld.com> wrote:

> On Sun, 09 Dec 2012 10:30:05 -0000, Paul Harrison <mythtv@sky.com> wrote:
>
>> On 08/12/12 22:59, Roger Siddons wrote:
>>>
>>> Playing selected tracks is a bit strange - Play doesn't work but 'Next
>>> Track' starts it going . I suspect a small bug.
>>> Playing everything else is simple: 'Replace Tracks' to play
>>> immediately or 'Add Tracks' to play it after your current
>>> album/playlist/etc.
>>>
>>
>> I'm curious In what way doesn't Play work? Seems to work fine here! Are
>> you saying when you press Play and you have tracks in the play queue it
>> doesn't toggle Play/Pause? On which view? Which widget has the focus?
>> Does it work while playing back video/recordings? Maybe I'm
>> misunderstanding what you want Play to do.
>>
>> Paul H.
>> _______________________________________________
>
>

<..snip...>

> My gut feeling was that putting a single track into an empty playlist
> doesn't initialise the playlist properly so any attempt to Play fails.

<..snip...>

I put this through the debugger today and I think my hunch was right.

When a track is added to an empty playlist from an Editor view there is an
attempt to play it but MusicPlayer::getCurrentMetadata fails because
m_currentTrack is -1. (Next track presumably works because it increments
it to a valid value).

Now I don't fully comprehend the design and on one occasion, whilst
stepping, it did appear to work, which led me to think there may be a
threading race condition in setting m_currentTrack: this may explain why
it works for some (ie. you?) but not others. But I'm not really convinced
of this - I think I just made a mistake in my debug session.

Anyway, adding the following code to the end of the internal 'else'
statement in PlaylistEditorView::treeItemClicked fixes it for me.

// start playing if playlist was empty
if (gPlayer->getCurrentTrackPos() < 0)
playFirstTrack();

Now, when the playlist is empty, selecting a track starts it playing and
so all music can be controlled from the Editor windows. It may not be the
most elegant solution but I think it's pretty safe.

I haven't studied all the previous MythMusic 'discussions', so sorry if I'm
re-visiting old ground, but I can't see any relevant tickets (apart from
10710) and, amongst all the "I don't like it" posts, I suspect this is the
issue that's causing a lot of the angst.

If you want to discuss further, maybe we should take it to the dev thread
- I lurk there.

By the way, Radio Streaming is awesome too.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-users

1 2  View All