Skip to content

Commit

Permalink
Merge pull request #63 from Cacodemon345/patch-3
Browse files Browse the repository at this point in the history
libxmp backend: Set starting subsong correctly
  • Loading branch information
madame-rachelle authored Nov 23, 2024
2 parents 3944bbc + 7062053 commit 628cd49
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion source/streamsources/music_libxmp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 628cd49

Please sign in to comment.