VirtualBox

Changeset 90277 in vbox for trunk/src/VBox/Storage/CUE.cpp


Ignore:
Timestamp:
Jul 21, 2021 8:40:29 PM (3 years ago)
Author:
vboxsync
Message:

Storage/CUE: Fix support for the MOTOROLA variant of a CUE sheet and ignore TITLE directives between FILE and the start of the track list (based on the patch submitted by Dennis Borde, thanks!)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Storage/CUE.cpp

    r87048 r90277  
    238238    {RT_STR_TUPLE("FILE"),       CUEKEYWORD_FILE},
    239239    {RT_STR_TUPLE("BINARY"),     CUEKEYWORD_BINARY},
     240    {RT_STR_TUPLE("MOTOROLA"),   CUEKEYWORD_MOTOROLA},
    240241    {RT_STR_TUPLE("WAVE"),       CUEKEYWORD_WAVE},
    241242    {RT_STR_TUPLE("MP3"),        CUEKEYWORD_MP3},
     
    10401041    int rc = VINF_SUCCESS;
    10411042
     1043    /*
     1044     * Sometimes there is a TITLE/PERFORMER/SONGWRITER directive before the start of the track list,
     1045     * skip and ignore those.
     1046     */
     1047    while (   RT_SUCCESS(rc)
     1048           && (   cueTokenizerSkipIfIsKeywordEqual(pTokenizer, CUEKEYWORD_TITLE)
     1049               || cueTokenizerSkipIfIsKeywordEqual(pTokenizer, CUEKEYWORD_PERFORMER)
     1050               || cueTokenizerSkipIfIsKeywordEqual(pTokenizer, CUEKEYWORD_SONGWRITER)))
     1051        rc = cueParseAndSkipStringRemainder(pThis, pTokenizer, "TITLE/PERFORMER/SONGWRITER");
     1052
    10421053    while (   RT_SUCCESS(rc)
    10431054           && cueTokenizerSkipIfIsKeywordEqual(pTokenizer, CUEKEYWORD_TRACK))
     
    11081119    if (cueTokenizerSkipIfIsKeywordEqual(pTokenizer, CUEKEYWORD_FILE))
    11091120        rc = cueParseFile(pThis, pTokenizer);
    1110     else if (cueTokenizerSkipIfIsKeywordEqual(pTokenizer, CUEKEYWORD_TITLE))
    1111         rc = cueParseAndSkipStringRemainder(pThis, pTokenizer, "TITLE");
    1112     else if (cueTokenizerSkipIfIsKeywordEqual(pTokenizer, CUEKEYWORD_PERFORMER))
    1113         rc = cueParseAndSkipStringRemainder(pThis, pTokenizer, "PERFORMER");
    1114     else if (cueTokenizerSkipIfIsKeywordEqual(pTokenizer, CUEKEYWORD_SONGWRITER))
    1115         rc = cueParseAndSkipStringRemainder(pThis, pTokenizer, "SONGWRITER");
    11161121    else /* Skip all other keywords we don't need/support. */
    11171122        cueTokenizerConsume(pTokenizer);
     
    15411546        /* Need to convert audio data samples to big endian. */
    15421547        if (   pRegion->enmDataForm == VDREGIONDATAFORM_CDDA
    1543             && pThis->fLittleEndian)
     1548            && !pThis->fLittleEndian)
    15441549        {
    15451550            *pcbActuallyRead = cbToRead;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette