Ignore:
Timestamp:
Jan 21, 2001, 2:36:43 PM (25 years ago)
Author:
sandervl
Message:

PD: CD Track fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/winmm/mcicda/os2cdrom.cpp

    r4709 r5005  
    44 *
    55 * Copyright 2000    Chris Wohlgemuth
    6  *
     6 *           2001    Przemyslaw Dobrowolski
    77 * Project Odin Software License can be found in LICENSE.TXT
    88 *
     
    2727typedef struct
    2828{
     29    int ADR_data_for_track:4;   // ADR data for track
     30    int preemphasis:1;          // 0 = Audio without preemphasis
     31                                // 1 = Audio with preemphasis
     32    int cdda_permitted:1;       // 0 = Digital copy prohibited
     33                                // 1 = Digital copy permitted
     34    int type_of_track:1;        // 0 = Audio track
     35                                // 1 = Data track
     36    int channels:1;             // 0 = Two-channel audio
     37                               // 1 = Four-channel audio
     38}TRACKTYPE;
     39
     40typedef struct
     41{
    2942        ULONG ulTrackAddress;
    30         UCHAR ucTCInfo;
     43        TRACKTYPE track_type;
    3144}CDTRACKINFO;
    3245
     
    157170        return 0;//Error
    158171    }
    159                
    160     if(trackInfo.ucTCInfo & 0x40) {
    161         return -1;//It's a data track
    162     }
     172
     173// PD: Don't return error when data track is found.
     174//  if(trackInfo.ucTCInfo & 0x40) {
     175//      return -1;//It's a data track
     176//  }
     177
    163178    *ulLeadOut=cdInfo.ulLeadOut;
    164179    return cdInfo.ucLastTrack-cdInfo.ucFirstTrack+1;
     
    214229/* Returns sector info of track #numTrack */
    215230/* Starting with track 0 */
    216 ULONG  os2CDQueryTrackStartSector( HFILE hfDrive, ULONG numTrack)
     231ULONG  os2CDQueryTrackStartSector( HFILE hfDrive, ULONG numTrack, BOOL *pflAudio)
    217232{       
    218233    ULONG ulParamLen;
     
    250265            if(rc)
    251266                break;//Error
     267
     268           *pflAudio=!trackInfo[0].track_type.type_of_track;
     269
    252270        }else
    253271            return _CDCalculateSector((MSF*)&cdInfo.ulLeadOut);
Note: See TracChangeset for help on using the changeset viewer.