Commit 765ff502 authored by Josh Coalson's avatar Josh Coalson
Browse files

minor formatting

parent 427048f0
......@@ -278,7 +278,7 @@
CD-Audio ( 1/75 588 ). WAVE . .</P>
<P> , (, -CD). <TT><B>flac</B></TT> .</P>
<P><B></B>: ! '<TT>flac --sector-align *.wav</TT>', , . , , , '<TT>flac --sector-align 8.wav 9.wav 10.wav</TT>'.
<P><B></B>: ! '<TT>flac --sector-align *.wav</TT>', , . , , , '<TT>flac --sector-align 8.wav 9.wav 10.wav</TT>'.
</TD></TR>
<TR><TD><TT>-S {#|X|#x}</TT></TD>
......@@ -286,9 +286,9 @@
<UL>
<LI><TT>#&nbsp;</TT> : .</LI>
<LI><TT>X&nbsp;</TT> : ( <TT>SEEKTABLE</TT>).</LI>
<LI><TT>#x</TT> : # , 0 .</LI>
</UL>
......@@ -435,15 +435,15 @@
<OL>
<LI> <TT>*_new()</TT>.</LI>
<LI> , , <TT>*_set_*()</TT>.</LI>
<LI> , /, <TT>*_init()</TT>.</LI>
<LI> <TT>*_process_*()</TT> , .</LI>
<LI> <TT>*_finish()</TT>, .</LI>
<LI> <TT>*_delete()</TT>.</LI>
</OL>
......@@ -458,7 +458,7 @@
<P><B> </B></P>
<P> . <TT>FLAC__StreamDecoder</TT>. <TT>FLAC__stream_decoder_new()</TT>, <TT>FLAC__stream_decoder_set_*()</TT> <TT>FLAC__stream_decoder_init()</TT>. :</P>
<UL>
......@@ -477,7 +477,7 @@
<LI><B><TT>FLAC__stream_decoder_process_whole_stream()</TT></B> - <TT>FLAC__STREAM_DECODER_READ_END_OF_STREAM</TT> <TT>FLAC__STREAM_DECODER_READ_ABORT</TT>.</LI>
<LI><B><TT>FLAC__stream_decoder_process_metadata()</TT></B> - .</LI>
<LI><B><TT>FLAC__stream_decoder_process_one_frame()</TT></B> - . .</LI>
<LI><B><TT>FLAC__stream_decoder_process_remaining_frames()</TT></B> - . . <TT>FLAC__stream_decoder_process_one_frame()</TT>.</LI>
......
......@@ -238,9 +238,9 @@
<UL>
<LI> , , 0001-0101 1000-1111. ( ), <TT>STREAMINFO</TT> .</LI>
<LI> 001-110.</LI>
<LI> 0001-1011.</LI>
</UL>
</BLOCKQUOTE></P>
......
......@@ -192,22 +192,22 @@ namespace FLAC {
inline void set_reference(bool x) { is_reference_ = x; }
};
inline bool Prototype::operator==(const Prototype &object) const
inline bool Prototype::operator==(const Prototype &object) const
{ return (bool)::FLAC__metadata_object_is_equal(object_, object.object_); }
inline bool Prototype::operator==(const ::FLAC__StreamMetadata &object) const
inline bool Prototype::operator==(const ::FLAC__StreamMetadata &object) const
{ return (bool)::FLAC__metadata_object_is_equal(object_, &object); }
inline bool Prototype::operator==(const ::FLAC__StreamMetadata *object) const
inline bool Prototype::operator==(const ::FLAC__StreamMetadata *object) const
{ return (bool)::FLAC__metadata_object_is_equal(object_, object); }
inline bool Prototype::operator!=(const Prototype &object) const
inline bool Prototype::operator!=(const Prototype &object) const
{ return !operator==(object); }
inline bool Prototype::operator!=(const ::FLAC__StreamMetadata &object) const
inline bool Prototype::operator!=(const ::FLAC__StreamMetadata &object) const
{ return !operator==(object); }
inline bool Prototype::operator!=(const ::FLAC__StreamMetadata *object) const
inline bool Prototype::operator!=(const ::FLAC__StreamMetadata *object) const
{ return !operator==(object); }
inline bool Prototype::is_valid() const
......
......@@ -81,7 +81,7 @@ extern "C" {
* automatically turned off if there is no signature in the STREAMINFO
* block or when a seek is attempted.
*
* Make sure to read the detailed descriptions of the
* Make sure to read the detailed descriptions of the
* \link flac_seekable_stream_decoder seekable stream decoder module \endlink
* and \link flac_stream_decoder stream decoder module \endlink
* since the file decoder inherits much of its behavior from them.
......@@ -107,16 +107,16 @@ extern "C" {
*/
typedef enum {
FLAC__FILE_DECODER_OK = 0,
FLAC__FILE_DECODER_OK = 0,
/**< The decoder is in the normal OK state. */
FLAC__FILE_DECODER_END_OF_FILE,
/**< The decoder has reached the end of the file. */
FLAC__FILE_DECODER_ERROR_OPENING_FILE,
FLAC__FILE_DECODER_ERROR_OPENING_FILE,
/**< An error occurred opening the input file. */
FLAC__FILE_DECODER_MEMORY_ALLOCATION_ERROR,
FLAC__FILE_DECODER_MEMORY_ALLOCATION_ERROR,
/**< An error occurred allocating memory. */
FLAC__FILE_DECODER_SEEK_ERROR,
......@@ -125,18 +125,18 @@ typedef enum {
FLAC__FILE_DECODER_SEEKABLE_STREAM_DECODER_ERROR,
/**< An error occurred in the underlying seekable stream decoder. */
FLAC__FILE_DECODER_ALREADY_INITIALIZED,
FLAC__FILE_DECODER_ALREADY_INITIALIZED,
/**< FLAC__file_decoder_init() was called when the decoder was already
* initialized, usually because FLAC__file_decoder_finish() was not
* called.
* called.
*/
FLAC__FILE_DECODER_INVALID_CALLBACK,
FLAC__FILE_DECODER_INVALID_CALLBACK,
/**< FLAC__file_decoder_init() was called without all callbacks
* being set.
*/
FLAC__FILE_DECODER_UNINITIALIZED
FLAC__FILE_DECODER_UNINITIALIZED
/**< The decoder is in the uninitialized state. */
} FLAC__FileDecoderState;
......
......@@ -107,7 +107,7 @@ typedef enum {
FLAC__FILE_ENCODER_FATAL_ERROR_WHILE_WRITING,
/**< A fatal error occurred while writing to the encoded file. */
FLAC__FILE_ENCODER_ERROR_OPENING_FILE,
FLAC__FILE_ENCODER_ERROR_OPENING_FILE,
/**< An error occurred opening the output file for writing. */
FLAC__FILE_ENCODER_MEMORY_ALLOCATION_ERROR,
......
......@@ -172,7 +172,7 @@ extern const unsigned FLAC__STREAM_SYNC_LEN; /* = 32 bits */
typedef enum {
FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE = 0
/**< Residual is coded by partitioning into contexts, each with it's own
* Rice parameter. */
* Rice parameter. */
} FLAC__EntropyCodingMethodType;
/** Maps a FLAC__EntropyCodingMethodType to a C string.
......
......@@ -118,7 +118,7 @@ extern "C" {
*/
typedef enum {
FLAC__SEEKABLE_STREAM_DECODER_OK = 0,
FLAC__SEEKABLE_STREAM_DECODER_OK = 0,
/**< The decoder is in the normal OK state. */
FLAC__SEEKABLE_STREAM_DECODER_SEEKING,
......@@ -141,18 +141,18 @@ typedef enum {
* callback returned an error.
*/
FLAC__SEEKABLE_STREAM_DECODER_ALREADY_INITIALIZED,
FLAC__SEEKABLE_STREAM_DECODER_ALREADY_INITIALIZED,
/**< FLAC__seekable_stream_decoder_init() was called when the
* decoder was already initialized, usually because
* FLAC__seekable_stream_decoder_finish() was not called.
*/
FLAC__SEEKABLE_STREAM_DECODER_INVALID_CALLBACK,
FLAC__SEEKABLE_STREAM_DECODER_INVALID_CALLBACK,
/**< FLAC__seekable_stream_decoder_init() was called without all
* callbacks being set.
*/
FLAC__SEEKABLE_STREAM_DECODER_UNINITIALIZED
FLAC__SEEKABLE_STREAM_DECODER_UNINITIALIZED
/**< The decoder is in the uninitialized state. */
} FLAC__SeekableStreamDecoderState;
......
......@@ -100,12 +100,12 @@ typedef enum {
* FLAC__seekable_stream_encoder_finish() was not called.
*/
FLAC__SEEKABLE_STREAM_ENCODER_INVALID_CALLBACK,
FLAC__SEEKABLE_STREAM_ENCODER_INVALID_CALLBACK,
/**< FLAC__seekable_stream_encoder_init() was called without all
* callbacks being set.
*/
FLAC__SEEKABLE_STREAM_ENCODER_INVALID_SEEKTABLE,
FLAC__SEEKABLE_STREAM_ENCODER_INVALID_SEEKTABLE,
/**< An invalid seek table was passed is the metadata to
* FLAC__seekable_stream_encoder_set_metadata().
*/
......
......@@ -154,7 +154,7 @@ extern "C" {
* blocks to return. Remember that some metadata blocks can be big so
* filtering out the ones you don't use can reduce the memory requirements
* of the decoder. Also note the special forms
* FLAC__stream_decoder_respond_application(id) and
* FLAC__stream_decoder_respond_application(id) and
* FLAC__stream_decoder_ignore_application(id) for filtering APPLICATION
* blocks based on the application ID.
*
......@@ -726,7 +726,7 @@ FLAC__bool FLAC__stream_decoder_reset(FLAC__StreamDecoder *decoder);
* called with the decoded metadata block or audio frame, unless an error
* occurred. If the decoder loses sync it will call the error callback
* instead.
*
*
* \param decoder An initialized decoder instance in the state
* \c FLAC__STREAM_DECODER_SEARCH_FOR_FRAME_SYNC.
* \assert
......@@ -751,7 +751,7 @@ FLAC__bool FLAC__stream_decoder_process_single(FLAC__StreamDecoder *decoder);
* As each metadata block is decoded, the metadata callback will be called
* with the decoded metadata. If the decoder loses sync it will call the
* error callback.
*
*
* \param decoder An initialized decoder instance in the state
* \c FLAC__STREAM_DECODER_SEARCH_FOR_METADATA.
* \assert
......@@ -776,7 +776,7 @@ FLAC__bool FLAC__stream_decoder_process_until_end_of_metadata(FLAC__StreamDecode
* As each metadata block and frame is decoded, the metadata or write
* callback will be called with the decoded metadata or frame. If the
* decoder loses sync it will call the error callback.
*
*
* \param decoder An initialized decoder instance in the state
* \c FLAC__STREAM_DECODER_SEARCH_FOR_METADATA.
* \assert
......
......@@ -506,7 +506,7 @@ FLAC__bool OggFLAC__stream_decoder_reset(OggFLAC__StreamDecoder *decoder);
/** Decode one metadata block or audio frame.
* This is inherited from FLAC__StreamDecoder; see FLAC__stream_decoder_process_single()
*
*
* \param decoder An initialized decoder instance in the state
* \c OggFLAC__STREAM_DECODER_OK.
* \assert
......@@ -523,7 +523,7 @@ FLAC__bool OggFLAC__stream_decoder_process_single(OggFLAC__StreamDecoder *decode
/** Decode until the end of the metadata.
* This is inherited from FLAC__StreamDecoder; see FLAC__stream_decoder_process_until_end_of_metadata()
*
*
* \param decoder An initialized decoder instance in the state
* \c OggFLAC__STREAM_DECODER_OK.
* \assert
......@@ -540,7 +540,7 @@ FLAC__bool OggFLAC__stream_decoder_process_until_end_of_metadata(OggFLAC__Stream
/** Decode until the end of the stream.
* This is inherited from FLAC__StreamDecoder; see FLAC__stream_decoder_process_until_end_of_stream()
*
*
* \param decoder An initialized decoder instance in the state
* \c OggFLAC__STREAM_DECODER_OK.
* \assert
......
......@@ -37,4 +37,4 @@ libFLAC___la_SOURCES = \
seekable_stream_decoder.cc \
seekable_stream_encoder.cc \
stream_decoder.cc \
stream_encoder.cc
stream_encoder.cc
......@@ -950,7 +950,7 @@ namespace FLAC {
return (bool)::FLAC__metadata_iterator_prev(iterator_);
}
::FLAC__MetadataType Iterator::get_block_type() const
::FLAC__MetadataType Iterator::get_block_type() const
{
FLAC__ASSERT(is_valid());
return ::FLAC__metadata_iterator_get_block_type(iterator_);
......
......@@ -2081,7 +2081,7 @@ FLAC__bool FLAC__bitbuffer_read_rice_signed_block(FLAC__BitBuffer *bb, int vals[
CRC16_UPDATE_BLURB(bb, save_blurb, bb->read_crc16);
break;
}
}
}
else {
msbs += FLAC__BITS_PER_BLURB - cbits;
cbits = 0;
......@@ -2171,7 +2171,7 @@ FLAC__bool FLAC__bitbuffer_read_rice_signed_block(FLAC__BitBuffer *bb, int vals[
CRC16_UPDATE_BLURB(bb, save_blurb, bb->read_crc16);
break;
}
}
}
else {
msbs += FLAC__BITS_PER_BLURB - cbits;
cbits = 0;
......
......@@ -126,7 +126,7 @@ FLAC__bool FLAC__format_sample_rate_is_valid(unsigned sample_rate)
sample_rate == 0 ||
sample_rate > FLAC__MAX_SAMPLE_RATE ||
(
sample_rate >= (1u << 16) &&
sample_rate >= (1u << 16) &&
!(sample_rate % 1000 == 0 || sample_rate % 10 == 0)
)
) {
......
......@@ -147,7 +147,7 @@ redo_it:
else {
int log2cmax;
(void)frexp(cmax, &log2cmax);
(void)frexp(cmax, &log2cmax);
log2cmax--;
*shift = (int)precision - log2cmax - 1;
......
......@@ -1619,7 +1619,7 @@ FLAC__Metadata_SimpleIteratorStatus write_metadata_block_data_padding_(FILE *fil
return FLAC__METADATA_SIMPLE_ITERATOR_STATUS_WRITE_ERROR;
n %= 1024;
if(fwrite(buffer, 1, n, file) != n)
return FLAC__METADATA_SIMPLE_ITERATOR_STATUS_WRITE_ERROR;
......
......@@ -186,7 +186,7 @@ FLAC__SeekableStreamEncoderState FLAC__seekable_stream_encoder_init(FLAC__Seekab
* Initializing the stream encoder writes all the metadata, so we
* save the stream offset now.
*/
encoder->private_->stream_offset = encoder->private_->bytes_written;
encoder->private_->stream_offset = encoder->private_->bytes_written;
return encoder->protected_->state = FLAC__SEEKABLE_STREAM_ENCODER_OK;
}
......@@ -407,7 +407,7 @@ FLAC__bool FLAC__seekable_stream_encoder_set_metadata(FLAC__SeekableStreamEncode
if(0 != metadata && num_blocks > 0) {
unsigned i;
for(i = 0; i < num_blocks; i++) {
if(0 != metadata[i] && metadata[i]->type == FLAC__METADATA_TYPE_SEEKTABLE) {
if(0 != metadata[i] && metadata[i]->type == FLAC__METADATA_TYPE_SEEKTABLE) {
encoder->private_->seek_table = &metadata[i]->data.seek_table;
break; /* take only the first one */
}
......
......@@ -32,4 +32,4 @@ libOggFLAC___la_LDFLAGS = -version-info 0:0:0
libOggFLAC___la_SOURCES = \
stream_decoder.cc \
stream_encoder.cc
stream_encoder.cc
......@@ -132,7 +132,7 @@ void OggFLAC__stream_decoder_delete(OggFLAC__StreamDecoder *decoder)
OggFLAC__stream_decoder_finish(decoder);
FLAC__stream_decoder_delete(decoder->private_->FLAC_stream_decoder);
FLAC__stream_decoder_delete(decoder->private_->FLAC_stream_decoder);
free(decoder->private_);
free(decoder->protected_);
......@@ -161,14 +161,14 @@ OggFLAC__StreamDecoderState OggFLAC__stream_decoder_init(OggFLAC__StreamDecoder
if(ogg_sync_init(&decoder->private_->ogg.sync_state) != 0)
return decoder->protected_->state = OggFLAC__STREAM_DECODER_OGG_ERROR;
FLAC__stream_decoder_set_read_callback(decoder->private_->FLAC_stream_decoder, read_callback_);
FLAC__stream_decoder_set_write_callback(decoder->private_->FLAC_stream_decoder, write_callback_);
FLAC__stream_decoder_set_metadata_callback(decoder->private_->FLAC_stream_decoder, metadata_callback_);
FLAC__stream_decoder_set_error_callback(decoder->private_->FLAC_stream_decoder, error_callback_);
FLAC__stream_decoder_set_client_data(decoder->private_->FLAC_stream_decoder, decoder);
FLAC__stream_decoder_set_read_callback(decoder->private_->FLAC_stream_decoder, read_callback_);
FLAC__stream_decoder_set_write_callback(decoder->private_->FLAC_stream_decoder, write_callback_);
FLAC__stream_decoder_set_metadata_callback(decoder->private_->FLAC_stream_decoder, metadata_callback_);
FLAC__stream_decoder_set_error_callback(decoder->private_->FLAC_stream_decoder, error_callback_);
FLAC__stream_decoder_set_client_data(decoder->private_->FLAC_stream_decoder, decoder);
if(FLAC__stream_decoder_init(decoder->private_->FLAC_stream_decoder) != FLAC__STREAM_DECODER_SEARCH_FOR_METADATA)
return decoder->protected_->state = OggFLAC__STREAM_DECODER_FLAC_STREAM_DECODER_ERROR;
if(FLAC__stream_decoder_init(decoder->private_->FLAC_stream_decoder) != FLAC__STREAM_DECODER_SEARCH_FOR_METADATA)
return decoder->protected_->state = OggFLAC__STREAM_DECODER_FLAC_STREAM_DECODER_ERROR;
return decoder->protected_->state = OggFLAC__STREAM_DECODER_OK;
}
......@@ -448,7 +448,7 @@ FLAC__StreamDecoderReadStatus read_callback_(const FLAC__StreamDecoder *unused,
* We have to be careful not to read in more than the
* FLAC__StreamDecoder says it has room for. We know
* that the size of the decoded data must be no more
* than the encoded data we will read.
* than the encoded data we will read.
*/
ogg_bytes_to_read = min(*bytes, OGG_BYTES_CHUNK);
oggbuf = ogg_sync_buffer(&decoder->private_->ogg.sync_state, ogg_bytes_to_read);
......@@ -456,7 +456,7 @@ FLAC__StreamDecoderReadStatus read_callback_(const FLAC__StreamDecoder *unused,
if(decoder->private_->read_callback(decoder, oggbuf, &ogg_bytes_to_read, decoder->private_->client_data) != FLAC__STREAM_DECODER_READ_STATUS_CONTINUE) {
decoder->protected_->state = OggFLAC__STREAM_DECODER_READ_ERROR;
return FLAC__STREAM_DECODER_READ_STATUS_ABORT;
}
}
ogg_bytes_read = ogg_bytes_to_read;
if(ogg_sync_wrote(&decoder->private_->ogg.sync_state, ogg_bytes_read) < 0) {
......
......@@ -126,7 +126,7 @@ void OggFLAC__stream_encoder_delete(OggFLAC__StreamEncoder *encoder)
FLAC__ASSERT(0 != encoder->private_->FLAC_stream_encoder);
(void)OggFLAC__stream_encoder_finish(encoder);
FLAC__stream_encoder_delete(encoder->private_->FLAC_stream_encoder);
free(encoder->private_);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment