You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MPG123_NEW_FORMAT=-11, /**< Message: Output format will be different on next call. Note that some libmpg123 versions between 1.4.3 and 1.8.0 insist on you calling mpg123_getformat() after getting this message code. Newer versions behave like advertised: You have the chance to call mpg123_getformat(), but you can also just continue decoding and get your data. */
986
+
MPG123_NEW_FORMAT=-11, /**< Message: Output format will be different on next call. Note that some libmpg123 versions between 1.4.3 and 1.8.0 insist on you calling mpg123_getformat() after getting this message code. Newer verisons behave like advertised: You have the chance to call mpg123_getformat(), but you can also just continue decoding and get your data. */
987
987
MPG123_NEED_MORE=-10, /**< Message: For feed reader: "Feed me more!" (call mpg123_feed() or mpg123_decode() with some new input data). */
* \return error code recorded in handle or MPG123_BAD_HANDLE
1053
1053
*/
@@ -1082,7 +1082,7 @@ def show():
1082
1082
MPG123_EXPORT int mpg123_decoder(mpg123_handle *mh, const char* decoder_name);
1083
1083
1084
1084
/** Get the currently active decoder name.
1085
-
* The active decoder engine can vary depending on output constraints,
1085
+
* The active decoder engine can vary depening on output constraints,
1086
1086
* mostly non-resampling, integer output is accelerated via 3DNow & Co. but for
1087
1087
* other modes a fallback engine kicks in.
1088
1088
* Note that this can return a decoder that is only active in the hidden and not
@@ -1108,7 +1108,7 @@ def show():
1108
1108
*
1109
1109
* The mpg123 library decides what output format to use when encountering the first frame in a stream, or actually any frame that is still valid but differs from the frames before in the prompted output format. At such a deciding point, an internal table of allowed encodings, sampling rates and channel setups is consulted. According to this table, an output format is chosen and the decoding engine set up accordingly (including optimized routines for different output formats). This might seem unusual but it just follows from the non-existence of "MPEG audio files" with defined overall properties. There are streams, streams are concatenations of (semi) independent frames. We store streams on disk and call them "MPEG audio files", but that does not change their nature as the decoder is concerned (the LAME/Xing header for gapless decoding makes things interesting again).
1110
1110
*
1111
-
* To get to the point: What you do with mpg123_format() and friends is to fill the internal table of allowed formats before it is used. That includes removing support for some formats or adding your forced sample rate (see MPG123_FORCE_RATE) that will be used with the crude internal resampler. Also keep in mind that the sample encoding is just a question of choice -- the MPEG frames do only indicate their native sampling rate and channel count. If you want to decode to integer or float samples, 8 or 16 bit ... that is your decision. In a "clean" world, libmpg123 would always decode to 32 bit float and let you handle any sample conversion. But there are optimized routines that work faster by directly decoding to the desired encoding / accuracy. We prefer efficiency over conceptual tidiness.
1111
+
* To get to the point: What you do with mpg123_format() and friends is to fill the internal table of allowed formats before it is used. That includes removing support for some formats or adding your forced sample rate (see MPG123_FORCE_RATE) that will be used with the crude internal resampler. Also keep in mind that the sample encoding is just a question of choice -- the MPEG frames do only indicate their native sampling rate and channel count. If you want to decode to integer or float samples, 8 or 16 bit ... that is your decision. In a "clean" world, libmpg123 would always decode to 32 bit float and let you handle any sample conversion. But there are optimized routines that work faster by directly decoding to the desired encoding / accuracy. We prefer efficiency over conceptual tidyness.
1112
1112
*
1113
1113
* People often start out thinking that mpg123_format() should change the actual decoding format on the fly. That is wrong. It only has effect on the next natural change of output format, when libmpg123 will consult its format table again. To make life easier, you might want to call mpg123_format_none() before any thing else and then just allow one desired encoding and a limited set of sample rates / channel choices that you actually intend to deal with. You can force libmpg123 to decode everything to 44100 KHz, stereo, 16 bit integer ... it will duplicate mono channels and even do resampling if needed (unless that feature is disabled in the build, same with some encodings). But I have to stress that the resampling of libmpg123 is very crude and doesn't even contain any kind of "proper" interpolation.
1114
1114
*
@@ -1249,7 +1249,7 @@ def show():
1249
1249
* MPEG files. You could set MPG123_FORCE_RATE beforehand, but that may trigger
1250
1250
* low-quality resampling in the decoder, only do so if in dire need.
1251
1251
* The library will convert mono files to stereo for you, and vice versa.
1252
-
* If any constraint cannot be satisfied (most likely because of a non-default
1252
+
* If any constraint cannot be satisified (most likely because of a non-default
1253
1253
* build of libmpg123), you get MPG123_ERR returned and can query the detailed
1254
1254
* cause from the handle. Only on MPG123_OK there will an open file that you
1255
1255
* then close using mpg123_close(), or implicitly on mpg123_delete() or the next
* \param whence one of SEEK_SET, SEEK_CUR or SEEK_END
@@ -1484,7 +1484,7 @@ def show():
1484
1484
, off_t sampleoff, int whence, off_t *input_offset );
1485
1485
1486
1486
/** Seek to a desired MPEG frame offset.
1487
-
* Usage is modelled after the standard lseek().
1487
+
* Usage is modelled afer the standard lseek().
1488
1488
* \param mh handle
1489
1489
* \param frameoff offset in MPEG frames
1490
1490
* \param whence one of SEEK_SET, SEEK_CUR or SEEK_END
@@ -1762,8 +1762,8 @@ def show():
1762
1762
/** The key values for state information from mpg123_getstate(). */
1763
1763
enum mpg123_state
1764
1764
{
1765
-
MPG123_ACCURATE = 1 /**< Query if positions are currently accurate (integer value, 0 if false, 1 if true). */
1766
-
,MPG123_BUFFERFILL /**< Get fill of internal (feed) input buffer as integer byte count returned as long and as double. An error is returned on integer overflow while converting to (signed) long, but the returned floating point value should still be fine. */
1765
+
MPG123_ACCURATE = 1 /**< Query if positons are currently accurate (integer value, 0 if false, 1 if true). */
1766
+
,MPG123_BUFFERFILL /**< Get fill of internal (feed) input buffer as integer byte count returned as long and as double. An error is returned on integer overflow while converting to (signed) long, but the returned floating point value shold still be fine. */
1767
1767
,MPG123_FRANKENSTEIN /**< Stream consists of carelessly stitched together files. Seeking may yield unexpected results (also with MPG123_ACCURATE, it may be confused). */
1768
1768
,MPG123_FRESH_DECODER /**< Decoder structure has been updated, possibly indicating changed stream (integer value, 0 if false, 1 if true). Flag is cleared after retrieval. */
1769
1769
,MPG123_ENC_DELAY /** Encoder delay read from Info tag (layer III, -1 if unknown). */
@@ -1801,7 +1801,7 @@ def show():
1801
1801
size_t fill; /**< number of used bytes (including closing zero byte) */
1802
1802
} mpg123_string;
1803
1803
1804
-
/** Allocate and initialize a new string.
1804
+
/** Allocate and intialize a new string.
1805
1805
* \param val optional initial string value (can be NULL)
0 commit comments