Source/CD_Utils.h

/*
    File:       CD_Utils.h
 
    Contains:   xxx put contents here xxx
 
    Version:    xxx put version here xxx
 
    Copyright:  © 1999 by Apple Computer, Inc., all rights reserved.
 
    File Ownership:
 
        DRI:                xxx put dri here xxx
 
        Other Contact:      xxx put other contact here xxx
 
        Technology:         xxx put technology here xxx
 
    Writers:
 
        (cjd)   Chris De Salvo
 
    Change History (most recent first):
 
       <SP1>     1/29/99    cjd     first checked in
*/
 
//¥ ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ  ¥
//¥
//¥ Copyright © 1997 Apple Computer, Inc., All Rights Reserved
//¥
//¥
//¥     You may incorporate this sample code into your applications without
//¥     restriction, though the sample code has been provided "AS IS" and the
//¥     responsibility for its operation is 100% yours.  However, what you are
//¥     not permitted to do is to redistribute the source as "DSC Sample Code"
//¥     after having made changes. If you're going to re-distribute the source,
//¥     we require that you make it clear in the source that the code was
//¥     descended from Apple Sample Code, but that you've made changes.
//¥
//¥     Authors:
//¥         Chris De Salvo      <mailto:desalvo@apple.com>
//¥
//¥ ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ  ¥
 
#ifndef __CDUTILS__
#define __CDUTILS__
 
//¥ ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ  Includes
//¥ ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ  Public Definitions
 
//¥ Audio playback modes
#define playmodeMute                0x00
#define playmodeRightOnly           0x05
#define playmodeStereo              0x09
#define playmodeLeftOnly            0x0A
#define playmodeMono                0x0F
 
//¥ Values that can be returned when you ask
//¥ for the speed of the spindle
#define kSingleSpeed                0x00
#define kDoubleSpeedOrGreater       0xFF
 
//¥ ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ  Public Types
 
typedef enum
{
    isOnCDErr = -1,
    isOnCDFalse,
    isOnCDTrue
} IsOnCDResult;
 
//¥ ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ  Public Variables
//¥ ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ  Public Functions
 
#ifdef __cplusplus
extern "C" {
#endif
 
extern OSErr        CD_Open(void);
extern SInt16       CD_GetSpeed(void);
extern OSErr        CD_PlayAudioTrack(UInt8 trackNumber, UInt8 playMode, Boolean inAsync);
extern OSErr        CD_StopAudioTrack(Boolean inAsync);
extern OSErr        CD_GetCurrentAudioTrack(SInt16 *theTrack);
extern IsOnCDResult CD_IsFileOnCD(SInt16 fileRef);
extern Boolean      CD_IsCDInserted(void);
extern SInt16       CD_GetNumTracks(void);
extern Boolean      CD_IsCDPlaying(void);
extern OSErr        CD_SetVolume(UInt8 left, UInt8 right);
extern void         CD_WaitOnPlayAsyncCalls(void);
extern void         CD_WaitOnStopAsyncCalls(void);
extern void         CD_Eject(void);
 
#ifdef __cplusplus
}
#endif
 
#endif