Merge pull request #63 from Cacodemon345/patch-3

libxmp backend: Set starting subsong correctly
This commit is contained in:
Rachael Alexanderson 2024-11-23 06:15:07 -05:00 committed by GitHub
commit 628cd49221
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -153,7 +153,10 @@ bool XMPSong::GetData(void *buffer, size_t len)
bool XMPSong::Start()
{
return xmp_start_player(context, samplerate, 0) >= 0;
int ret = xmp_start_player(context, samplerate, 0);
if (ret >= 0)
xmp_set_position(context, subsong);
return ret >= 0;
}
StreamSource* XMP_OpenSong(MusicIO::FileInterface* reader, int samplerate)