Commit 5c25499c authored by Max Kellermann's avatar Max Kellermann

lib/cdio/Paranoia: add method GetDiscSectorRange()

parent da4bb4c2
......@@ -82,6 +82,14 @@ public:
throw std::runtime_error("Failed to open disc");
}
auto GetDiscSectorRange() const {
auto first = cdio_cddap_disc_firstsector(drv);
auto last = cdio_cddap_disc_lastsector(drv);
if (first < 0 || last < 0)
throw std::runtime_error("Failed to get disc audio sectors");
return std::make_pair(first, last);
}
gcc_pure
bool IsAudioTrack(track_t i) const noexcept {
return cdio_cddap_track_audiop(drv, i);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment