This article is from the CD-Recordable FAQ, by Andy McFadden (firstname.lastname@example.org) with numerous contributions by others.
There are two ways to do this. The first is to put the data on track 1 of
the CD, and audio on the next several tracks (discs created this way are
referred to as "mixed-mode" CDs). The CD-ROM drive will automatically look
at track 1 and ignore all other tracks, so you'll be able to get at the
data and -- depending on the operating system -- will be able to play the
audio tracks. Remember that all of the tracks, both audio and data, need
to be recorded in a single session. See section (3-2).
The down side of this is that audio CD players may attempt to play track 1,
which can be obnoxious or downright harmful to audio equipment. Most
modern CD players are smart enough to ignore data tracks, so this won't
usually be a problem.
The other approach is to create a multisession disc with the audio tracks
in the first session and the data track in the second. This is how CD
Extra (the format formerly known as CD Plus) works. Audio CD players only
look at the first session, and CD-ROM drives are (supposed to) start with
the last session, so it all works out. Sony Music has some pages at
(NOTE: it appears that in some situations a Macintosh will not handle
multi-session audio/data CD-R discs correctly. For example, a G3 with a
DVD-ROM drive running Mac OS 8.6 works fine, but a G4 or iMac running Mac OS
9 will reject the disc as unreadable. The same system will handle pressed
discs correctly -- only CD-Rs fail. The reason for this is uncertain,
but it may be possible to work around it by disabling the system's audio
CD extension when you want to read the data portion.)
A common question is how to write the audio in the first session without
gaps between tracks, because you can't use disc-at-once recording.
(If you did use DAO recording, the disc would be closed, and you wouldn't
be able to write the data track). With the right hardware and software,
you can do "session-at-once" recording to write the audio without gaps.
For example, if you're recording with Nero and SAO-capable hardware,
you just select disc-at-once mode but don't select "finalize CD".
What happens when you try to play one of these as audio in your CD-ROM
drive? As with most things multisession, it depends on your drive. (The
player that comes with Plextor CD-ROM drives does the right thing. If
you're using a different drive, you're on your own.)
There's actually a third way to do this that involves putting the data
track into the extended pregap of the first audio track. Instead of the
audio starting at minute:second:block 00:02:00, the data starts there, and
the audio is written after. The pregap is adjusted accordingly. This
method never gained popularity because some drives started playing at
00:02:00 regardless. There doesn't seem to be a way to do this on CD-R.
Some CDs perversely put audio in the pregap. You can play it by starting
to play track 1, then holding the "reverse" button until it seeks all
the way to the start of the disc. Some older digital audio extraction
programs would just ignore the "hidden" audio, but most newer ones will
extract the entire track.
For example, _Factory Showroom_ by "They Might Be Giants" looks like this:
TRACK 01 AUDIO INDEX 00 00:00:00 INDEX 01 01:01:00 TRACK 02 AUDIO INDEX 00 04:52:10 INDEX 01 04:52:10 TRACK 03 AUDIO [...]