src/cdrom/macosx/SDL_syscdrom.c
author Ryan C. Gordon
Mon, 22 Aug 2005 14:38:31 +0000
changeset 1126 d581fe3f36db
parent 769 b8d311d90021
child 1312 c9b51268668f
permissions -rw-r--r--
Fix for bug reported by Michael Benfield on the SDL mailing list:

"I'm on Mac OS 10.3.9 with a CVS SDL 1.2.9.

My understanding is that SDL_CDResume is supposed to resume play after
calling SDL_CDPlay. It doesn't on my system. It returns 0 but nothing happens.

Any ideas?

Thanks.

Mike Benfield"

--ryan.
slouken@616
     1
/*
slouken@616
     2
    SDL - Simple DirectMedia Layer
slouken@769
     3
    Copyright (C) 1997-2004 Sam Lantinga
slouken@616
     4
slouken@616
     5
    This library is free software; you can redistribute it and/or
slouken@616
     6
    modify it under the terms of the GNU Library General Public
slouken@616
     7
    License as published by the Free Software Foundation; either
slouken@616
     8
    version 2 of the License, or (at your option) any later version.
slouken@616
     9
slouken@616
    10
    This library is distributed in the hope that it will be useful,
slouken@616
    11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
slouken@616
    12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
slouken@616
    13
    Library General Public License for more details.
slouken@616
    14
slouken@616
    15
    You should have received a copy of the GNU Library General Public
slouken@616
    16
    License along with this library; if not, write to the Free
slouken@616
    17
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
slouken@616
    18
slouken@616
    19
    Sam Lantinga
slouken@616
    20
    slouken@libsdl.org
slouken@616
    21
*/
slouken@616
    22
slouken@616
    23
#ifdef SAVE_RCSID
slouken@616
    24
static char rcsid =
slouken@616
    25
 "@(#) $Id$";
slouken@616
    26
#endif
slouken@616
    27
slouken@616
    28
#include "SDL_syscdrom_c.h"
slouken@616
    29
slouken@616
    30
#pragma mark -- Globals --
slouken@616
    31
slouken@616
    32
static FSRef**         tracks;
slouken@616
    33
static FSVolumeRefNum* volumes;
slouken@616
    34
static CDstatus        status;
slouken@616
    35
static int             nextTrackFrame;
slouken@616
    36
static int             nextTrackFramesRemaining;
slouken@616
    37
static int             fakeCD;
slouken@616
    38
static int             currentTrack;
slouken@616
    39
static int             didReadTOC;
slouken@616
    40
static int             cacheTOCNumTracks;
slouken@616
    41
static int             currentDrive; /* Only allow 1 drive in use at a time */
slouken@616
    42
slouken@616
    43
#pragma mark -- Prototypes --
slouken@616
    44
slouken@616
    45
static const char *SDL_SYS_CDName   (int drive);
slouken@616
    46
static int         SDL_SYS_CDOpen   (int drive);
slouken@616
    47
static int         SDL_SYS_CDGetTOC (SDL_CD *cdrom);
slouken@616
    48
static CDstatus    SDL_SYS_CDStatus (SDL_CD *cdrom, int *position);
slouken@616
    49
static int         SDL_SYS_CDPlay   (SDL_CD *cdrom, int start, int length);
slouken@616
    50
static int         SDL_SYS_CDPause  (SDL_CD *cdrom);
slouken@616
    51
static int         SDL_SYS_CDResume (SDL_CD *cdrom);
slouken@616
    52
static int         SDL_SYS_CDStop   (SDL_CD *cdrom);
slouken@616
    53
static int         SDL_SYS_CDEject  (SDL_CD *cdrom);
slouken@616
    54
static void        SDL_SYS_CDClose  (SDL_CD *cdrom);
slouken@616
    55
slouken@616
    56
#pragma mark -- Helper Functions --
slouken@616
    57
slouken@616
    58
/* Read a list of tracks from the volume */
slouken@616
    59
static int LoadTracks (SDL_CD *cdrom)
slouken@616
    60
{
slouken@616
    61
    /* Check if tracks are already loaded */
slouken@616
    62
    if  ( tracks[cdrom->id] != NULL )
slouken@616
    63
        return 0;
slouken@616
    64
        
slouken@616
    65
    /* Allocate memory for tracks */
slouken@616
    66
    tracks[cdrom->id] = (FSRef*) calloc (1, sizeof(**tracks) * cdrom->numtracks);
slouken@616
    67
    if (tracks[cdrom->id] == NULL) {
slouken@616
    68
        SDL_OutOfMemory ();
slouken@616
    69
        return -1;
slouken@616
    70
    }
slouken@616
    71
    
slouken@616
    72
    /* Load tracks */
slouken@616
    73
    if (ListTrackFiles (volumes[cdrom->id], tracks[cdrom->id], cdrom->numtracks) < 0)
slouken@616
    74
        return -1;
slouken@616
    75
slouken@616
    76
    return 0;
slouken@616
    77
}
slouken@616
    78
slouken@616
    79
/* Find a file for a given start frame and length */
slouken@616
    80
static FSRef* GetFileForOffset (SDL_CD *cdrom, int start, int length,  int *outStartFrame, int *outStopFrame)
slouken@616
    81
{
slouken@616
    82
    int i;
slouken@616
    83
    
slouken@616
    84
    for (i = 0; i < cdrom->numtracks; i++) {
slouken@616
    85
    
slouken@616
    86
        if (cdrom->track[i].offset <= start &&
slouken@616
    87
            start < (cdrom->track[i].offset + cdrom->track[i].length))
slouken@616
    88
            break;
slouken@616
    89
    }
slouken@616
    90
    
slouken@616
    91
    if (i == cdrom->numtracks)
slouken@616
    92
        return NULL;
slouken@616
    93
        
slouken@616
    94
    currentTrack = i;
slouken@616
    95
slouken@616
    96
    *outStartFrame = start - cdrom->track[i].offset;
slouken@616
    97
    
slouken@616
    98
    if ((*outStartFrame + length) < cdrom->track[i].length) {
slouken@616
    99
        *outStopFrame = *outStartFrame + length;
slouken@616
   100
        length = 0;
slouken@616
   101
        nextTrackFrame = -1;
slouken@616
   102
        nextTrackFramesRemaining = -1;
slouken@616
   103
    }
slouken@616
   104
    else {
slouken@616
   105
        *outStopFrame = -1;
slouken@616
   106
        length -= cdrom->track[i].length - *outStartFrame;
slouken@616
   107
        nextTrackFrame = cdrom->track[i+1].offset;
slouken@616
   108
        nextTrackFramesRemaining = length;
slouken@616
   109
    }
slouken@616
   110
    
slouken@616
   111
    return &tracks[cdrom->id][i];
slouken@616
   112
}
slouken@616
   113
slouken@616
   114
/* Setup another file for playback, or stop playback (called from another thread) */
slouken@616
   115
static void CompletionProc (SDL_CD *cdrom)
slouken@616
   116
{
slouken@616
   117
    
slouken@616
   118
    Lock ();
slouken@616
   119
    
slouken@616
   120
    if (nextTrackFrame > 0 && nextTrackFramesRemaining > 0) {
slouken@616
   121
    
slouken@616
   122
        /* Load the next file to play */
slouken@616
   123
        int startFrame, stopFrame;
slouken@616
   124
        FSRef *file;
slouken@616
   125
        
slouken@616
   126
        PauseFile ();
slouken@616
   127
        ReleaseFile ();
slouken@616
   128
                
slouken@616
   129
        file = GetFileForOffset (cdrom, nextTrackFrame, 
slouken@616
   130
            nextTrackFramesRemaining, &startFrame, &stopFrame);
slouken@616
   131
        
slouken@616
   132
        if (file == NULL) {
slouken@616
   133
            status = CD_STOPPED;
slouken@616
   134
            Unlock ();
slouken@616
   135
            return;
slouken@616
   136
        }
slouken@616
   137
        
slouken@616
   138
        LoadFile (file, startFrame, stopFrame);
slouken@616
   139
        
slouken@616
   140
        SetCompletionProc (CompletionProc, cdrom);
slouken@616
   141
        
slouken@616
   142
        PlayFile ();
slouken@616
   143
    }
slouken@616
   144
    else {
slouken@616
   145
    
slouken@616
   146
        /* Release the current file */
slouken@616
   147
        PauseFile ();
slouken@616
   148
        ReleaseFile ();
slouken@616
   149
        status = CD_STOPPED;
slouken@616
   150
    }
slouken@616
   151
    
slouken@616
   152
    Unlock ();
slouken@616
   153
}
slouken@616
   154
slouken@616
   155
slouken@616
   156
#pragma mark -- Driver Functions --
slouken@616
   157
slouken@616
   158
/* Initialize */
slouken@616
   159
int SDL_SYS_CDInit (void) 
slouken@616
   160
{
slouken@616
   161
    /* Initialize globals */
slouken@616
   162
    volumes = NULL;
slouken@616
   163
    tracks  = NULL;
slouken@616
   164
    status  = CD_STOPPED;
slouken@616
   165
    nextTrackFrame = -1;
slouken@616
   166
    nextTrackFramesRemaining = -1;
slouken@616
   167
    fakeCD  = SDL_FALSE;
slouken@616
   168
    currentTrack = -1;
slouken@616
   169
    didReadTOC = SDL_FALSE;
slouken@616
   170
    cacheTOCNumTracks = -1;
slouken@616
   171
    currentDrive = -1;
slouken@616
   172
    
slouken@616
   173
    /* Fill in function pointers */
slouken@616
   174
    SDL_CDcaps.Name   = SDL_SYS_CDName;
slouken@616
   175
    SDL_CDcaps.Open   = SDL_SYS_CDOpen;
slouken@616
   176
    SDL_CDcaps.GetTOC = SDL_SYS_CDGetTOC;
slouken@616
   177
    SDL_CDcaps.Status = SDL_SYS_CDStatus;
slouken@616
   178
    SDL_CDcaps.Play   = SDL_SYS_CDPlay;
slouken@616
   179
    SDL_CDcaps.Pause  = SDL_SYS_CDPause;
slouken@616
   180
    SDL_CDcaps.Resume = SDL_SYS_CDResume;
slouken@616
   181
    SDL_CDcaps.Stop   = SDL_SYS_CDStop;
slouken@616
   182
    SDL_CDcaps.Eject  = SDL_SYS_CDEject;
slouken@616
   183
    SDL_CDcaps.Close  = SDL_SYS_CDClose;
slouken@616
   184
slouken@616
   185
    /* 
slouken@616
   186
        Read the list of "drives"
slouken@616
   187
        
slouken@616
   188
        This is currently a hack that infers drives from
slouken@616
   189
        mounted audio CD volumes, rather than
slouken@616
   190
        actual CD-ROM devices - which means it may not
slouken@616
   191
        act as expected sometimes.
slouken@616
   192
    */
slouken@616
   193
    
slouken@616
   194
    /* Find out how many cd volumes are mounted */
slouken@616
   195
    SDL_numcds = DetectAudioCDVolumes (NULL, 0);
slouken@616
   196
slouken@616
   197
    /*
slouken@616
   198
        If there are no volumes, fake a cd device
slouken@616
   199
        so tray empty can be reported.
slouken@616
   200
    */
slouken@616
   201
    if (SDL_numcds == 0) {
slouken@616
   202
    
slouken@616
   203
        fakeCD = SDL_TRUE;
slouken@616
   204
        SDL_numcds = 1;
slouken@616
   205
        status = CD_TRAYEMPTY;
slouken@616
   206
        
slouken@616
   207
        return 0;
slouken@616
   208
    }
slouken@616
   209
    
slouken@616
   210
    /* Allocate space for volumes */
slouken@616
   211
    volumes = (FSVolumeRefNum*) calloc (1, sizeof(*volumes) * SDL_numcds);
slouken@616
   212
    if (volumes == NULL) {
slouken@616
   213
        SDL_OutOfMemory ();
slouken@616
   214
        return -1;
slouken@616
   215
    }
slouken@616
   216
    
slouken@616
   217
    /* Allocate space for tracks */
slouken@616
   218
    tracks = (FSRef**) calloc (1, sizeof(*tracks) * (SDL_numcds + 1));
slouken@616
   219
    if (tracks == NULL) {
slouken@616
   220
        SDL_OutOfMemory ();
slouken@616
   221
        return -1;
slouken@616
   222
    }
slouken@616
   223
    
slouken@616
   224
    /* Mark the end of the tracks array */
slouken@616
   225
    tracks[ SDL_numcds ] = (FSRef*)-1;
slouken@616
   226
    
slouken@616
   227
    /* 
slouken@616
   228
        Redetect, now save all volumes for later
slouken@616
   229
        Update SDL_numcds just in case it changed
slouken@616
   230
    */
slouken@616
   231
    {
slouken@616
   232
        int numVolumes = SDL_numcds;
slouken@616
   233
        
slouken@616
   234
        SDL_numcds = DetectAudioCDVolumes (volumes, numVolumes);
slouken@616
   235
        
slouken@616
   236
        /* If more cds suddenly show up, ignore them */
slouken@616
   237
        if (SDL_numcds > numVolumes) {
slouken@616
   238
            SDL_SetError ("Some CD's were added but they will be ignored");
slouken@616
   239
            SDL_numcds = numVolumes;
slouken@616
   240
        }
slouken@616
   241
    }
slouken@616
   242
    
slouken@616
   243
    return 0;
slouken@616
   244
}
slouken@616
   245
slouken@616
   246
/* Shutdown and cleanup */
slouken@616
   247
void SDL_SYS_CDQuit(void)
slouken@616
   248
{
slouken@616
   249
    ReleaseFile();
slouken@616
   250
    
slouken@616
   251
    if (volumes != NULL)
slouken@616
   252
        free (volumes);
slouken@616
   253
        
slouken@616
   254
    if (tracks != NULL) {
slouken@616
   255
    
slouken@616
   256
        FSRef **ptr;
slouken@616
   257
        for (ptr = tracks; *ptr != (FSRef*)-1; ptr++)
slouken@616
   258
            if (*ptr != NULL)
slouken@616
   259
                free (*ptr);
slouken@616
   260
            
slouken@616
   261
        free (tracks);
slouken@616
   262
    }
slouken@616
   263
}
slouken@616
   264
slouken@616
   265
/* Get the Unix disk name of the volume */
slouken@616
   266
static const char *SDL_SYS_CDName (int drive)
slouken@616
   267
{
slouken@616
   268
    OSStatus     err = noErr;
slouken@768
   269
    HParamBlockRec  pb;
slouken@768
   270
    GetVolParmsInfoBuffer   volParmsInfo;
slouken@768
   271
   
slouken@616
   272
    if (fakeCD)
slouken@616
   273
        return "Fake CD-ROM Device";
slouken@768
   274
slouken@768
   275
    pb.ioParam.ioNamePtr = NULL;
slouken@768
   276
    pb.ioParam.ioVRefNum = volumes[drive];
slouken@768
   277
    pb.ioParam.ioBuffer = (Ptr)&volParmsInfo;
slouken@768
   278
    pb.ioParam.ioReqCount = (SInt32)sizeof(volParmsInfo);
slouken@768
   279
    err = PBHGetVolParmsSync(&pb);
slouken@768
   280
slouken@616
   281
    if (err != noErr) {
slouken@768
   282
        SDL_SetError ("PBHGetVolParmsSync returned %d", err);
slouken@616
   283
        return NULL;
slouken@616
   284
    }
slouken@768
   285
slouken@768
   286
    return volParmsInfo.vMDeviceID;
slouken@616
   287
}
slouken@616
   288
slouken@616
   289
/* Open the "device" */
slouken@616
   290
static int SDL_SYS_CDOpen (int drive)
slouken@616
   291
{
slouken@616
   292
    /* Only allow 1 device to be open */
slouken@616
   293
    if (currentDrive >= 0) {
slouken@616
   294
        SDL_SetError ("Only one cdrom is supported");
slouken@616
   295
        return -1;
slouken@616
   296
    }
slouken@616
   297
    else
slouken@616
   298
        currentDrive = drive;
slouken@616
   299
slouken@616
   300
    return drive;
slouken@616
   301
}
slouken@616
   302
slouken@616
   303
/* Get the table of contents */
slouken@616
   304
static int SDL_SYS_CDGetTOC (SDL_CD *cdrom)
slouken@616
   305
{
slouken@616
   306
    if (fakeCD) {
slouken@616
   307
        SDL_SetError (kErrorFakeDevice);
slouken@616
   308
        return -1;
slouken@616
   309
    }
slouken@616
   310
    
slouken@616
   311
    if (didReadTOC) {
slouken@616
   312
        cdrom->numtracks = cacheTOCNumTracks;
slouken@616
   313
        return 0;
slouken@616
   314
    }
slouken@616
   315
    
slouken@616
   316
    
slouken@616
   317
    ReadTOCData (volumes[cdrom->id], cdrom);
slouken@616
   318
    didReadTOC = SDL_TRUE;
slouken@616
   319
    cacheTOCNumTracks = cdrom->numtracks;
slouken@616
   320
    
slouken@616
   321
    return 0;
slouken@616
   322
}
slouken@616
   323
slouken@616
   324
/* Get CD-ROM status */
slouken@616
   325
static CDstatus SDL_SYS_CDStatus (SDL_CD *cdrom, int *position)
slouken@616
   326
{
slouken@768
   327
    if (position) {
slouken@768
   328
        int trackFrame;
slouken@768
   329
        
slouken@768
   330
        Lock ();
slouken@768
   331
        trackFrame = GetCurrentFrame ();
slouken@768
   332
        Unlock ();
slouken@616
   333
    
slouken@768
   334
        *position = cdrom->track[currentTrack].offset + trackFrame;
slouken@768
   335
    }
slouken@616
   336
    
slouken@616
   337
    return status;
slouken@616
   338
}
slouken@616
   339
slouken@616
   340
/* Start playback */
slouken@616
   341
static int SDL_SYS_CDPlay(SDL_CD *cdrom, int start, int length)
slouken@616
   342
{
slouken@616
   343
    int startFrame, stopFrame;
slouken@616
   344
    FSRef *ref;
slouken@616
   345
    
slouken@616
   346
    if (fakeCD) {
slouken@616
   347
        SDL_SetError (kErrorFakeDevice);
slouken@616
   348
        return -1;
slouken@616
   349
    }
slouken@616
   350
    
slouken@616
   351
    Lock();
slouken@616
   352
    
slouken@616
   353
    if (LoadTracks (cdrom) < 0)
slouken@616
   354
        return -2;
slouken@616
   355
    
slouken@616
   356
    if (PauseFile () < 0)
slouken@616
   357
        return -3;
slouken@616
   358
        
slouken@616
   359
    if (ReleaseFile () < 0)
slouken@616
   360
        return -4;
slouken@616
   361
    
slouken@616
   362
    ref = GetFileForOffset (cdrom, start, length, &startFrame, &stopFrame);
slouken@616
   363
    if (ref == NULL) {
slouken@616
   364
        SDL_SetError ("SDL_SYS_CDPlay: No file for start=%d, length=%d", start, length);
slouken@616
   365
        return -5;
slouken@616
   366
    }
slouken@616
   367
    
slouken@616
   368
    if (LoadFile (ref, startFrame, stopFrame) < 0)
slouken@616
   369
        return -6;
slouken@616
   370
    
slouken@616
   371
    SetCompletionProc (CompletionProc, cdrom);
slouken@616
   372
    
slouken@616
   373
    if (PlayFile () < 0)
slouken@616
   374
        return -7;
slouken@616
   375
    
slouken@616
   376
    status = CD_PLAYING;
slouken@616
   377
    
slouken@616
   378
    Unlock();
slouken@616
   379
    
slouken@616
   380
    return 0;
slouken@616
   381
}
slouken@616
   382
slouken@616
   383
/* Pause playback */
slouken@616
   384
static int SDL_SYS_CDPause(SDL_CD *cdrom)
slouken@616
   385
{
slouken@616
   386
    if (fakeCD) {
slouken@616
   387
        SDL_SetError (kErrorFakeDevice);
slouken@616
   388
        return -1;
slouken@616
   389
    }
slouken@616
   390
    
slouken@616
   391
    Lock ();
slouken@616
   392
    
slouken@768
   393
    if (PauseFile () < 0) {
slouken@768
   394
        Unlock ();
slouken@616
   395
        return -2;
slouken@768
   396
    }
slouken@616
   397
    
slouken@616
   398
    status = CD_PAUSED;
slouken@616
   399
    
slouken@616
   400
    Unlock ();
slouken@616
   401
    
slouken@616
   402
    return 0;
slouken@616
   403
}
slouken@616
   404
slouken@616
   405
/* Resume playback */
slouken@616
   406
