Functions
Abstract: Pause or resume the audio playback.
public:
virtual IOReturn audioPause(bool pause);
Parameters
Name | Description |
pause | True to pause playback; False to resume. |
Abstract: Play audio.
public:
virtual IOReturn audioPlay(positioningType addressType,cdAddress address,
audioPlayMode mode);
Parameters
Name | Description |
addressType | The type of positioning address. See positioningType for details. |
address | The position from which to begin. |
mode | The mode for playing the audio. See audioPlayMode for details. |
Abstract: Perform a fast-forward or fast-backward operation.
public:
virtual IOReturn audioScan(positioningType addressType,cdAddress address,bool reverse);
Parameters
Name | Description |
addressType | The type of positioning address. See positioningType for details. |
address | The position from which to begin. |
reverse | True to go backward; False to go forward. |
Abstract: Position the optical pick-up at the specified audio address.
public:
virtual IOReturn audioTrackSearch(positioningType addressType,cdAddress address,
bool startPlay,audioPlayMode mode);
Parameters
Name | Description |
addressType | The type of positioning address. See positioningType for details. |
address | The position from which to begin. |
startPlay | True to begin playing audio after positioning; False to enter the pause state. |
mode | The mode for playing the audio. See audioPlayMode for details. |
Abstract: Convert an MM:SS:FF value to a Logical Block Address
protected:
virtual IOReturn convertMSFToLba(UInt32 *lba,cdAddress address);
Parameters
Name | Description |
lba | A pointer to the returned LBA. |
address | The address to convert from MM:SS:FF format. |
Abstract: Determine if the device type matches that which we expect.
public:
virtual bool deviceTypeMatches(UInt8 inqBuf[],UInt32 inqLen);
This override allows us to check for the SCSI CD-ROM
device type instead of hard disk.
See IOBasicSCSI for details.
Abstract: Issue an audio play command to the device.
protected:
virtual IOReturn doAudioPlayCommand(positioningType startType,cdAddress startAddress,
positioningType endType,cdAddress endAddress);
Parameters
Name | Description |
startType | The type of positioning address. See positioningType for details. |
startAddress | The position from which to begin. |
endType | The type of positioning address. See positioningType for details. |
endAddress | The position at which to end. |
Abstract: Return the current audio play status information.
public:
virtual IOReturn getAudioStatus(struct audioStatus *status);
Parameters
Name | Description |
status | The buffer for the returned information. |
Abstract: Return a character string for the device type.
public:
virtual const char * getDeviceTypeName(void);
This override returns kDeviceTypeCDROM.
Abstract: Initialize audio modes for the device when media is changed.
protected:
virtual void initAudioModes(void);
Abstract: Create the device nub.
public:
virtual IOService * instantiateNub(void);
This override instantiates an IOSCSICDDriveNub instead of an IOSCSIHDDriveNub.
Abstract: React to media going away.
protected:
virtual void mediaGone(void);
Abstract: Convert an audioPlayMode value to the format used by the device.
protected:
virtual UInt8 playModeToDriveBits(audioPlayMode mode,channel chan);
Parameters
Name | Description |
mode | The audioPlayMode value to be converted. |
chan | The desired audio channel. |
Abstract: Read audio data blocks.
public:
virtual IOReturn readAudioData(positioningType addressType,cdAddress address,
UInt8 blockCount,UInt8 *buffer);
Parameters
Name | Description |
addressType | The type of positioning address. See positioningType for details. |
address | The position from which to begin. |
blockCount | The number of blocks to read. |
buffer | The buffer for the data. |
Abstract: Read audio subcodes only.
public:
virtual IOReturn readAudioSubcodes(positioningType addressType,cdAddress address,
UInt8 blockCount,UInt8 *buffer);
Parameters
Name | Description |
addressType | The type of positioning address. See positioningType for details. |
address | The position from which to begin. |
blockCount | The number of blocks to read. |
buffer | The buffer for the data. |
Abstract: Read the current audio volume.
public:
virtual IOReturn readAudioVolume(UInt8 *leftVolume,UInt8 *rightVolume);
Parameters
Name | Description |
leftVolume | A pointer to the returned left-channel volume. |
rightVolume | A pointer to the returned right-channel volume. |
Abstract: Read audio data along with all subcodes.
public:
virtual IOReturn readAudioWithAllSubcodes(positioningType addressType,cdAddress address,
UInt8 blockCount,UInt8 *buffer);
Parameters
Name | Description |
addressType | The type of positioning address. See positioningType for details. |
address | The position from which to begin. |
blockCount | The number of blocks to read. |
buffer | The buffer for the data. |
Abstract: Read audio blocks along with the Q subcode.
public:
virtual IOReturn readAudioWithQSubcode(positioningType addressType,cdAddress address,
UInt8 blockCount,UInt8 *buffer);
Parameters
Name | Description |
addressType | The type of positioning address. See positioningType for details. |
address | The position from which to begin. |
blockCount | The number of blocks to read. |
buffer | The buffer for the data. |
Abstract: Read the header for the specified logical block.
public:
virtual IOReturn readHeader(UInt32 blockAddress,struct headerInfo *buffer);
Parameters
Name | Description |
address | The logical block from which to read the header data. |
buffer | The buffer for the header data. |
Abstract: Read the ISRC data for the disc.
public:
virtual IOReturn readISRC(UInt32 track,UInt8 *buffer,bool *found);
Parameters
Name | Description |
track | The track number from which to read the ISRC. |
buffer | The buffer for the ISRC data. |
found | A pointer to the result: True if the ISRC was found, else False. |
Abstract: Perform the command necessary to read ISRC or MCN data.
protected:
virtual IOReturn readISRCMCN(UInt8 dataformat,UInt32 track,UInt8 *buffer,bool *found);
Parameters
Name | Description |
dataformat | The desired data format: ISRC or MCN. |
track | The desired track from which to read the data |
buffer | The buffer for the data. |
found | A pointer to the result: True if the item was found; false if not. |
Abstract: Read the MCN (Media Catalog Number) for the disc.
public:
virtual IOReturn readMCN(UInt8 *buffer,bool *found);
Parameters
Name | Description |
buffer | The buffer for the MCN data. |
found | A pointer to the result: True if the ISRC was found, else False. |
Abstract: Read the Q subcode entries in the lead-in areas of the disc.
public:
virtual IOReturn readQSubcodes(struct qSubcodeTocInfo *buffer,UInt32 bufSize);
Parameters
Name | Description |
buffer | The buffer for the returned data |
bufSize | The size of the buffer in bytes. |
Abstract: Issue the command necessary to read subchannel data.
protected:
virtual IOReturn readSubchannel(UInt8 *buffer,UInt32 length,UInt8 track,UInt8 dataFormat);
Parameters
Name | Description |
buffer | The buffer for the data. |
length | The maximum data length desired. |
track | The desired track from which to read the data |
dataFormat | The subchannel data desired. |
Abstract: Read the device subcode buffer while audio is playing.
public:
virtual IOReturn readSubcodeBuffer(UInt8 *buffer,bool purge,UInt32 entryCount);
Parameters
Name | Description |
buffer | The buffer for the returned data |
purge | True if the buffer should be purged before doing the read. |
entryCount | The number of consecutive subcode blocks (96 bytes each) to return. |
Abstract: Read the entire Table Of Contents (TOC) for the disc.
public:
virtual IOReturn readTOC(struct rawToc *buffer,UInt32 length,tocFormat format);
Parameters
Name | Description |
buffer | The buffer for the returned data |
length | The maximum length of the buffer. |
format | The desired TOC format desired. See tocFormat for details. |
Abstract: Read the Q-subcode information for the current track.
public:
virtual IOReturn readTheQSubcode(struct qSubcode *buffer);
Parameters
Name | Description |
buffer | The buffer for the returned data |
Abstract: Report the device's media state.
public:
virtual IOReturn reportMediaState(bool *mediaPresent,bool *changed);
This override allows us to reset device settings when media changes.
Abstract: Issue the command necessary to position the device at the specified LBA.
protected:
virtual IOReturn seek(UInt32 lba);
Parameters
Name | Description |
lba | The desired Logical Block Address at which to position the device. |
Abstract: Set the address at which the device is to stop playing audio.
public:
virtual IOReturn setAudioStopAddress(positioningType addressType,cdAddress address);
Parameters
Name | Description |
addressType | The type of positioning address. See positioningType for details. |
address | The position from which to begin. |
Abstract: Set the device audio modes to the default.
protected:
virtual IOReturn setDefaultAudioModes(void);
This method calls initAudioModes and then sets volume to the max.
Abstract: Set the audio volume.
public:
virtual IOReturn setVolume(UInt8 leftVolume,UInt8 rightVolume);
Parameters
Name | Description |
leftVolume | The desired left-channel volume. |
rightVolume | The desired right-channel volume. |
© 2000 Apple Computer, Inc. (Last Updated 2/23/2000)