Updated libmpg123 and headers.

This commit is contained in:
Christopher Snowhill 2017-12-03 13:12:27 -08:00
parent 7037434ae6
commit e02e72cd08
5 changed files with 1199 additions and 263 deletions

135
ext_includes/fmt123.h Normal file
View File

@ -0,0 +1,135 @@
/*
libmpg123: MPEG Audio Decoder library
separate header just for audio format definitions not tied to
library code
copyright 1995-2015 by the mpg123 project
free software under the terms of the LGPL 2.1
see COPYING and AUTHORS files in distribution or http://mpg123.org
*/
#ifndef MPG123_ENC_H
#define MPG123_ENC_H
/** \file fmt123.h Audio format definitions. */
/** \defgroup mpg123_enc mpg123 PCM sample encodings
* These are definitions for audio formats used by libmpg123 and
* libout123.
*
* @{
*/
/** An enum over all sample types possibly known to mpg123.
* The values are designed as bit flags to allow bitmasking for encoding
* families.
* This is also why the enum is not used as type for actual encoding variables,
* plain integers (at least 16 bit, 15 bit being used) cover the possible
* combinations of these flags.
*
* Note that (your build of) libmpg123 does not necessarily support all these.
* Usually, you can expect the 8bit encodings and signed 16 bit.
* Also 32bit float will be usual beginning with mpg123-1.7.0 .
* What you should bear in mind is that (SSE, etc) optimized routines may be
* absent for some formats. We do have SSE for 16, 32 bit and float, though.
* 24 bit integer is done via postprocessing of 32 bit output -- just cutting
* the last byte, no rounding, even. If you want better, do it yourself.
*
* All formats are in native byte order. If you need different endinaness, you
* can simply postprocess the output buffers (libmpg123 wouldn't do anything
* else). The macro MPG123_SAMPLESIZE() can be helpful there.
*/
enum mpg123_enc_enum
{
/* 0000 0000 0000 1111 Some 8 bit integer encoding. */
MPG123_ENC_8 = 0x00f
/* 0000 0000 0100 0000 Some 16 bit integer encoding. */
, MPG123_ENC_16 = 0x040
/* 0100 0000 0000 0000 Some 24 bit integer encoding. */
, MPG123_ENC_24 = 0x4000
/* 0000 0001 0000 0000 Some 32 bit integer encoding. */
, MPG123_ENC_32 = 0x100
/* 0000 0000 1000 0000 Some signed integer encoding. */
, MPG123_ENC_SIGNED = 0x080
/* 0000 1110 0000 0000 Some float encoding. */
, MPG123_ENC_FLOAT = 0xe00
/* 0000 0000 1101 0000 signed 16 bit */
, MPG123_ENC_SIGNED_16 = (MPG123_ENC_16|MPG123_ENC_SIGNED|0x10)
/* 0000 0000 0110 0000 unsigned 16 bit */
, MPG123_ENC_UNSIGNED_16 = (MPG123_ENC_16|0x20)
/* 0000 0000 0000 0001 unsigned 8 bit */
, MPG123_ENC_UNSIGNED_8 = 0x01
/* 0000 0000 1000 0010 signed 8 bit */
, MPG123_ENC_SIGNED_8 = (MPG123_ENC_SIGNED|0x02)
/* 0000 0000 0000 0100 ulaw 8 bit */
, MPG123_ENC_ULAW_8 = 0x04
/* 0000 0000 0000 1000 alaw 8 bit */
, MPG123_ENC_ALAW_8 = 0x08
/* 0001 0001 1000 0000 signed 32 bit */
, MPG123_ENC_SIGNED_32 = MPG123_ENC_32|MPG123_ENC_SIGNED|0x1000
/* 0010 0001 0000 0000 unsigned 32 bit */
, MPG123_ENC_UNSIGNED_32 = MPG123_ENC_32|0x2000
/* 0101 0000 1000 0000 signed 24 bit */
, MPG123_ENC_SIGNED_24 = MPG123_ENC_24|MPG123_ENC_SIGNED|0x1000
/* 0110 0000 0000 0000 unsigned 24 bit */
, MPG123_ENC_UNSIGNED_24 = MPG123_ENC_24|0x2000
/* 0000 0010 0000 0000 32bit float */
, MPG123_ENC_FLOAT_32 = 0x200
/* 0000 0100 0000 0000 64bit float */
, MPG123_ENC_FLOAT_64 = 0x400
/* Any possibly known encoding from the list above. */
, MPG123_ENC_ANY = ( MPG123_ENC_SIGNED_16 | MPG123_ENC_UNSIGNED_16
| MPG123_ENC_UNSIGNED_8 | MPG123_ENC_SIGNED_8
| MPG123_ENC_ULAW_8 | MPG123_ENC_ALAW_8
| MPG123_ENC_SIGNED_32 | MPG123_ENC_UNSIGNED_32
| MPG123_ENC_SIGNED_24 | MPG123_ENC_UNSIGNED_24
| MPG123_ENC_FLOAT_32 | MPG123_ENC_FLOAT_64 )
};
/** Get size of one PCM sample with given encoding.
* This is included both in libmpg123 and libout123. Both offer
* an API function to provide the macro results from library
* compile-time, not that of you application. This most likely
* does not matter as I do not expect any fresh PCM sample
* encoding to appear. But who knows? Perhaps the encoding type
* will be abused for funny things in future, not even plain PCM.
* And, by the way: Thomas really likes the ?: operator.
* \param enc the encoding (mpg123_enc_enum value)
* \return size of one sample in bytes
*/
#define MPG123_SAMPLESIZE(enc) ( \
(enc) & MPG123_ENC_8 \
? 1 \
: ( (enc) & MPG123_ENC_16 \
? 2 \
: ( (enc) & MPG123_ENC_24 \
? 3 \
: ( ( (enc) & MPG123_ENC_32 \
|| (enc) == MPG123_ENC_FLOAT_32 ) \
? 4 \
: ( (enc) == MPG123_ENC_FLOAT_64 \
? 8 \
: 0 \
) ) ) ) )
/** Structure defining an audio format.
* Providing the members as individual function arguments to define a certain
* output format is easy enough. This struct makes is more comfortable to deal
* with a list of formats.
* Negative values for the members might be used to communicate use of default
* values.
*/
struct mpg123_fmt
{
long rate; /**< sampling rate in Hz */
int channels; /**< channel count */
/** encoding code, can be single value or bitwise or of members of
* mpg123_enc_enum */
int encoding;
};
/* @} */
#endif

File diff suppressed because it is too large Load Diff

View File

@ -1,68 +1,138 @@
LIBRARY libmpg123-0.dll
EXPORTS
mpg123_init
mpg123_exit
mpg123_new
mpg123_delete
mpg123_plain_strerror
mpg123_strerror
mpg123_errcode
mpg123_decoders
mpg123_supported_decoders
mpg123_decoder
mpg123_rates
mpg123_encodings
mpg123_format_none
mpg123_format_all
mpg123_format
mpg123_format_support
mpg123_getformat
mpg123_open
mpg123_open_feed
mpg123_open_fd
mpg123_add_string
mpg123_add_substring
mpg123_chomp_string
mpg123_clip
mpg123_close
mpg123_replace_reader
mpg123_tell
mpg123_tellframe
mpg123_position
mpg123_read
mpg123_copy_string
mpg123_current_decoder
mpg123_decode
mpg123_decode_frame
mpg123_seek
mpg123_feedseek
mpg123_seek_frame
mpg123_timeframe
mpg123_index
mpg123_decode_frame_32
mpg123_decode_frame_64
mpg123_decoder
mpg123_decoders
mpg123_delete
mpg123_delete_pars
mpg123_enc_from_id3
mpg123_encodings
mpg123_encsize
mpg123_eq
mpg123_errcode
mpg123_exit
mpg123_feature
mpg123_feed
mpg123_feedseek
mpg123_feedseek_32
mpg123_feedseek_64
mpg123_fmt
mpg123_fmt_all
mpg123_fmt_none
mpg123_fmt_support
mpg123_format
mpg123_format_all
mpg123_format_none
mpg123_format_support
mpg123_framebyframe_decode
mpg123_framebyframe_decode_32
mpg123_framebyframe_decode_64
mpg123_framebyframe_next
mpg123_framedata
mpg123_framelength
mpg123_framelength_32
mpg123_framelength_64
mpg123_framepos
mpg123_framepos_32
mpg123_framepos_64
mpg123_free_string
mpg123_geteq
mpg123_getformat
mpg123_getformat2
mpg123_getpar
mpg123_getparam
mpg123_getstate
mpg123_getvolume
mpg123_grow_string
mpg123_icy
mpg123_icy2utf8
mpg123_id3
mpg123_index
mpg123_index_32
mpg123_index_64
mpg123_info
mpg123_init
mpg123_init_string
mpg123_length
mpg123_length_32
mpg123_length_64
mpg123_meta_check
mpg123_meta_free
mpg123_new
mpg123_new_pars
mpg123_noise
mpg123_open
mpg123_open_32
mpg123_open_64
mpg123_open_fd
mpg123_open_fd_32
mpg123_open_fd_64
mpg123_open_feed
mpg123_open_handle
mpg123_open_handle_32
mpg123_open_handle_64
mpg123_outblock
mpg123_par
mpg123_param
mpg123_parnew
mpg123_plain_strerror
mpg123_position
mpg123_position_32
mpg123_position_64
mpg123_rates
mpg123_read
mpg123_replace_buffer
mpg123_replace_reader
mpg123_replace_reader_32
mpg123_replace_reader_64
mpg123_replace_reader_handle
mpg123_replace_reader_handle_32
mpg123_replace_reader_handle_64
mpg123_reset_eq
mpg123_resize_string
mpg123_safe_buffer
mpg123_scan
mpg123_seek
mpg123_seek_32
mpg123_seek_64
mpg123_seek_frame
mpg123_seek_frame_32
mpg123_seek_frame_64
mpg123_set_filesize
mpg123_set_filesize_32
mpg123_set_filesize_64
mpg123_set_index
mpg123_set_index_32
mpg123_set_index_64
mpg123_set_string
mpg123_set_substring
mpg123_spf
mpg123_store_utf8
mpg123_strerror
mpg123_strlen
mpg123_supported_decoders
mpg123_tell
mpg123_tell_32
mpg123_tell_64
mpg123_tell_stream
mpg123_tell_stream_32
mpg123_tell_stream_64
mpg123_tellframe
mpg123_tellframe_32
mpg123_tellframe_64
mpg123_timeframe
mpg123_timeframe_32
mpg123_timeframe_64
mpg123_tpf
mpg123_volume
mpg123_volume_change
mpg123_getvolume
mpg123_info
mpg123_safe_buffer
mpg123_outblock
mpg123_replace_buffer
mpg123_scan
mpg123_length
mpg123_tpf
mpg123_clip
mpg123_init_string
mpg123_free_string
mpg123_resize_string
mpg123_copy_string
mpg123_add_string
mpg123_set_string
mpg123_meta_check
mpg123_id3
mpg123_icy
mpg123_parnew
mpg123_new_pars
mpg123_delete_pars
mpg123_param
mpg123_getparam
mpg123_fmt_none
mpg123_fmt_all
mpg123_fmt
mpg123_fmt_support
mpg123_par
mpg123_getpar

Binary file not shown.

View File

@ -0,0 +1,17 @@
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQIcBAABCAAGBQJaJGfyAAoJEI1smEefSt5x8QkQAIrqqYa4sZNV9QDSKTUKYtte
3xCb7feSwbChvdJJPMeFvm2EP9nu+KNQL6aVALSnR6dgc06r2inB1ZEorjWgz6J5
5F8zK26KD7DkB5+BTXgdN3kx1/Jln0xwbLUnjXGtbLL53cS4mZRtVuWVLJglmiiZ
rzaEofE4j6u5kWCei87CCr4VZ2QDJ1gYObmSLTjRvS5yjyzbj4gRCJjnFWru4bns
B2fpe0IYNKZ/QmT3Xm2Ve2d6WWCW/kyx9A7frHXJeo8d6atQQzwhbcsa9GpSfQvc
AuMls+EYBxQLnvQT/FFsZ7cTIXg+RdhnymkTqg8lsD/dULLB5a7/sHFAikRjgQ7I
j/pZsEwjnxqCAGPViOotJmpl0Xoh0gc9mg04fBkSD4zL2ntg6RI+Ty9gweBdtrCp
iB50MLvDlm5T71ikd/0v6dC9d4KsHBVfEPvd7/KAArTBgQJVBziM06uK6Z3tS5lg
LhBnkI6V+hJQfZLG0vsfqoUkfS7+L9wtAgHDBcrW7x1nDW4Nf/O7fYkzFx1WbM47
c8iz4mRLYQuC9V7woFzxsDvTVQ1gUI+iTDNfIez/pnpAt1lT0CugvEaeMLUV6TMi
LiLvVeputMOeskSEHTtRp3EPaqWimvHNj4WagzmVbZ/tYkhHOxZ8xtx3nOjUdzx/
RxTnyY4ZMmFQTKWiM2gB
=NM/p
-----END PGP SIGNATURE-----