Skip to content

sid: Implement seeking - #208

Open
mvtiaine wants to merge 1 commit into
audacious-media-player:masterfrom
mvtiaine:sid-seek
Open

mvtiaine wants to merge 1 commit into
audacious-media-player:masterfrom
mvtiaine:sid-seek

Conversation

@mvtiaine

@mvtiaine mvtiaine commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

there is no seek API in libsidplayfp, so use "brute force" seek

@mvtiaine

mvtiaine commented Aug 4, 2026

Copy link
Copy Markdown
Contributor Author

ubuntu fails because reset() is only available since 2.15:
https://github.com/libsidplayfp/libsidplayfp/blob/libsidplayfp-2.15/src/sidplayfp/sidplayfp.h#L143C9-L143C19

I'll add version guard if/when #207 is merged

@radioactiveman

Copy link
Copy Markdown
Member

How can I try this out? All SID sample files I found have no length and seeking is therefore not possible.

@mvtiaine

mvtiaine commented Aug 15, 2026 •

Copy link
Copy Markdown
Contributor Author

The songlengths support is kind of hidden feature :P
https://github.com/audacious-media-player/audacious-plugins/blob/master/src/sid/xs_sidplay2.cc#L177

It expects Songlengths.md5 file from HVSC (https://www.hvsc.c64.org) in SIDDATADIR/sidplayfp (along kernal/basic/chargen files from libsidplayfp), which resolves to $prefix/share/sidplayfp usually, so for example /usr/local/share/sidplayfp/Songlengths.md5.

I have it symlinked to the HVSC dir:

$ ls -la /usr/local/share/sidplayfp/Songlengths.md5 
lrwxr-xr-x  1 root  wheel  49 Jan 17  2023 /usr/local/share/sidplayfp/Songlengths.md5 -> /Users/tundrah/C64Music/DOCUMENTS/Songlengths.md5

Comment thread src/sid/xs_sidplay2.h
Comment thread src/sid/xs_sidplay2.cc Outdated
Comment thread src/sid/xmms-sid.cc
there is no seek API in libsidplayfp, so use "brute force" seek

also reset() is only available since libsidplayfp 2.15
@mvtiaine

Copy link
Copy Markdown
Contributor Author

Updated with requested changes

@radioactiveman

Copy link
Copy Markdown
Member

Updated with requested changes

Thank you. 👍

@jlindgren90: Could you please review the changes as well?

Is the buffer usage correct? Should it be .clear() ed in play() like before with the delete[] call? Should a Plugin::cleanup() method be added?

@radioactiveman

Copy link
Copy Markdown
Member

@jlindgren90: You probably missed my previous review comment. Could you check it please?

@jlindgren90

Copy link
Copy Markdown
Member

I saw it but haven't had time to review, sorry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants