Table of Contents

Resume A Global Play

1.0 Introduction

The 'Resume a Global Play' menu option was only introduced to Giocoso in Version 3.30. It is used in a Giocoso Pro environment to allow one Giocoso installation to resume a play of a recording that another Giocoso device has paused. For example, you might pause a play in your main listening room so that you can continue listening to it in the bedroom on a laptop, or vice versa.

The option will only do anything if (a) you're properly configured to use a Giocoso Pro server; and (b) if there are actually any paused 'plays' on other configured Giocoso-using devices.

Configuring a Giocoso installation to run in 'Pro mode' can be read about here, but it essentially means using the Administration menu, Option 2 and supplying the IP address of a remote Giocoso Pro Server that you've built and configured ahead of time. If you haven't done that then taking the 'Resume a Global Play' menu option simply triggers the display of the following error message:

Without a Giocoso Pro server to talk to and read from, a Giocoso instance cannot know what has been paused by another computer and therefore no functionality in this menu option can work.

If you have configured your local installation of Giocoso to access a Giocoso Pro server, however, then taking this menu option does the following:

Note that if your Giocoso devices are all sharing, say, a NAS device over the network, then it can take several tens of seconds for the resuming device to work its way through the music stream to the point that the paused device had reached. For this reason, resuming a global play works best when each Giocoso device has a local copy of music files, periodically refreshed from a common NAS source. It is much faster for Giocoso to work through a local music stream than it is a network one. However, the single-NAS-shared-by-all approach works well enough, too: you just have to be more patient before music playback actually resumes.

2.0 The Pause Status Table

Whenever a Giocoso device running in Pro mode selects to pause a playing recording, some data is transferred to the Giocoso Pro Server's GLOBAL_PAUSESTATUS table. The data consists of three pieces of information:

Here's a screenshot of the relevant table, using a program called DBeaver, which is a free piece of software that provides a graphical way to manage and inspect MySQL databases, which is what a Giocoso Pro Server runs:

You can see Giocoso is playing some Haydn at the top of the screen; beneath is the DBeaver display of the GLOBAL_PAUSESTATUS table …and it is completely empty, with no records of any sort in it. Now let me pause the Haydn play:

Now you can see that the Haydn playback has been paused: the 'Pause/Resume' option in the control bar at the bottom of the playing screen is bright green. You'll also notice from the top right of the Giocoso window that I've played 1 hour, 22 minutes and 21 seconds of this recording before pausing. If you do a bit of maths, you'll be able to work out that this is equivalent to 4,941 seconds of elapsed play-time before the pause button was activated.

Beneath the now-paused Haydn window, we see that the GLOBAL_PAUSESTATUS table now contains a single record: it tells us that a PC with a hostname of 'schumann' has paused a recording with a unique identifier of 'e1504f66d5…' at 4,941 seconds. Don't get confused by that first column: it's not saying that a piece of music by Robert Schumann has been paused! You're viewing the perhaps-unfortunate habit I have of giving my PCs, laptops and servers names of composers when I build them: so this is “a PC with an assigned hostname of 'schumann'”, nothing to do with the composer's music!

Anyway: the point is, that pausing a Play when operating in 'Pro' mode causes data to be written to the GLOBAL_PAUSESTATUS table -and if you un-pause a recording on the same PC, that data is deleted. The PAUSESTATUS table therefore only has rows of data in it when something is actually and actively paused.

Note that the primary key of the PAUSESTATUS table is the DEVICENAME column: that means you cannot have the same PC with more than one row of data describing something being paused. Hopefully, that's an obvious and realistic consequence of the fact that a single PC cannot actually play more than one piece of music at a time …and therefore certainly can't be pausing more than one recording at a time! It does mean, however, that Giocoso device names have to be unique -which they need to be on a network anyway, so that shouldn't be an issue, either. Just be aware, however, that if a Giocoso device in mid-pause happens to crash or suffer a power loss, it likely won't be able to clear out its row from the PAUSESTATUS table… and that would prevent you from ever pausing anything again! Accordingly, every time Giocoso is freshly launched on a PC, a delete from pausestatus where devicename=the name of the device I'm currently launching on is performed, ensuring that every new Giocoso session starts with a cleaned-out PAUSESTATUS table. For clarity, this simply means Giocoso self-cleans the GLOBAL_PAUSESTATUS table so it can never get clogged up with records about PCs that crashed in a paused state.

So: at this stage, we have one Giocoso session that has just paused a recording it was in the middle of playing. Now let's launch Giocoso on a completely separate device and see what happens.

3.0 Pause Resumption

On a completely separate PC, I take Option 6 from the Play Music menu and this happens:

Music starts playing! It's not terribly dramatic and it all just happened automatically… because there was only one piece of data in the pausestatus table, so there was no ambiguity about which other device's play I was wanting to 'pick up' and resume. You might want to take a closer look at the program display's top right-hand corner, though. Here is the original session:

Compare that to the one shown on my second PC's Giocoso display:

Notice how the new session suddenly thinks that Haydn's Creation only lasts for 27 minutes, when the original knew it lasts for over and hour and three quarters?! That's because the resuming session is only told what's left of a recording to play, not what the actual length of the recording would be if it was playing it from the start. You'll also notice that where the first session had been playing the Creation as one of a series of 10 plays in succession, the resuming session is only playing this one recording and then it will stop playing anything further. Resumed plays are not part of a 'cycle of plays', in other words, but are considered to be one-off affairs.

4.0 Ambiguous Pause Resumption

When multiple Giocoso devices have paused their playback, the PAUSESTATUS table in the Giocoso Pro Server will contain multiple rows. A new session coming along and asking to resume playback therefore has to be prompted to say which playback it wants to resume. Taking the Play Music menu, Option 6 on a third PC whilst two others are paused therefore triggers this display:

The list of available devices is constructed by querying the GLOBAL_PAUSESTATUS table, so if a particular device name is not listed, it's because it's not present in that table (for whatever reason). Your job at this point is simply to up- and down-arrow to highlight the appropriate device name and then press [the Space Bar] to put an asterisk next to the chosen name, indicated that it has indeed been selected. You then just press [Enter] to confirm the selection (or tab around to the [OK] button and then press [Enter]).

Music playback then immediately begins, as soon as the appropriate paused device has been selected.

5.0 Some other points...

Some other brief points to make about this global resumption mechanism, in no particular order:

There may well be paused clients on the network, but if you don't have the client tools needed to query the relevant database to see which ones they are, then you can't pick up their paused plays! This is, of course, the same message you'll see if you try to resume a global play on a properly-configured client when no other Giocoso machines have actually been paused in mid-play.


| Back to Software Home | Back to Giocoso Documentation Home | Back to Play Music Menu |