static int SDL_SYS_CDResume(SDL_CD *cdrom)
slouken@616
   407
{
slouken@616
   408
    if (fakeCD) {
slouken@616
   409
        SDL_SetError (kErrorFakeDevice);
slouken@616
   410
        return -1;
slouken@616
   411
    }
slouken@616
   412
    
slouken@616
   413
    Lock ();
slouken@616
   414
    
icculus@1126
   415
    if (PlayFile () < 0) {
slouken@768
   416
        Unlock ();
slouken@616
   417
        return -2;
slouken@768
   418
    }
slouken@616
   419
        
slouken@616
   420
    status = CD_PLAYING;
slouken@616
   421
    
slouken@616
   422
    Unlock ();
slouken@616
   423
    
slouken@616
   424
    return 0;
slouken@616
   425
}
slouken@616
   426
slouken@616
   427
/* Stop playback */
slouken@616
   428
static int SDL_SYS_CDStop(SDL_CD *cdrom)
slouken@616
   429
{
slouken@616
   430
    if (fakeCD) {
slouken@616
   431
        SDL_SetError (kErrorFakeDevice);
slouken@616
   432
        return -1;
slouken@616
   433
    }
slouken@616
   434
    
slouken@616
   435
    Lock ();
slouken@616
   436
    
slouken@768
   437
    if (PauseFile () < 0) {
slouken@768
   438
        Unlock ();
slouken@616
   439
        return -2;
slouken@768
   440
    }
slouken@616
   441
        
slouken@768
   442
    if (ReleaseFile () < 0) {
slouken@768
   443
        Unlock ();
slouken@616
   444
        return -3;
slouken@768
   445
    }
slouken@616
   446
        
slouken@616
   447
    status = CD_STOPPED;
slouken@616
   448
    
slouken@616
   449
    Unlock ();
slouken@616
   450
    
slouken@616
   451
    return 0;
slouken@616
   452
}
slouken@616
   453
slouken@616
   454
/* Eject the CD-ROM (Unmount the volume) */
slouken@616
   455
static int SDL_SYS_CDEject(SDL_CD *cdrom)
slouken@616
   456
{
slouken@616
   457
    OSStatus err;
slouken@768
   458
	HParamBlockRec  pb;
slouken@616
   459
    
slouken@616
   460
    if (fakeCD) {
slouken@616
   461
        SDL_SetError (kErrorFakeDevice);
slouken@616
   462
        return -1;
slouken@616
   463
    }
slouken@616
   464
    
slouken@616
   465
    Lock ();
slouken@616
   466
    
slouken@768
   467
    if (PauseFile () < 0) {
slouken@768
   468
        Unlock ();
slouken@616
   469
        return -2;
slouken@768
   470
    }
slouken@616
   471
        
slouken@768
   472
    if (ReleaseFile () < 0) {
slouken@768
   473
        Unlock ();
slouken@616
   474
        return -3;
slouken@768
   475
    }
slouken@616
   476
    
slouken@616
   477
    status = CD_STOPPED;
slouken@616
   478
    
slouken@768
   479
	// Eject the volume
slouken@768
   480
	pb.ioParam.ioNamePtr = NULL;
slouken@768
   481
	pb.ioParam.ioVRefNum = volumes[cdrom->id];
slouken@768
   482
	err = PBUnmountVol((ParamBlockRec *) &pb);
slouken@768
   483
slouken@768
   484
	if (err != noErr) {
slouken@768
   485
        Unlock ();
slouken@768
   486
		SDL_SetError ("PBUnmountVol returned %d", err);
slouken@768
   487
		return -4;
slouken@768
   488
	}
slouken@616
   489
    
slouken@616
   490
    status = CD_TRAYEMPTY;
slouken@616
   491
slouken@616
   492
    /* Invalidate volume and track info */
slouken@616
   493
    volumes[cdrom->id] = 0;
slouken@616
   494
    free (tracks[cdrom->id]);
slouken@616
   495
    tracks[cdrom->id] = NULL;
slouken@616
   496
    
slouken@616
   497
    Unlock ();
slouken@616
   498
    
slouken@616
   499
    return 0;
slouken@616
   500
}
slouken@616
   501
slouken@616
   502
/* Close the CD-ROM */
slouken@616
   503
static void SDL_SYS_CDClose(SDL_CD *cdrom)
slouken@616
   504
{
slouken@616
   505
    currentDrive = -1;
slouken@616
   506
    return;
slouken@616
   507
}
slouken@616
   508