Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Solved: No album-covers in DSF-files
#14
(11-05-2022, 12:12 AM)Tim Curtis Wrote:
(11-04-2022, 10:58 PM)Nutul Wrote: @Gerardus , @Tim Curtis , @TheOldPresbyope
Ok, we're covered for ID3v2 tags also for DSD files.

Just positioning the ID3 tag reader at the beginning of the tag makes things work:
if the first 4 chars of the file are "DSD ", then read 8 bytes at offset 20 and assume the tag begins at that offset; otherwise assume the tag is at offset 0 (default behavior).
from here on the behavior of the Zend library is exactly the same.

Cheers, Al.

Are you referring to the reader in Zend?

Exactly.

and this is the dsd special case fix:

Code:
if ($this->_reader->read(4) != 'DSD ') {
           $this->_reader->setOffset(0);
       } else {
           /*
           The first chunk in a DSD file is the DSD Chunk:
            0  4 bytes: "DSD "
            4  8 bytes: size of the DSD chunk
           12  8 bytes: total file size
           20  8 bytes: pointer to metadata chunk
           */
           $this->_reader->setOffset(20);
           $DSD_ID3_TAG_OFFSET = $this->_reader->readInt64LE();
           $this->_reader->setOffset($DSD_ID3_TAG_OFFSET);
       }

       $startOffset = $this->_reader->getOffset();

I'll prepare a PR tomorrow, sometime.
Reply


Messages In This Thread
No album-covers in DSF-files - by Gerardus - 11-04-2022, 02:22 PM
RE: No album-covers in DSF-files - by Nutul - 11-04-2022, 02:30 PM
RE: No album-covers in DSF-files - by Tim Curtis - 11-04-2022, 04:00 PM
RE: No album-covers in DSF-files - by Nutul - 11-04-2022, 04:51 PM
RE: No album-covers in DSF-files - by Nutul - 11-04-2022, 02:43 PM
RE: No album-covers in DSF-files - by Gerardus - 11-04-2022, 05:16 PM
RE: No album-covers in DSF-files - by Nutul - 11-04-2022, 05:23 PM
RE: No album-covers in DSF-files - by Nutul - 11-04-2022, 05:33 PM
RE: No album-covers in DSF-files - by Nutul - 11-04-2022, 10:58 PM
RE: No album-covers in DSF-files - by Tim Curtis - 11-05-2022, 12:12 AM
RE: No album-covers in DSF-files - by Nutul - 11-05-2022, 12:19 AM
RE: No album-covers in DSF-files - by Nutul - 11-04-2022, 11:54 PM
RE: No album-covers in DSF-files - by Tim Curtis - 11-05-2022, 02:04 AM
RE: No album-covers in DSF-files - by Nutul - 11-05-2022, 07:32 AM
RE: No album-covers in DSF-files - by Tim Curtis - 11-05-2022, 10:57 AM

Forum Jump: