Skip to content

Commit

Permalink
Updated Windows build with new external libraries
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Oct 13, 2017
1 parent 31ee90d commit 65dd37e
Show file tree
Hide file tree
Showing 29 changed files with 185 additions and 117 deletions.
7 changes: 4 additions & 3 deletions VisualC/external/include/FLAC/all.h
@@ -1,5 +1,6 @@
/* libFLAC - Free Lossless Audio Codec library
* Copyright (C) 2000,2001,2002,2003,2004,2005,2006,2007 Josh Coalson
* Copyright (C) 2000-2009 Josh Coalson
* Copyright (C) 2011-2016 Xiph.Org Foundation
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -161,7 +162,7 @@
* in FLAC 1.1.3 is a set of \c #defines in \c export.h of each
* library's includes (e.g. \c include/FLAC/export.h). The
* \c #defines mirror the libraries'
* <A HREF="http://www.gnu.org/software/libtool/manual.html#Libtool-versioning">libtool version numbers</A>,
* <A HREF="http://www.gnu.org/software/libtool/manual/libtool.html#Libtool-versioning">libtool version numbers</A>,
* e.g. in libFLAC there are \c FLAC_API_VERSION_CURRENT,
* \c FLAC_API_VERSION_REVISION, and \c FLAC_API_VERSION_AGE.
* These can be used to support multiple versions of an API during the
Expand All @@ -175,7 +176,7 @@
* #endif
* \endcode
*
* The the source will work for multiple versions and the legacy code can
* The source will work for multiple versions and the legacy code can
* easily be removed when the transition is complete.
*
* Another available symbol is FLAC_API_SUPPORTS_OGG_FLAC (defined in
Expand Down
3 changes: 2 additions & 1 deletion VisualC/external/include/FLAC/assert.h
@@ -1,5 +1,6 @@
/* libFLAC - Free Lossless Audio Codec library
* Copyright (C) 2001,2002,2003,2004,2005,2006,2007 Josh Coalson
* Copyright (C) 2001-2009 Josh Coalson
* Copyright (C) 2011-2016 Xiph.Org Foundation
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
Expand Down
3 changes: 2 additions & 1 deletion VisualC/external/include/FLAC/callback.h
@@ -1,5 +1,6 @@
/* libFLAC - Free Lossless Audio Codec library
* Copyright (C) 2004,2005,2006,2007 Josh Coalson
* Copyright (C) 2004-2009 Josh Coalson
* Copyright (C) 2011-2016 Xiph.Org Foundation
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
Expand Down
24 changes: 15 additions & 9 deletions VisualC/external/include/FLAC/export.h
@@ -1,5 +1,6 @@
/* libFLAC - Free Lossless Audio Codec library
* Copyright (C) 2000,2001,2002,2003,2004,2005,2006,2007 Josh Coalson
* Copyright (C) 2000-2009 Josh Coalson
* Copyright (C) 2011-2016 Xiph.Org Foundation
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -55,25 +56,30 @@
* \{
*/

#if defined(FLAC__NO_DLL) || !defined(_MSC_VER)
#if defined(FLAC__NO_DLL)
#define FLAC_API

#elif defined(_MSC_VER)
#ifdef FLAC_API_EXPORTS
#define FLAC_API __declspec(dllexport)
#else
#define FLAC_API __declspec(dllimport)
#endif

#elif defined(FLAC__USE_VISIBILITY_ATTR)
#define FLAC_API __attribute__ ((visibility ("default")))

#ifdef FLAC_API_EXPORTS
#define FLAC_API _declspec(dllexport)
#else
#define FLAC_API _declspec(dllimport)
#define FLAC_API

#endif
#endif

/** These #defines will mirror the libtool-based library version number, see
* http://www.gnu.org/software/libtool/manual.html#Libtool-versioning
* http://www.gnu.org/software/libtool/manual/libtool.html#Libtool-versioning
*/
#define FLAC_API_VERSION_CURRENT 10
#define FLAC_API_VERSION_CURRENT 11
#define FLAC_API_VERSION_REVISION 0 /**< see above */
#define FLAC_API_VERSION_AGE 2 /**< see above */
#define FLAC_API_VERSION_AGE 3 /**< see above */

#ifdef __cplusplus
extern "C" {
Expand Down
19 changes: 17 additions & 2 deletions VisualC/external/include/FLAC/format.h
@@ -1,5 +1,6 @@
/* libFLAC - Free Lossless Audio Codec library
* Copyright (C) 2000,2001,2002,2003,2004,2005,2006,2007 Josh Coalson
* Copyright (C) 2000-2009 Josh Coalson
* Copyright (C) 2011-2016 Xiph.Org Foundation
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -508,9 +509,11 @@ typedef enum {
FLAC__METADATA_TYPE_PICTURE = 6,
/**< <A HREF="../format.html#metadata_block_picture">PICTURE</A> block */

FLAC__METADATA_TYPE_UNDEFINED = 7
FLAC__METADATA_TYPE_UNDEFINED = 7,
/**< marker to denote beginning of undefined type range; this number will increase as new metadata types are added */

FLAC__MAX_METADATA_TYPE = FLAC__MAX_METADATA_TYPE_CODE,
/**< No type will ever be greater than this. There is not enough room in the protocol block. */
} FLAC__MetadataType;

/** Maps a FLAC__MetadataType to a C string.
Expand Down Expand Up @@ -879,6 +882,18 @@ extern FLAC_API const unsigned FLAC__STREAM_METADATA_LENGTH_LEN; /**< == 24 (bit
*/
FLAC_API FLAC__bool FLAC__format_sample_rate_is_valid(unsigned sample_rate);

/** Tests that a blocksize at the given sample rate is valid for the FLAC
* subset.
*
* \param blocksize The blocksize to test for compliance.
* \param sample_rate The sample rate is needed, since the valid subset
* blocksize depends on the sample rate.
* \retval FLAC__bool
* \c true if the given blocksize conforms to the specification for the
* subset at the given sample rate, else \c false.
*/
FLAC_API FLAC__bool FLAC__format_blocksize_is_subset(unsigned blocksize, unsigned sample_rate);

/** Tests that a sample rate is valid for the FLAC subset. The subset rules
* for valid sample rates are slightly more complex since the rate has to
* be expressible completely in the frame header.
Expand Down
13 changes: 7 additions & 6 deletions VisualC/external/include/FLAC/metadata.h
@@ -1,5 +1,6 @@
/* libFLAC - Free Lossless Audio Codec library
* Copyright (C) 2001,2002,2003,2004,2005,2006,2007 Josh Coalson
* Copyright (C) 2001-2009 Josh Coalson
* Copyright (C) 2011-2016 Xiph.Org Foundation
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -499,7 +500,7 @@ FLAC_API FLAC__MetadataType FLAC__metadata_simple_iterator_get_block_type(const
* \retval unsigned
* The length of the metadata block at the current iterator position.
* The is same length as that in the
* <a href="http://flac.sourceforge.net/format.html#metadata_block_header">metadata block header</a>,
* <a href="http://xiph.org/flac/format.html#metadata_block_header">metadata block header</a>,
* i.e. the length of the metadata body that follows the header.
*/
FLAC_API unsigned FLAC__metadata_simple_iterator_get_block_length(const FLAC__Metadata_SimpleIterator *iterator);
Expand Down Expand Up @@ -666,7 +667,7 @@ FLAC_API FLAC__bool FLAC__metadata_simple_iterator_delete_block(FLAC__Metadata_S
*
* - Create a new chain using FLAC__metadata_chain_new(). A chain is a
* linked list of FLAC metadata blocks.
* - Read all metadata into the the chain from a FLAC file using
* - Read all metadata into the chain from a FLAC file using
* FLAC__metadata_chain_read() or FLAC__metadata_chain_read_ogg() and
* check the status.
* - Optionally, consolidate the padding using
Expand Down Expand Up @@ -763,7 +764,7 @@ typedef enum {
FLAC__METADATA_CHAIN_STATUS_READ_WRITE_MISMATCH,
/**< FLAC__metadata_chain_write() was called on a chain read by
* FLAC__metadata_chain_read_with_callbacks()/FLAC__metadata_chain_read_ogg_with_callbacks(),
* or
* or
* FLAC__metadata_chain_write_with_callbacks()/FLAC__metadata_chain_write_with_callbacks_and_tempfile()
* was called on a chain read by
* FLAC__metadata_chain_read()/FLAC__metadata_chain_read_ogg().
Expand Down Expand Up @@ -1691,7 +1692,7 @@ FLAC_API FLAC__bool FLAC__metadata_object_vorbiscomment_append_comment(FLAC__Str
* For convenience, a trailing NUL is added to the entry if it doesn't have
* one already.
*
* Depending on the the value of \a all, either all or just the first comment
* Depending on the value of \a all, either all or just the first comment
* whose field name(s) match the given entry's name will be replaced by the
* given entry. If no comments match, \a entry will simply be appended.
*
Expand Down Expand Up @@ -1986,7 +1987,7 @@ FLAC_API FLAC__bool FLAC__metadata_object_cuesheet_resize_tracks(FLAC__StreamMet
* \code object->type == FLAC__METADATA_TYPE_CUESHEET \endcode
* \code track_num < object->data.cue_sheet.num_tracks \endcode
* \code (track->indices != NULL && track->num_indices > 0) ||
* (track->indices == NULL && track->num_indices == 0)
* (track->indices == NULL && track->num_indices == 0) \endcode
* \retval FLAC__bool
* \c false if \a copy is \c true and malloc() fails, else \c true.
*/
Expand Down
34 changes: 20 additions & 14 deletions VisualC/external/include/FLAC/ordinals.h
@@ -1,5 +1,6 @@
/* libFLAC - Free Lossless Audio Codec library
* Copyright (C) 2000,2001,2002,2003,2004,2005,2006,2007 Josh Coalson
* Copyright (C) 2000-2009 Josh Coalson
* Copyright (C) 2011-2016 Xiph.Org Foundation
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -32,40 +33,45 @@
#ifndef FLAC__ORDINALS_H
#define FLAC__ORDINALS_H

#if !(defined(_MSC_VER) || defined(__BORLANDC__) || defined(__EMX__))
#include <inttypes.h>
#endif
#if defined(_MSC_VER) && _MSC_VER < 1600

/* Microsoft Visual Studio earlier than the 2010 version did not provide
* the 1999 ISO C Standard header file <stdint.h>.
*/

typedef signed char FLAC__int8;
typedef unsigned char FLAC__uint8;
typedef __int8 FLAC__int8;
typedef unsigned __int8 FLAC__uint8;

#if defined(_MSC_VER) || defined(__BORLANDC__)
typedef __int16 FLAC__int16;
typedef __int32 FLAC__int32;
typedef __int64 FLAC__int64;
typedef unsigned __int16 FLAC__uint16;
typedef unsigned __int32 FLAC__uint32;
typedef unsigned __int64 FLAC__uint64;
#elif defined(__EMX__)
typedef short FLAC__int16;
typedef long FLAC__int32;
typedef long long FLAC__int64;
typedef unsigned short FLAC__uint16;
typedef unsigned long FLAC__uint32;
typedef unsigned long long FLAC__uint64;

#else

/* For MSVC 2010 and everything else which provides <stdint.h>. */

#include <stdint.h>

typedef int8_t FLAC__int8;
typedef uint8_t FLAC__uint8;

typedef int16_t FLAC__int16;
typedef int32_t FLAC__int32;
typedef int64_t FLAC__int64;
typedef uint16_t FLAC__uint16;
typedef uint32_t FLAC__uint32;
typedef uint64_t FLAC__uint64;

#endif

typedef int FLAC__bool;

typedef FLAC__uint8 FLAC__byte;


#ifdef true
#undef true
#endif
Expand Down
5 changes: 3 additions & 2 deletions VisualC/external/include/FLAC/stream_decoder.h
@@ -1,5 +1,6 @@
/* libFLAC - Free Lossless Audio Codec library
* Copyright (C) 2000,2001,2002,2003,2004,2005,2006,2007 Josh Coalson
* Copyright (C) 2000-2009 Josh Coalson
* Copyright (C) 2011-2016 Xiph.Org Foundation
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -227,7 +228,7 @@ typedef enum {
*/

FLAC__STREAM_DECODER_ABORTED,
/**< The decoder was aborted by the read callback. */
/**< The decoder was aborted by the read or write callback. */

FLAC__STREAM_DECODER_MEMORY_ALLOCATION_ERROR,
/**< An error occurred allocating memory. The decoder is in an invalid
Expand Down
72 changes: 47 additions & 25 deletions VisualC/external/include/FLAC/stream_encoder.h
@@ -1,5 +1,6 @@
/* libFLAC - Free Lossless Audio Codec library
* Copyright (C) 2000,2001,2002,2003,2004,2005,2006,2007 Josh Coalson
* Copyright (C) 2000-2009 Josh Coalson
* Copyright (C) 2011-2016 Xiph.Org Foundation
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -128,7 +129,7 @@ extern "C" {
* Unlike the decoders, the stream encoder has many options that can
* affect the speed and compression ratio. When setting these parameters
* you should have some basic knowledge of the format (see the
* <A HREF="../documentation.html#format">user-level documentation</A>
* <A HREF="../documentation_format_overview.html">user-level documentation</A>
* or the <A HREF="../format.html">formal description</A>). The
* FLAC__stream_encoder_set_*() functions themselves do not validate the
* values as many are interdependent. The FLAC__stream_encoder_init_*()
Expand Down Expand Up @@ -829,28 +830,28 @@ FLAC_API FLAC__bool FLAC__stream_encoder_set_sample_rate(FLAC__StreamEncoder *en
* The actual values set for each level are:
* <table>
* <tr>
* <td><b>level</b><td>
* <td>do mid-side stereo<td>
* <td>loose mid-side stereo<td>
* <td>apodization<td>
* <td>max lpc order<td>
* <td>qlp coeff precision<td>
* <td>qlp coeff prec search<td>
* <td>escape coding<td>
* <td>exhaustive model search<td>
* <td>min residual partition order<td>
* <td>max residual partition order<td>
* <td>rice parameter search dist<td>
* <td><b>level</b></td>
* <td>do mid-side stereo</td>
* <td>loose mid-side stereo</td>
* <td>apodization</td>
* <td>max lpc order</td>
* <td>qlp coeff precision</td>
* <td>qlp coeff prec search</td>
* <td>escape coding</td>
* <td>exhaustive model search</td>
* <td>min residual partition order</td>
* <td>max residual partition order</td>
* <td>rice parameter search dist</td>
* </tr>
* <tr> <td><b>0</b><td> <td>false<td> <td>false<td> <td>tukey(0.5)<td> <td>0<td> <td>0<td> <td>false<td> <td>false<td> <td>false<td> <td>0<td> <td>3<td> <td>0<td> </tr>
* <tr> <td><b>1</b><td> <td>true<td> <td>true<td> <td>tukey(0.5)<td> <td>0<td> <td>0<td> <td>false<td> <td>false<td> <td>false<td> <td>0<td> <td>3<td> <td>0<td> </tr>
* <tr> <td><b>2</b><td> <td>true<td> <td>false<td> <td>tukey(0.5)<td> <td>0<td> <td>0<td> <td>false<td> <td>false<td> <td>false<td> <td>0<td> <td>3<td> <td>0<td> </tr>
* <tr> <td><b>3</b><td> <td>false<td> <td>false<td> <td>tukey(0.5)<td> <td>6<td> <td>0<td> <td>false<td> <td>false<td> <td>false<td> <td>0<td> <td>4<td> <td>0<td> </tr>
* <tr> <td><b>4</b><td> <td>true<td> <td>true<td> <td>tukey(0.5)<td> <td>8<td> <td>0<td> <td>false<td> <td>false<td> <td>false<td> <td>0<td> <td>4<td> <td>0<td> </tr>
* <tr> <td><b>5</b><td> <td>true<td> <td>false<td> <td>tukey(0.5)<td> <td>8<td> <td>0<td> <td>false<td> <td>false<td> <td>false<td> <td>0<td> <td>5<td> <td>0<td> </tr>
* <tr> <td><b>6</b><td> <td>true<td> <td>false<td> <td>tukey(0.5)<td> <td>8<td> <td>0<td> <td>false<td> <td>false<td> <td>false<td> <td>0<td> <td>6<td> <td>0<td> </tr>
* <tr> <td><b>7</b><td> <td>true<td> <td>false<td> <td>tukey(0.5)<td> <td>8<td> <td>0<td> <td>false<td> <td>false<td> <td>true<td> <td>0<td> <td>6<td> <td>0<td> </tr>
* <tr> <td><b>8</b><td> <td>true<td> <td>false<td> <td>tukey(0.5)<td> <td>12<td> <td>0<td> <td>false<td> <td>false<td> <td>true<td> <td>0<td> <td>6<td> <td>0<td> </tr>
* <tr> <td><b>0</b></td> <td>false</td> <td>false</td> <td>tukey(0.5)<td> <td>0</td> <td>0</td> <td>false</td> <td>false</td> <td>false</td> <td>0</td> <td>3</td> <td>0</td> </tr>
* <tr> <td><b>1</b></td> <td>true</td> <td>true</td> <td>tukey(0.5)<td> <td>0</td> <td>0</td> <td>false</td> <td>false</td> <td>false</td> <td>0</td> <td>3</td> <td>0</td> </tr>
* <tr> <td><b>2</b></td> <td>true</td> <td>false</td> <td>tukey(0.5)<td> <td>0</td> <td>0</td> <td>false</td> <td>false</td> <td>false</td> <td>0</td> <td>3</td> <td>0</td> </tr>
* <tr> <td><b>3</b></td> <td>false</td> <td>false</td> <td>tukey(0.5)<td> <td>6</td> <td>0</td> <td>false</td> <td>false</td> <td>false</td> <td>0</td> <td>4</td> <td>0</td> </tr>
* <tr> <td><b>4</b></td> <td>true</td> <td>true</td> <td>tukey(0.5)<td> <td>8</td> <td>0</td> <td>false</td> <td>false</td> <td>false</td> <td>0</td> <td>4</td> <td>0</td> </tr>
* <tr> <td><b>5</b></td> <td>true</td> <td>false</td> <td>tukey(0.5)<td> <td>8</td> <td>0</td> <td>false</td> <td>false</td> <td>false</td> <td>0</td> <td>5</td> <td>0</td> </tr>
* <tr> <td><b>6</b></td> <td>true</td> <td>false</td> <td>tukey(0.5);partial_tukey(2)<td> <td>8</td> <td>0</td> <td>false</td> <td>false</td> <td>false</td> <td>0</td> <td>6</td> <td>0</td> </tr>
* <tr> <td><b>7</b></td> <td>true</td> <td>false</td> <td>tukey(0.5);partial_tukey(2)<td> <td>12</td> <td>0</td> <td>false</td> <td>false</td> <td>false</td> <td>0</td> <td>6</td> <td>0</td> </tr>
* <tr> <td><b>8</b></td> <td>true</td> <td>false</td> <td>tukey(0.5);partial_tukey(2);punchout_tukey(3)</td> <td>12</td> <td>0</td> <td>false</td> <td>false</td> <td>false</td> <td>0</td> <td>6</td> <td>0</td> </tr>
* </table>
*
* \default \c 5
Expand Down Expand Up @@ -919,7 +920,8 @@ FLAC_API FLAC__bool FLAC__stream_encoder_set_loose_mid_side_stereo(FLAC__StreamE
* The available functions are \c bartlett, \c bartlett_hann,
* \c blackman, \c blackman_harris_4term_92db, \c connes, \c flattop,
* \c gauss(STDDEV), \c hamming, \c hann, \c kaiser_bessel, \c nuttall,
* \c rectangle, \c triangle, \c tukey(P), \c welch.
* \c rectangle, \c triangle, \c tukey(P), \c partial_tukey(n[/ov[/P]]),
* \c punchout_tukey(n[/ov[/P]]), \c welch.
*
* For \c gauss(STDDEV), STDDEV specifies the standard deviation
* (0<STDDEV<=0.5).
Expand All @@ -928,6 +930,24 @@ FLAC_API FLAC__bool FLAC__stream_encoder_set_loose_mid_side_stereo(FLAC__StreamE
* tapered (0<=P<=1). P=0 corresponds to \c rectangle and P=1
* corresponds to \c hann.
*
* Specifying \c partial_tukey or \c punchout_tukey works a little
* different. These do not specify a single apodization function, but
* a series of them with some overlap. partial_tukey specifies a series
* of small windows (all treated separately) while punchout_tukey
* specifies a series of windows that have a hole in them. In this way,
* the predictor is constructed with only a part of the block, which
* helps in case a block consists of dissimilar parts.
*
* The three parameters that can be specified for the functions are
* n, ov and P. n is the number of functions to add, ov is the overlap
* of the windows in case of partial_tukey and the overlap in the gaps
* in case of punchout_tukey. P is the fraction of the window that is
* tapered, like with a regular tukey window. The function can be
* specified with only a number, a number and an overlap, or a number
* an overlap and a P, for example, partial_tukey(3), partial_tukey(3/0.3)
* and partial_tukey(3/0.3/0.5) are all valid. ov should be smaller than 1
* and can be negative.
*
* Example specifications are \c "blackman" or
* \c "hann;triangle;tukey(0.5);tukey(0.25);tukey(0.125)"
*
Expand All @@ -940,7 +960,9 @@ FLAC_API FLAC__bool FLAC__stream_encoder_set_loose_mid_side_stereo(FLAC__StreamE
* results in the smallest compressed subframe.
*
* Note that each function specified causes the encoder to occupy a
* floating point array in which to store the window.
* floating point array in which to store the window. Also note that the
* values of P, STDDEV and ov are locale-specific, so if the comma
* separator specified by the locale is a comma, a comma should be used.
*
* \default \c "tukey(0.5)"
* \param encoder An encoder instance to set.
Expand Down

0 comments on commit 65dd37e

Please sign in to comment.