A new libdiscid release was made available today.
– LIB-29: add read_sparse() for faster reading again
– LIB-35: add HAVE_SPARSE_READ and VERSION_* defines
– LIB-36: hide internal symbols on Linux/Unix
– LIB-34: distmac and distwin32 cmake targets
The important change is the read_sparse() function:
Philipp Wolfer added a read_sparse() function. With this function you can either only read the TOC or specifiy which features of the disc you want to read.
The normal read() also extracts ISRCs starting with 0.3.0.
You might want to change existing applications to use read_sparse if you care about performance and don’t use ISRCs. The TOC is usually cached, so read_sparse() can be faster (0,5 vs. 3 seconds measured).
The difference is only in where the time is spent. It doesn’t really save overall time, but the TOC is read right when the disc is inserted so no additional disc access is performed when using the TOC in your application.
To make it possible to keep using read() when read_sparse() is not available we provide the HAVE_SPARSE_READ define, which can be used like that:
#define discid_read_sparse(disc, dev, i) discid_read(disc, dev)
discid_read_sparse(disc, device, 0)
We also provide defines for the libdiscid version numbers.
However, you should rather test for features/functions in the build files and create specific defines for your use case.
The above define is only provided as a convenience for read_sparse().
There are more details about the other changes in the full announcement mail.
If you didn’t follow the musicbrainz-devel list:
This year brought several new releases for libdiscid, starting with ISRC and MCN support in libdiscid 0.3.0. Applications using libdiscid 0.2.2 (or even lower) still work with libdiscid 0.5.0.
Information, documentation and other links are at:
That includes builds for Windows and Mac OS X.