Project

General

Profile

Feature #476

Maximum SID Playtime if Length Unknown

Added by Daniel Bedrenko over 9 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Minor
Assignee:
-
Category:
plugins/sid
Target version:
Start date:
November 03, 2014
Due date:
% Done:

100%

Estimated time:
Affects version:

Description

Before Audacious moved (see #173) from libsidplay to libsidplayfp for SID playback in v3.4, the plugin could be configured with various settings. One of these options was to specify, for SID files whose song-lengths are unknown, the maximum time that the track should play. For screenshots of the GUI preferences window see XMMS-SID (which I hear was written by the same person as the Audacious SID plugin).

This is an important feature, because it makes playback of SID tunes--outside of the HSVC compilation (which provides a text file, "Songlengths.txt")--extremely inconvenient. The "Preferences" window for the old SID plugin had a lot of options, but I think this one is the most essential. It would be great if at least this could be set in a config file, if not a GUI Prefs window.

In the latest version (3.5.2) there is a line in "sid/xs_config.cc" that sets `xs_cfg.playMaxTime = 150` (seconds), but this is not respected. I've attached a SID file which demonstrates this, i.e. it doesn't stop playing after 2m30s.

While this is being added I wrote a hacky BASH script (attached) that detects and controls SID playback so that a song isn't played for too long.

PS: Thanks for all the effort you put into this player! It's been my favourite for years and I love it :)

drax-cosmic.sid (11.6 KB) drax-cosmic.sid Sample SID file Daniel Bedrenko, November 03, 2014 20:00
audacious-sidmon.sh (1.16 KB) audacious-sidmon.sh Script to run instead of audacious that will advance SID playback Daniel Bedrenko, November 03, 2014 20:00

History

#1 Updated by Daniel Bedrenko over 9 years ago

I can't seem to edit the original post. There's an error in "Affects version": this issue isn't present in v3.2.5

#2 Updated by Michael Schwendt over 9 years ago

Just a few notes:

It's good that a "150 seconds" max playtime is not respected. There are many sidtunes, which are much longer than 150 seconds and which don't loop before that duration either. They should play "forever", i.e. like an ongoing stream, and till the listener stops playback manually. Everything else would be misleading.

Examiningg the current source code, it seems the entire GUI for the plugin has been dropped. And the config settings are hardcoded, so you would also need to set playMaxTimeEnable=TRUE, and since it's hardcoded you could not change it without recompiling. Not good. It would be better to invest a bit of time into bringing back the plugin's loader/saver for those config files, so you could edit Audacious' config file instead. Perhaps somebody will return the GUI, too.

#3 Updated by Daniel Bedrenko over 9 years ago

@Michael, I disagree that the default behaviour should be to loop forever. The purpose of a music player is to manage the playback, so playing forever is not useful unless you're actively DJing your SID tunes--which I expect most people don't.

If you don't want to be "misled" you can set the MaxTime to 15 mins or however many loops of an average-length SID tune you want to suffer through :P

#4 Updated by Daniel Bedrenko over 9 years ago

From issue #173 and according to Joker, on IRC, I get the impression that the old libsidplay libs and the new libsidplayfp are not much different so it shouldn't be difficult to link the old GUI prefs windows.

It makes me wonder why the decision to switch to libsidplayfp was deemed to be worth losing the ability to set all those options (the Prefs window had a lot of settings), in addition to libsidplay2 working just fine.

#5 Updated by John Lindgren over 9 years ago

Losing the settings window had nothing to do with libsidplayfp. It was dropped because it was implemented using a lot of GTK2-specific code which did not work with GTK3 (and would obviously not work with Qt either). Adding a basic settings window using the PreferencesWidget abstraction should be pretty easy.

#6 Updated by John Lindgren over 9 years ago

  • Status changed from New to Closed
  • Target version set to 3.6
  • % Done changed from 0 to 100
  • Affects version deleted (3.4-alpha1, 3.4-beta1, 3.4-beta2, 3.5-alpha1, 3.5-beta1, 3.6)

Git master has a new settings window for the SID plugin.

#7 Updated by John Lindgren over 9 years ago

Michael Schwendt wrote:

It's good that a "150 seconds" max playtime is not respected. There are many sidtunes, which are much longer than 150 seconds and which don't loop before that duration either. They should play "forever", i.e. like an ongoing stream, and till the listener stops playback manually. Everything else would be misleading.

There is an option to apply the maximum playback time only for songs whose length is unknown.

#8 Updated by Michael Schwendt over 9 years ago

the default behaviour should be to loop forever

Technically, sidtunes don't loop. The emulator engine runs forever processing the machine that somehow accesses the SID to produce audio, and to the outside there is no state such as "music has stopped or reached a loop-point".

I get the impression that the old libsidplay libs and the new libsidplayfp are not much different

Even under the hood, they are fundamentally different (given that libsidplayfp is based on libsidplay2, and libsidplay2 involved a cycle-based emulator engine already with different run-modes) plus non-emulation features only available in libsidplay1.

It makes me wonder why the decision to switch to libsidplayfp

Mind you, old libsidplay1 simply cannot play back all sids found in the HVSC, for instance. And libsidplayfp even no longer includes the Kernal+Basic ROM images, which are considered legally troublesome.

for songs whose length is unknown.

Technically, the playtime is unknown for all sidtunes for the reason explained above. Even the .sid file formats don't include any metadata that would define the playtime for any of the "songs" that can be played. What's known as the "songlengths database" was an experimental project to determine playtime automatically based on detection of audible silence and loop-points, albeit not on-the-fly but pregenerated. Hence the separate DB file. To update it (and even the special MD5-based checksums for the files) manually for many thousands of sid files, anytime a fixed "rip" of a sidtune is added, would be a tremendous task, and I don't think that is being done by sidtune collection authors.

Also available in: Atom PDF