Use track and disc functions from libcdio-paranoia to enable playback of hidden tracks and audio tracks on multisession CDs

This commit is contained in:
lazypingu 2024-02-26 10:34:37 +01:00
parent 88c77f9c8a
commit 9d853897cd

View File

@ -257,11 +257,11 @@ input_cdio_open(const char *uri,
lsn_t lsn_from, lsn_to; lsn_t lsn_from, lsn_to;
if (parsed_uri.track >= 0) { if (parsed_uri.track >= 0) {
lsn_from = cdio_get_track_lsn(cdio, parsed_uri.track); lsn_from = cdio_cddap_track_firstsector(drv, parsed_uri.track);
lsn_to = cdio_get_track_last_lsn(cdio, parsed_uri.track); lsn_to = cdio_cddap_track_lastsector(drv, parsed_uri.track);
} else { } else {
lsn_from = 0; lsn_from = cdio_cddap_disc_firstsector(drv);
lsn_to = cdio_get_disc_last_lsn(cdio); lsn_to = cdio_cddap_disc_lastsector(drv);
} }
return std::make_unique<CdioParanoiaInputStream>(uri, mutex, return std::make_unique<CdioParanoiaInputStream>(uri, mutex,