CD Audio Support Module

This module has been designed to simplify the task of controlling the audio functions of a CD-ROM drive and to provide higher level functionality such as play lists, intro play mode and caching of track information.

One of the design goals has to been to provide a consistent interface for the programmer:

  • all SWIs that manipulate at the drive level allow you to specify the drive number rather than a CDFS control block;

  • every SWI that allows you to set a value has an equivalent SWI that allows you to get the value, thus making it easier to share the module with other applications;

  • when a play list is specified, the view of the disc through the SWIs focuses on the tracks in the list, e.g. the size of the disc changes to the total play length of the tracks, next and previous track select the next and previous entries in the list. All of this happens transparently to the application so that you don't have to keep track of whether or not a play list has been specified. This even applies to SWIs that accept or return LBA addresses - they are all translated to refer to the virtual disc described by the play list.

CDAudioSupport_LockModule (0x4D8C0)

This SWI should be called when the application starts up. It ensures that the module is not killed while you are still using it.

CDAudioSupport_UnlockModule (0x4D8C1)

This SWI should be called when the application quits. It allows the module to be killed when the last application stops using it.

CDAudioSupport_GetDriveCount (0x4D8C2)

This SWI returns a total count of all drives available.

CDAudioSupport_GetDriveStatus (0x4D8C3)

This allows the application to get a single snapshot of a drive's status, e.g. playing, paused, ready, empty.

CDAudioSupport_GetDiscType (0x4D8C4)

This allows the application to differentiate between data, audio and PhotoCD discs.

CDAudioSupport_GetDiscID (0x4D8C5)

This SWI returns a simple numeric indicator for that disc (the disc size).

CDAudioSupport_GetAudioSize (0x4D8C6)

This SWI returns, in LBA format, the total audio size available.

CDAudioSupport_GetTrackInfo (0x4D8C7)

This SWI is similar to the CDFS equivalent. It returns the first and last track numbers or, for a given track number, the start address and the data/audio flag.

CDAudioSupport_SetVolume (0x4D8C8)
CDAudioSupport_GetVolume (0x4D8C9)

This pair allows the application to easily set and get the volume for a given drive.

CDAudioSupport_AddMonitor (0x4D8CA)
CDAudioSupport_RemoveMonitor (0x4D8CB)
CDAudioSupport_UpdateMonitorType (0x4D8CC)
CDAudioSupport_GetMonitorType (0x4D8CD)

To ease the burden of the application discovering state changes and getting time updates from a playing disc, the module can be told to monitor the status of a given drive or drives, and to also provide time updates. Both status and time updates are done by setting a pollword flag.

CDAudioSupport_SetPlayList (0x4D8CE)

This allows the application to define or remove a play list for a drive.

CDAudioSupport_GetPlayListTrack (0x4D8CF)

This allows the application to translate a virtual track number into a real track number.

CDAudioSupport_SetIntroMode (0x4D8D0)
CDAudioSupport_GetIntroMode (0x4D8D1)

These SWIs allow the application to turn intro mode on or off. Intro mode is where the start of each track will be played for a given duration before moving on to the next track.

CDAudioSupport_SetIntroLength (0x4D8D2)
CDAudioSupport_GetIntroLength (0x4D8D3)

These SWIs allows the application to specify the intro length in seconds for a given drive.

CDAudioSupport_SetRepeatMode (0x4D8D4)
CDAudioSupport_GetRepeatMode (0x4D8D5)

These SWIs allow the application to turn repeat mode on or off. If repeat mode is on and audio playback stops as a result of reaching the end of the disc/play list, playback will automatically start again from the first track.

CDAudioSupport_PlayFromTrackIndex (0x4D8D6)

This SWI allows the application to start playback from the specified track number/play list index.

CDAudioSupport_PlayFromFrame (0x4D8D7)

This SWI allows the application to start playback from the given frame address (in LBA format).

CDAudioSupport_Pause (0x4D8D8)

Pauses the specified drive.

CDAudioSupport_Stop (0x4D8D9)

Stops playback on the specified drive.

CDAudioSupport_Eject (0x4D8DA)

Ejects the disc from the specified drive.

CDAudioSupport_LockDrive (0x4D8DB)

Locks or unlocks the specified drive against ejection.

CDAudioSupport_FindTrack (0x4D8DC)

Returns the track index from a given frame address on a specified drive.

CDAudioSupport_GetCurrentAddress (0x4D8DD)

Returns the current frame address for a specified drive.

CDAudioSupport_GetCurrentTrack (0x4D8DE)

Returns the current track index for a specified drive.

CDAudioSupport_GetFirstAudioTrack (0x4D8DF)
CDAudioSupport_GetLastAudioTrack (0x4D8E0)

Returns the track index for the first and last audio track on a specified drive.

CDAudioSupport_GetPreviousAudioTrack (0x4D8E1)
CDAudioSupport_GetNextAudioTrack (0x4D8E2)

Returns the track index for the previous and next audio track on a specified drive.

CDAudioSupport_GetTrackStartTime (0x4D8E3)
CDAudioSupport_GetTrackEndTime (0x4D8E4)

Returns the frame address for the start and end of a specified track.

CDAudioSupport_GetEncodedDiscID (0x4D8E5)

Fills a buffer with a string which can be used to identify the disc in the specified drive.

[Top]      [Developer Resources]

Copyright © PEP Associates 1998
Last edited by webmaster@pep-assoc.co.uk on 19 August 1998.