Re: [Libcdio-devel] proposed pre-gap patch
The changes passed the existing regression tests. However, I could not get all of them to run because I do not have the file svcd_ogt_test_ntsc.right. As for my regression tests, I think I will add a testpregap.c which will have an array of image files and their expected track/pre-gap pairs. I'm hoping to do that tonight. R. Bernstein wrote: Thanks! I'll apply this privately at home tonight and look at it then. Just two more days until 0.80 is released and then this will go into trunk. (I'm not sure I want to create a branch for what amounts to two days.) Robert William Fuller writes: This is the whole shebang minus the regression tests. It includes the modifications to the documentation, pre-gap support for cdrdao in addition to nrg and bin/cue, as well as updates to the library revisions. The only thing missing is regression tests. Hopefully, I'll get to those shortly. It turns out texi is pretty easy. I didn't even need to read the documentation! (Although I probably should)
[Libcdio-devel] proposed pre-gap patch
This is the whole shebang minus the regression tests. It includes the modifications to the documentation, pre-gap support for cdrdao in addition to nrg and bin/cue, as well as updates to the library revisions. The only thing missing is regression tests. Hopefully, I'll get to those shortly. It turns out texi is pretty easy. I didn't even need to read the documentation! (Although I probably should) diff -ur -x libcdio.info -x version.h -x 'libiso9660*pc' -x 'libcdio*pc' libcdio-0.80-clean/doc/libcdio.texi libcdio-0.80/doc/libcdio.texi --- libcdio-0.80-clean/doc/libcdio.texi 2007-12-15 17:35:53.0 -0500 +++ libcdio-0.80/doc/libcdio.texi 2008-03-13 14:26:00.0 -0400 @@ -876,18 +876,20 @@ @menu * Tracks:: Tracks * Sectors:: Block addressing (MSF, LSN, LBA) +* Pre-gaps:: Track pre-gaps @end menu @node Tracks @section tracks --- disc subdivisions @cindex track [EMAIL PROTECTED] gaps In this section we describe CD properties and terms that we make use of in @value{libcdio}. A CD is formated into a number of @term{tracks}, and a CD can hold at most 99 such tracks. This is defined by @code{CDIO_CD_MAX_TRACKS} in [EMAIL PROTECTED]/sector.h}. Between the tracks CD specifications require a [EMAIL PROTECTED]/sector.h}. Between some tracks CD specifications require a ``2 second'' in gap (called a @term{lead-in gap}. This is unused space with no ``data'' similar to the space between tracks on an old phonograph. The word ``second'' here really refers to a measure of @@ -900,9 +902,9 @@ second'' lead-in gap and there is supposed to be another ``2 second'' @term{lead-out} gap at the end (or outer edge) of the CD. -People have discovered that they can put useful data in the various -gaps and their equipment can read this, violating the standards but -allowing a CD to store more data. +People have discovered that they can put useful data in the @term{lead-in} +and @term{lead-out} gaps, and their equipment can read this, violating +the standards but allowing a CD to store more data. In order to determine the number of tracks on a CD and where they start, commands are used to get this table-of-contents or @term{TOC} @@ -922,7 +924,7 @@ @cindex frames A track is broken up into a number of 2352-byte @emph{blocks} which we -sometimes call @emph{sectors} or @emph{frames}. Whereas tracks have to +sometimes call @emph{sectors} or @emph{frames}. Whereas tracks may have a gap between them, a block or sector does not. (In @value{libcdio} the block size constant is defined using @code{CDIO_CD_FRAMESIZE_RAW}). @@ -981,6 +983,138 @@ add 150. Why the distinction between LBA and LSN? I don't know, perhaps this has something to do with ``multisession'' CDs. [EMAIL PROTECTED] Pre-gaps [EMAIL PROTECTED] track pre-gaps -- @acronym{CD-DA} discs and gaps [EMAIL PROTECTED] CD-DA [EMAIL PROTECTED] gaps [EMAIL PROTECTED] lead in [EMAIL PROTECTED] lead out [EMAIL PROTECTED] pre-gap [EMAIL PROTECTED] Q sub-channel + +Gaps are possibly one of the least understood topics in audio discs. +In the case of @acronym{CD-DA} discs, standards require a silent 2 +second gap before the first audio track and after the last audio track +(in each session.) These are respectively referred to as [EMAIL PROTECTED] and @term{lead-out} gaps. No other gaps are required. +It is important not to confuse the required @term{lead-in} and [EMAIL PROTECTED] gaps with the optional track @term{pre-gap}s. Track [EMAIL PROTECTED] are the gaps that may occur between audio tracks. +Typically, track @term{pre-gap}s are filled with silence so that the +listener knows that one song has ended, and the next will soon begin. +However, track @term{pre-gap}s do not have to contain silence. One +exception is an audio disc of a live performance. Because the +performer may seamlessly move from one piece of the performance to the +next, it would be unnatural for the disc to contain silence between +the two pieces. Instead, the track number updates with no +interruption in the performance. This allows the listener to either +hear the entire performance without unnatural interruptions, or to +conveniently skip to certain pieces of the performance. Finally, some [EMAIL PROTECTED] discs--whose behavior will be described below--lack +track @term{pre-gap}s altogether although they must still include the [EMAIL PROTECTED] and @term{lead-out} gaps. + +In order to understand the track @term{pre-gap}s that occur between +audio tracks, it is necessary to understand how CD players display the +track number and time. Embedded in each block of audio data is +non-audio information known as the @term{Q sub-channel}. The [EMAIL PROTECTED] sub-channel} data tells the CD player what track number and time +it should display while it is playing the block of audio data in which +the @term{Q sub-channel} data is embedded. Near the end of some +tracks, the @term{Q sub-channel} may instruct the CD player to update +the track
[Libcdio-devel] proposed pre-gap patch
Thanks! I'll apply this privately at home tonight and look at it then. Just two more days until 0.80 is released and then this will go into trunk. (I'm not sure I want to create a branch for what amounts to two days.) Robert William Fuller writes: This is the whole shebang minus the regression tests. It includes the modifications to the documentation, pre-gap support for cdrdao in addition to nrg and bin/cue, as well as updates to the library revisions. The only thing missing is regression tests. Hopefully, I'll get to those shortly. It turns out texi is pretty easy. I didn't even need to read the documentation! (Although I probably should) diff -ur -x libcdio.info -x version.h -x 'libiso9660*pc' -x 'libcdio*pc' libcdio-0.80-clean/doc/libcdio.texi libcdio-0.80/doc/libcdio.texi --- libcdio-0.80-clean/doc/libcdio.texi 2007-12-15 17:35:53.0 -0500 +++ libcdio-0.80/doc/libcdio.texi2008-03-13 14:26:00.0 -0400 @@ -876,18 +876,20 @@ @menu * Tracks:: Tracks * Sectors:: Block addressing (MSF, LSN, LBA) +* Pre-gaps:: Track pre-gaps @end menu @node Tracks @section tracks --- disc subdivisions @cindex track [EMAIL PROTECTED] gaps In this section we describe CD properties and terms that we make use of in @value{libcdio}. A CD is formated into a number of @term{tracks}, and a CD can hold at most 99 such tracks. This is defined by @code{CDIO_CD_MAX_TRACKS} in [EMAIL PROTECTED]/sector.h}. Between the tracks CD specifications require a [EMAIL PROTECTED]/sector.h}. Between some tracks CD specifications require a ``2 second'' in gap (called a @term{lead-in gap}. This is unused space with no ``data'' similar to the space between tracks on an old phonograph. The word ``second'' here really refers to a measure of @@ -900,9 +902,9 @@ second'' lead-in gap and there is supposed to be another ``2 second'' @term{lead-out} gap at the end (or outer edge) of the CD. -People have discovered that they can put useful data in the various -gaps and their equipment can read this, violating the standards but -allowing a CD to store more data. +People have discovered that they can put useful data in the @term{lead-in} +and @term{lead-out} gaps, and their equipment can read this, violating +the standards but allowing a CD to store more data. In order to determine the number of tracks on a CD and where they start, commands are used to get this table-of-contents or @term{TOC} @@ -922,7 +924,7 @@ @cindex frames A track is broken up into a number of 2352-byte @emph{blocks} which we -sometimes call @emph{sectors} or @emph{frames}. Whereas tracks have to +sometimes call @emph{sectors} or @emph{frames}. Whereas tracks may have a gap between them, a block or sector does not. (In @value{libcdio} the block size constant is defined using @code{CDIO_CD_FRAMESIZE_RAW}). @@ -981,6 +983,138 @@ add 150. Why the distinction between LBA and LSN? I don't know, perhaps this has something to do with ``multisession'' CDs. [EMAIL PROTECTED] Pre-gaps [EMAIL PROTECTED] track pre-gaps -- @acronym{CD-DA} discs and gaps [EMAIL PROTECTED] CD-DA [EMAIL PROTECTED] gaps [EMAIL PROTECTED] lead in [EMAIL PROTECTED] lead out [EMAIL PROTECTED] pre-gap [EMAIL PROTECTED] Q sub-channel + +Gaps are possibly one of the least understood topics in audio discs. +In the case of @acronym{CD-DA} discs, standards require a silent 2 +second gap before the first audio track and after the last audio track +(in each session.) These are respectively referred to as [EMAIL PROTECTED] and @term{lead-out} gaps. No other gaps are required. +It is important not to confuse the required @term{lead-in} and [EMAIL PROTECTED] gaps with the optional track @term{pre-gap}s. Track [EMAIL PROTECTED] are the gaps that may occur between audio tracks. +Typically, track @term{pre-gap}s are filled with silence so that the +listener knows that one song has ended, and the next will soon begin. +However, track @term{pre-gap}s do not have to contain silence. One +exception is an audio disc of a live performance. Because the +performer may seamlessly move from one piece of the performance to the +next, it would be unnatural for the disc to contain silence between +the two pieces. Instead, the track number updates with no +interruption in the performance. This allows the listener to either +hear the entire performance without unnatural interruptions, or to +conveniently skip to certain pieces of the performance. Finally, some [EMAIL PROTECTED] discs--whose behavior will be described below--lack +track @term{pre-gap}s altogether although they must still include the [EMAIL PROTECTED] and @term{lead-out} gaps. + +In order to understand the track @term{pre-gap}s that occur between +audio tracks, it is necessary to understand how CD players display