mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-15 15:49:36 +02:00
Adjust Windows build for new libsndfile version
This commit is contained in:
parent
7256696047
commit
24b6031a84
@ -1,34 +1,11 @@
|
||||
/*
|
||||
** This file was autogenerated on Linux and then modified to support
|
||||
** Windows.
|
||||
*/
|
||||
/* src/config.h. Generated from config.h.in by configure. */
|
||||
/* src/config.h.in. Generated from configure.ac by autoheader. */
|
||||
|
||||
/* The following was added to provide the necessary support on Windows */
|
||||
#if defined(LIBSNDFILE_PRIVATE_CONFIG) && !defined(LIBSNDFILE_HAVE_CONFIG)
|
||||
#define LIBSNDFILE_HAVE_CONFIG 1
|
||||
#pragma warning (disable : 4244)
|
||||
#pragma warning (disable : 4761)
|
||||
|
||||
#define ssize_t SSIZE_T
|
||||
#define __func__ __FUNCTION__
|
||||
|
||||
#if _MSC_VER < 1900
|
||||
/* Nor does it have the snprintf function */
|
||||
#define snprintf _snprintf
|
||||
#endif
|
||||
|
||||
/* The above was added to provide the necessary support on Windows */
|
||||
|
||||
/* Set to 1 if the compile is GNU GCC. */
|
||||
/* #undef COMPILER_IS_GCC */
|
||||
#define COMPILER_IS_GCC 0
|
||||
|
||||
/* Target processor clips on negative float to int conversion. */
|
||||
#define CPU_CLIPS_NEGATIVE 1
|
||||
|
||||
/* Target processor clips on positive float to int conversion. */
|
||||
#define CPU_CLIPS_POSITIVE 0
|
||||
#define CPU_CLIPS_POSITIVE 1
|
||||
|
||||
/* Target processor is big endian. */
|
||||
#define CPU_IS_BIG_ENDIAN 0
|
||||
@ -40,127 +17,133 @@
|
||||
#define ENABLE_EXPERIMENTAL_CODE 0
|
||||
|
||||
/* Define to 1 if you have the <alsa/asoundlib.h> header file. */
|
||||
/* #undef HAVE_ALSA_ASOUNDLIB_H */
|
||||
#define HAVE_ALSA_ASOUNDLIB_H 0
|
||||
|
||||
/* Define to 1 if you have the <byteswap.h> header file. */
|
||||
/* #undef HAVE_BYTESWAP_H */
|
||||
#define HAVE_BYTESWAP_H 0
|
||||
|
||||
/* Define to 1 if you have the `calloc' function. */
|
||||
#define HAVE_CALLOC 1
|
||||
#define HAVE_CALLOC 0
|
||||
|
||||
/* Define to 1 if you have the `ceil' function. */
|
||||
#define HAVE_CEIL 1
|
||||
#define HAVE_CEIL 0
|
||||
|
||||
/* Set to 1 if S_IRGRP is defined. */
|
||||
#define HAVE_DECL_S_IRGRP 0
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
/* #undef HAVE_DLFCN_H */
|
||||
#define HAVE_DLFCN_H 0
|
||||
|
||||
/* Define to 1 if you have the <direct.h> header file. */
|
||||
/* #undef HAVE_DIRECT_H */
|
||||
|
||||
/* Define to 1 if you have the <endian.h> header file. */
|
||||
/* #undef HAVE_ENDIAN_H */
|
||||
#define HAVE_ENDIAN_H 0
|
||||
|
||||
/* Will be set to 1 if flac, ogg and vorbis are available. */
|
||||
/* #undef HAVE_EXTERNAL_LIBS */
|
||||
|
||||
/* Set to 1 if the compile supports the struct hack. */
|
||||
#define HAVE_FLEXIBLE_ARRAY 1
|
||||
#define HAVE_EXTERNAL_XIPH_LIBS 0
|
||||
|
||||
/* Define to 1 if you have the `floor' function. */
|
||||
#define HAVE_FLOOR 1
|
||||
#define HAVE_FLOOR 0
|
||||
|
||||
/* Define to 1 if you have the `fmod' function. */
|
||||
#define HAVE_FMOD 1
|
||||
#define HAVE_FMOD 0
|
||||
|
||||
/* Define to 1 if you have the `free' function. */
|
||||
#define HAVE_FREE 1
|
||||
#define HAVE_FREE 0
|
||||
|
||||
/* Define to 1 if you have the `fstat' function. */
|
||||
#define HAVE_FSTAT 1
|
||||
#define HAVE_FSTAT 0
|
||||
|
||||
/* Define to 1 if you have the `fstat64' function. */
|
||||
#define HAVE_FSTAT64 0
|
||||
|
||||
/* Define to 1 if you have the `fsync' function. */
|
||||
/* #undef HAVE_FSYNC */
|
||||
#define HAVE_FSYNC 0
|
||||
|
||||
/* Define to 1 if you have the `ftruncate' function. */
|
||||
/* #undef HAVE_FTRUNCATE */
|
||||
#define HAVE_FTRUNCATE 0
|
||||
|
||||
/* Define to 1 if you have the `getpagesize' function. */
|
||||
#define HAVE_GETPAGESIZE 1
|
||||
#define HAVE_GETPAGESIZE 0
|
||||
|
||||
/* Define to 1 if you have the `gettimeofday' function. */
|
||||
/* #undef HAVE_GETTIMEOFDAY */
|
||||
#define HAVE_GETTIMEOFDAY 0
|
||||
|
||||
/* Define to 1 if you have the `gmtime' function. */
|
||||
#define HAVE_GMTIME 1
|
||||
/* Define if you have the `gmtime' function. */
|
||||
#define HAVE_GMTIME
|
||||
|
||||
/* Define to 1 if you have the `gmtime_r' function. */
|
||||
/* Define if you have the `gmtime_r' function. */
|
||||
/* #undef HAVE_GMTIME_R */
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
/* #undef HAVE_INTTYPES_H */
|
||||
#define HAVE_INTTYPES_H 1
|
||||
|
||||
/* Define to 1 if you have the <io.h> header file. */
|
||||
/* #undef HAVE_IO_H */
|
||||
|
||||
/* Define to 1 if you have the `m' library (-lm). */
|
||||
/* #undef HAVE_LIBM */
|
||||
#define HAVE_LIBM 0
|
||||
|
||||
/* Define to 1 if you have the <locale.h> header file. */
|
||||
/* #undef HAVE_LOCALE_H */
|
||||
#define HAVE_LOCALE_H 0
|
||||
|
||||
/* Define to 1 if you have the `localtime' function. */
|
||||
#define HAVE_LOCALTIME 1
|
||||
/* Define if you have the `localtime' function. */
|
||||
/* #undef HAVE_LOCALTIME */
|
||||
|
||||
/* Define to 1 if you have the `localtime_r' function. */
|
||||
/* Define if you have the `localtime_r' function. */
|
||||
/* #undef HAVE_LOCALTIME_R */
|
||||
|
||||
/* Define if you have C99's lrint function. */
|
||||
/* #undef HAVE_LRINT */
|
||||
#define HAVE_LRINT 1
|
||||
|
||||
/* Define if you have C99's lrintf function. */
|
||||
/* #undef HAVE_LRINTF */
|
||||
#define HAVE_LRINTF 1
|
||||
|
||||
/* Define to 1 if you have the `lround' function. */
|
||||
#define HAVE_LROUND 1
|
||||
|
||||
/* Define to 1 if you have the `lseek' function. */
|
||||
#define HAVE_LSEEK 1
|
||||
#define HAVE_LSEEK 0
|
||||
|
||||
/* Define to 1 if you have the `lseek64' function. */
|
||||
#define HAVE_LSEEK64 0
|
||||
|
||||
/* Define to 1 if you have the `malloc' function. */
|
||||
#define HAVE_MALLOC 1
|
||||
#define HAVE_MALLOC 0
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#define HAVE_MEMORY_H 1
|
||||
|
||||
/* Define to 1 if you have the `mmap' function. */
|
||||
/* #undef HAVE_MMAP */
|
||||
#define HAVE_MMAP 0
|
||||
|
||||
/* Define to 1 if you have the `open' function. */
|
||||
#define HAVE_OPEN 1
|
||||
#define HAVE_OPEN 0
|
||||
|
||||
/* Define to 1 if you have the `pipe' function. */
|
||||
/* #undef HAVE_PIPE */
|
||||
|
||||
/* Define to 1 if you have the `pread' function. */
|
||||
/* #undef HAVE_PREAD */
|
||||
|
||||
/* Define to 1 if you have the `pwrite' function. */
|
||||
/* #undef HAVE_PWRITE */
|
||||
#define HAVE_PIPE 0
|
||||
|
||||
/* Define to 1 if you have the `read' function. */
|
||||
#define HAVE_READ 1
|
||||
#define HAVE_READ 0
|
||||
|
||||
/* Define to 1 if you have the `realloc' function. */
|
||||
#define HAVE_REALLOC 1
|
||||
#define HAVE_REALLOC 0
|
||||
|
||||
/* Define to 1 if you have the `setlocale' function. */
|
||||
/* #undef HAVE_SETLOCALE */
|
||||
#define HAVE_SETLOCALE 0
|
||||
|
||||
/* Define to 1 if you have the <sndio.h> header file. */
|
||||
/* #undef HAVE_SNDIO_H */
|
||||
/* Set to 1 if <sndio.h> is available. */
|
||||
#define HAVE_SNDIO_H 0
|
||||
|
||||
/* Define to 1 if you have the `snprintf' function. */
|
||||
#define HAVE_SNPRINTF 1
|
||||
#define HAVE_SNPRINTF 0
|
||||
|
||||
/* Set to 1 if you have libsqlite3. */
|
||||
/* #undef HAVE_SQLITE3 */
|
||||
#define HAVE_SQLITE3 0
|
||||
|
||||
/* Define to 1 if the system has the type `ssize_t'. */
|
||||
/* #undef HAVE_SSIZE_T */
|
||||
#define HAVE_SSIZE_T 0
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#define HAVE_STDINT_H 1
|
||||
@ -169,7 +152,7 @@
|
||||
#define HAVE_STDLIB_H 1
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#define HAVE_STRINGS_H 1
|
||||
#define HAVE_STRINGS_H 0
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#define HAVE_STRING_H 1
|
||||
@ -178,62 +161,58 @@
|
||||
#define HAVE_SYS_STAT_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/time.h> header file. */
|
||||
/* #undef HAVE_SYS_TIME_H */
|
||||
#define HAVE_SYS_TIME_H 0
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
|
||||
/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
|
||||
/* #undef HAVE_SYS_WAIT_H */
|
||||
#define HAVE_SYS_WAIT_H 0
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
/* #undef HAVE_UNISTD_H */
|
||||
#define HAVE_UNISTD_H 0
|
||||
|
||||
/* Define to 1 if you have the `vsnprintf' function. */
|
||||
#define HAVE_VSNPRINTF 1
|
||||
#define HAVE_VSNPRINTF 0
|
||||
|
||||
/* Define to 1 if you have the `waitpid' function. */
|
||||
/* #undef HAVE_WAITPID */
|
||||
#define HAVE_WAITPID 0
|
||||
|
||||
/* Define to 1 if you have the `write' function. */
|
||||
#define HAVE_WRITE 1
|
||||
#define HAVE_WRITE 0
|
||||
|
||||
/* Define to the sub-directory in which libtool stores uninstalled libraries.
|
||||
*/
|
||||
#define LT_OBJDIR ".libs/"
|
||||
/* The darwin version, no-zero is valid */
|
||||
#define OSX_DARWIN_VERSION 0
|
||||
|
||||
/* Define to 1 if your C compiler doesn't accept -c and -o together. */
|
||||
/* #undef NO_MINUS_C_MINUS_O */
|
||||
|
||||
/* Set to 1 if compiling for MacOSX */
|
||||
#define OS_IS_MACOSX 0
|
||||
/* Set to 1 if compiling for OpenBSD */
|
||||
#define OS_IS_OPENBSD 0
|
||||
|
||||
/* Set to 1 if compiling for Win32 */
|
||||
#define OS_IS_WIN32 1
|
||||
#define OS_IS_WIN32 0
|
||||
|
||||
/* Name of package */
|
||||
#define PACKAGE "libsndfile"
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#define PACKAGE_BUGREPORT "sndfile@mega-nerd.com"
|
||||
#define PACKAGE_BUGREPORT ""
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#define PACKAGE_NAME "libsndfile"
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#define PACKAGE_STRING "libsndfile 1.0.24"
|
||||
#define PACKAGE_STRING "libsndfile "
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#define PACKAGE_TARNAME "libsndfile"
|
||||
|
||||
/* Define to the home page for this package. */
|
||||
#define PACKAGE_URL "http://www.mega-nerd.com/libsndfile/"
|
||||
#define PACKAGE_URL ""
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#define PACKAGE_VERSION "1.0.24"
|
||||
#define PACKAGE_VERSION ""
|
||||
|
||||
/* Set to maximum allowed value of sf_count_t type. */
|
||||
#define SF_COUNT_MAX 0x7fffffffffffffffi64
|
||||
#define SF_COUNT_MAX 0x7FFFFFFFFFFFFFFFLL
|
||||
|
||||
/* The size of `double', as computed by sizeof. */
|
||||
#define SIZEOF_DOUBLE 8
|
||||
@ -245,10 +224,10 @@
|
||||
#define SIZEOF_INT 4
|
||||
|
||||
/* The size of `int64_t', as computed by sizeof. */
|
||||
#define SIZEOF_INT64_T 0
|
||||
|
||||
|
||||
/* The size of `loff_t', as computed by sizeof. */
|
||||
/* #undef SIZEOF_LOFF_T */
|
||||
|
||||
|
||||
/* The size of `long', as computed by sizeof. */
|
||||
#define SIZEOF_LONG 4
|
||||
@ -257,10 +236,10 @@
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
|
||||
/* The size of `off64_t', as computed by sizeof. */
|
||||
/* #undef SIZEOF_OFF64_T */
|
||||
|
||||
|
||||
/* The size of `off_t', as computed by sizeof. */
|
||||
#define SIZEOF_OFF_T 4
|
||||
|
||||
|
||||
/* Set to sizeof (long) if unknown. */
|
||||
#define SIZEOF_SF_COUNT_T 8
|
||||
@ -269,28 +248,50 @@
|
||||
#define SIZEOF_SHORT 2
|
||||
|
||||
/* The size of `size_t', as computed by sizeof. */
|
||||
#define SIZEOF_SIZE_T 4
|
||||
|
||||
|
||||
/* The size of `ssize_t', as computed by sizeof. */
|
||||
#define SIZEOF_SSIZE_T 4
|
||||
|
||||
|
||||
/* The size of `void*', as computed by sizeof. */
|
||||
#define SIZEOF_VOIDP 4
|
||||
|
||||
|
||||
/* The size of `wchar_t', as computed by sizeof. */
|
||||
#define SIZEOF_WCHAR_T 4
|
||||
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#define STDC_HEADERS 1
|
||||
|
||||
/* Set to long if unknown. */
|
||||
#define TYPEOF_SF_COUNT_T __int64
|
||||
#define TYPEOF_SF_COUNT_T int64_t
|
||||
|
||||
/* Enable extensions on AIX 3, Interix. */
|
||||
#ifndef _ALL_SOURCE
|
||||
# undef _ALL_SOURCE
|
||||
#endif
|
||||
/* Enable GNU extensions on systems that have them. */
|
||||
#ifndef _GNU_SOURCE
|
||||
# undef _GNU_SOURCE
|
||||
#endif
|
||||
/* Enable threading extensions on Solaris. */
|
||||
#ifndef _POSIX_PTHREAD_SEMANTICS
|
||||
# undef _POSIX_PTHREAD_SEMANTICS
|
||||
#endif
|
||||
/* Enable extensions on HP NonStop. */
|
||||
#ifndef _TANDEM_SOURCE
|
||||
# undef _TANDEM_SOURCE
|
||||
#endif
|
||||
/* Enable general extensions on Solaris. */
|
||||
#ifndef __EXTENSIONS__
|
||||
# undef __EXTENSIONS__
|
||||
#endif
|
||||
|
||||
|
||||
/* Set to 1 to use the native windows API */
|
||||
#define USE_WINDOWS_API 1
|
||||
|
||||
/* Version number of package */
|
||||
#define VERSION "1.0.24"
|
||||
#define VERSION ""
|
||||
|
||||
/* Set to 1 if windows DLL is being built. */
|
||||
#define WIN32_TARGET_DLL 0
|
||||
@ -298,15 +299,13 @@
|
||||
/* Target processor is big endian. */
|
||||
#define WORDS_BIGENDIAN 0
|
||||
|
||||
/* Number of bits in a file offset, on hosts where this is settable. */
|
||||
/* #undef _FILE_OFFSET_BITS */
|
||||
/* Enable large inode numbers on Mac OS X 10.5. */
|
||||
#ifndef _DARWIN_USE_64_BIT_INODE
|
||||
# define _DARWIN_USE_64_BIT_INODE 1
|
||||
#endif
|
||||
|
||||
/* Define to make fseeko etc. visible, on some hosts. */
|
||||
/* #undef _LARGEFILE_SOURCE */
|
||||
/* Define to 1 if on MINIX. */
|
||||
#define _MINIX 0
|
||||
|
||||
/* Define for large files, on AIX-style hosts. */
|
||||
/* #undef _LARGE_FILES */
|
||||
/* Define as `__inline' or '__inline__' if that's what the C compiler calls it, or to nothing if it is not supported. */
|
||||
|
||||
/* Set to 1 to use C99 printf/snprintf in MinGW. */
|
||||
/* #undef __USE_MINGW_ANSI_STDIO */
|
||||
#endif
|
35
win/Projects/libsndfile/libsndfile.vcxproj
Executable file → Normal file
35
win/Projects/libsndfile/libsndfile.vcxproj
Executable file → Normal file
@ -78,12 +78,23 @@
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\..\lib-src\libsndfile\src\aiff.c" />
|
||||
<ClCompile Include="..\..\..\lib-src\libsndfile\src\alac.c" />
|
||||
<ClCompile Include="..\..\..\lib-src\libsndfile\src\ALAC\ag_dec.c" />
|
||||
<ClCompile Include="..\..\..\lib-src\libsndfile\src\ALAC\ag_enc.c" />
|
||||
<ClCompile Include="..\..\..\lib-src\libsndfile\src\ALAC\ALACBitUtilities.c" />
|
||||
<ClCompile Include="..\..\..\lib-src\libsndfile\src\ALAC\alac_decoder.c" />
|
||||
<ClCompile Include="..\..\..\lib-src\libsndfile\src\ALAC\alac_encoder.c" />
|
||||
<ClCompile Include="..\..\..\lib-src\libsndfile\src\ALAC\dp_dec.c" />
|
||||
<ClCompile Include="..\..\..\lib-src\libsndfile\src\ALAC\dp_enc.c" />
|
||||
<ClCompile Include="..\..\..\lib-src\libsndfile\src\ALAC\matrix_dec.c" />
|
||||
<ClCompile Include="..\..\..\lib-src\libsndfile\src\ALAC\matrix_enc.c" />
|
||||
<ClCompile Include="..\..\..\lib-src\libsndfile\src\alaw.c" />
|
||||
<ClCompile Include="..\..\..\lib-src\libsndfile\src\au.c" />
|
||||
<ClCompile Include="..\..\..\lib-src\libsndfile\src\audio_detect.c" />
|
||||
<ClCompile Include="..\..\..\lib-src\libsndfile\src\avr.c" />
|
||||
<ClCompile Include="..\..\..\lib-src\libsndfile\src\broadcast.c" />
|
||||
<ClCompile Include="..\..\..\lib-src\libsndfile\src\caf.c" />
|
||||
<ClCompile Include="..\..\..\lib-src\libsndfile\src\cart.c" />
|
||||
<ClCompile Include="..\..\..\lib-src\libsndfile\src\chanmap.c" />
|
||||
<ClCompile Include="..\..\..\lib-src\libsndfile\src\chunk.c" />
|
||||
<ClCompile Include="..\..\..\lib-src\libsndfile\src\command.c" />
|
||||
@ -103,14 +114,19 @@
|
||||
<ClCompile Include="..\..\..\lib-src\libsndfile\src\ima_oki_adpcm.c" />
|
||||
<ClCompile Include="..\..\..\lib-src\libsndfile\src\interleave.c" />
|
||||
<ClCompile Include="..\..\..\lib-src\libsndfile\src\ircam.c" />
|
||||
<ClCompile Include="..\..\..\lib-src\libsndfile\src\macbinary3.c" />
|
||||
<ClCompile Include="..\..\..\lib-src\libsndfile\src\macos.c" />
|
||||
<ClCompile Include="..\..\..\lib-src\libsndfile\src\mat4.c" />
|
||||
<ClCompile Include="..\..\..\lib-src\libsndfile\src\mat5.c" />
|
||||
<ClCompile Include="..\..\..\lib-src\libsndfile\src\mpc2k.c" />
|
||||
<ClCompile Include="..\..\..\lib-src\libsndfile\src\ms_adpcm.c" />
|
||||
<ClCompile Include="..\..\..\lib-src\libsndfile\src\nist.c" />
|
||||
<ClCompile Include="..\..\..\lib-src\libsndfile\src\nms_adpcm.c" />
|
||||
<ClCompile Include="..\..\..\lib-src\libsndfile\src\ogg.c" />
|
||||
<ClCompile Include="..\..\..\lib-src\libsndfile\src\ogg_opus.c" />
|
||||
<ClCompile Include="..\..\..\lib-src\libsndfile\src\ogg_pcm.c" />
|
||||
<ClCompile Include="..\..\..\lib-src\libsndfile\src\ogg_speex.c" />
|
||||
<ClCompile Include="..\..\..\lib-src\libsndfile\src\ogg_vcomment.c" />
|
||||
<ClCompile Include="..\..\..\lib-src\libsndfile\src\ogg_vorbis.c" />
|
||||
<ClCompile Include="..\..\..\lib-src\libsndfile\src\paf.c" />
|
||||
<ClCompile Include="..\..\..\lib-src\libsndfile\src\pcm.c" />
|
||||
<ClCompile Include="..\..\..\lib-src\libsndfile\src\pvf.c" />
|
||||
@ -128,7 +144,8 @@
|
||||
<ClCompile Include="..\..\..\lib-src\libsndfile\src\vox_adpcm.c" />
|
||||
<ClCompile Include="..\..\..\lib-src\libsndfile\src\w64.c" />
|
||||
<ClCompile Include="..\..\..\lib-src\libsndfile\src\wav.c" />
|
||||
<ClCompile Include="..\..\..\lib-src\libsndfile\src\wav_w64.c" />
|
||||
<ClCompile Include="..\..\..\lib-src\libsndfile\src\wavlike.c" />
|
||||
<ClCompile Include="..\..\..\lib-src\libsndfile\src\windows.c" />
|
||||
<ClCompile Include="..\..\..\lib-src\libsndfile\src\wve.c" />
|
||||
<ClCompile Include="..\..\..\lib-src\libsndfile\src\xi.c" />
|
||||
<ClCompile Include="..\..\..\lib-src\libsndfile\src\G72x\g721.c" />
|
||||
@ -155,8 +172,22 @@
|
||||
<ClCompile Include="..\..\..\lib-src\libsndfile\src\GSM610\table.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\..\lib-src\libsndfile\src\ALAC\aglib.h" />
|
||||
<ClInclude Include="..\..\..\lib-src\libsndfile\src\ALAC\ALACAudioTypes.h" />
|
||||
<ClInclude Include="..\..\..\lib-src\libsndfile\src\ALAC\ALACBitUtilities.h" />
|
||||
<ClInclude Include="..\..\..\lib-src\libsndfile\src\ALAC\ALACDecoder.h" />
|
||||
<ClInclude Include="..\..\..\lib-src\libsndfile\src\ALAC\ALACEncoder.h" />
|
||||
<ClInclude Include="..\..\..\lib-src\libsndfile\src\ALAC\alac_codec.h" />
|
||||
<ClInclude Include="..\..\..\lib-src\libsndfile\src\ALAC\alac_decoder.h" />
|
||||
<ClInclude Include="..\..\..\lib-src\libsndfile\src\ALAC\dplib.h" />
|
||||
<ClInclude Include="..\..\..\lib-src\libsndfile\src\ALAC\EndianPortable.h" />
|
||||
<ClInclude Include="..\..\..\lib-src\libsndfile\src\ALAC\matrixlib.h" />
|
||||
<ClInclude Include="..\..\..\lib-src\libsndfile\src\ALAC\shift.h" />
|
||||
<ClInclude Include="..\..\..\lib-src\libsndfile\src\chanmap.h" />
|
||||
<ClInclude Include="..\..\..\lib-src\libsndfile\src\common.h" />
|
||||
<ClInclude Include="..\..\..\lib-src\libsndfile\src\ogg.h" />
|
||||
<ClInclude Include="..\..\..\lib-src\libsndfile\src\ogg_vcomment.h" />
|
||||
<ClInclude Include="..\..\..\lib-src\libsndfile\src\wavlike.h" />
|
||||
<ClInclude Include="config.h" />
|
||||
<ClInclude Include="..\..\..\lib-src\libsndfile\src\ima_oki_adpcm.h" />
|
||||
<ClInclude Include="..\..\..\lib-src\libsndfile\src\sf_unistd.h" />
|
||||
|
108
win/Projects/libsndfile/libsndfile.vcxproj.filters
Executable file → Normal file
108
win/Projects/libsndfile/libsndfile.vcxproj.filters
Executable file → Normal file
@ -13,6 +13,9 @@
|
||||
<Filter Include="GSM610">
|
||||
<UniqueIdentifier>{2cad7ca6-3c19-4826-92a6-85991bd4379a}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="ALAC">
|
||||
<UniqueIdentifier>{b18afb64-0961-4ad3-8905-24326c58576b}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\..\lib-src\libsndfile\src\aiff.c">
|
||||
@ -93,9 +96,6 @@
|
||||
<ClCompile Include="..\..\..\lib-src\libsndfile\src\ircam.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\lib-src\libsndfile\src\macbinary3.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\lib-src\libsndfile\src\macos.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
@ -168,9 +168,6 @@
|
||||
<ClCompile Include="..\..\..\lib-src\libsndfile\src\wav.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\lib-src\libsndfile\src\wav_w64.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\lib-src\libsndfile\src\wve.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
@ -234,6 +231,63 @@
|
||||
<ClCompile Include="..\..\..\lib-src\libsndfile\src\GSM610\table.c">
|
||||
<Filter>GSM610</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\lib-src\libsndfile\src\ALAC\ag_dec.c">
|
||||
<Filter>ALAC</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\lib-src\libsndfile\src\ALAC\ag_enc.c">
|
||||
<Filter>ALAC</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\lib-src\libsndfile\src\ALAC\alac_decoder.c">
|
||||
<Filter>ALAC</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\lib-src\libsndfile\src\ALAC\alac_encoder.c">
|
||||
<Filter>ALAC</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\lib-src\libsndfile\src\ALAC\ALACBitUtilities.c">
|
||||
<Filter>ALAC</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\lib-src\libsndfile\src\ALAC\dp_dec.c">
|
||||
<Filter>ALAC</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\lib-src\libsndfile\src\ALAC\dp_enc.c">
|
||||
<Filter>ALAC</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\lib-src\libsndfile\src\ALAC\matrix_dec.c">
|
||||
<Filter>ALAC</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\lib-src\libsndfile\src\ALAC\matrix_enc.c">
|
||||
<Filter>ALAC</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\lib-src\libsndfile\src\alac.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\lib-src\libsndfile\src\cart.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\lib-src\libsndfile\src\nms_adpcm.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\lib-src\libsndfile\src\ogg_opus.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\lib-src\libsndfile\src\ogg_pcm.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\lib-src\libsndfile\src\ogg_speex.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\lib-src\libsndfile\src\ogg_vcomment.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\lib-src\libsndfile\src\ogg_vorbis.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\lib-src\libsndfile\src\wavlike.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\lib-src\libsndfile\src\windows.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\..\lib-src\libsndfile\src\chanmap.h">
|
||||
@ -278,5 +332,47 @@
|
||||
<ClInclude Include="..\..\..\lib-src\libsndfile\src\GSM610\gsm610_priv.h">
|
||||
<Filter>GSM610</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\lib-src\libsndfile\src\ALAC\aglib.h">
|
||||
<Filter>ALAC</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\lib-src\libsndfile\src\ALAC\alac_codec.h">
|
||||
<Filter>ALAC</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\lib-src\libsndfile\src\ALAC\alac_decoder.h">
|
||||
<Filter>ALAC</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\lib-src\libsndfile\src\ALAC\ALACAudioTypes.h">
|
||||
<Filter>ALAC</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\lib-src\libsndfile\src\ALAC\ALACBitUtilities.h">
|
||||
<Filter>ALAC</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\lib-src\libsndfile\src\ALAC\ALACDecoder.h">
|
||||
<Filter>ALAC</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\lib-src\libsndfile\src\ALAC\ALACEncoder.h">
|
||||
<Filter>ALAC</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\lib-src\libsndfile\src\ALAC\dplib.h">
|
||||
<Filter>ALAC</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\lib-src\libsndfile\src\ALAC\EndianPortable.h">
|
||||
<Filter>ALAC</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\lib-src\libsndfile\src\ALAC\matrixlib.h">
|
||||
<Filter>ALAC</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\lib-src\libsndfile\src\ALAC\shift.h">
|
||||
<Filter>ALAC</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\lib-src\libsndfile\src\ogg.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\lib-src\libsndfile\src\ogg_vcomment.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\lib-src\libsndfile\src\wavlike.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
** Copyright (C) 1999-2011Erik de Castro Lopo <erikd@mega-nerd.com>
|
||||
** Copyright (C) 1999-2016 Erik de Castro Lopo <erikd@mega-nerd.com>
|
||||
**
|
||||
** This program is free software; you can redistribute it and/or modify
|
||||
** it under the terms of the GNU Lesser General Public License as published by
|
||||
@ -30,6 +30,7 @@
|
||||
#define SNDFILE_1
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
@ -91,6 +92,10 @@ enum
|
||||
SF_FORMAT_GSM610 = 0x0020, /* GSM 6.10 encoding. */
|
||||
SF_FORMAT_VOX_ADPCM = 0x0021, /* OKI / Dialogix ADPCM */
|
||||
|
||||
SF_FORMAT_NMS_ADPCM_16 = 0x0022, /* 16kbs NMS G721-variant encoding. */
|
||||
SF_FORMAT_NMS_ADPCM_24 = 0x0023, /* 24kbs NMS G721-variant encoding. */
|
||||
SF_FORMAT_NMS_ADPCM_32 = 0x0024, /* 32kbs NMS G721-variant encoding. */
|
||||
|
||||
SF_FORMAT_G721_32 = 0x0030, /* 32kbs G721 ADPCM encoding. */
|
||||
SF_FORMAT_G723_24 = 0x0031, /* 24kbs G723 ADPCM encoding. */
|
||||
SF_FORMAT_G723_40 = 0x0032, /* 40kbs G723 ADPCM encoding. */
|
||||
@ -104,6 +109,12 @@ enum
|
||||
SF_FORMAT_DPCM_16 = 0x0051, /* 16 bit differential PCM (XI only) */
|
||||
|
||||
SF_FORMAT_VORBIS = 0x0060, /* Xiph Vorbis encoding. */
|
||||
SF_FORMAT_OPUS = 0x0064, /* Xiph/Skype Opus encoding. */
|
||||
|
||||
SF_FORMAT_ALAC_16 = 0x0070, /* Apple Lossless Audio Codec (16 bit). */
|
||||
SF_FORMAT_ALAC_20 = 0x0071, /* Apple Lossless Audio Codec (20 bit). */
|
||||
SF_FORMAT_ALAC_24 = 0x0072, /* Apple Lossless Audio Codec (24 bit). */
|
||||
SF_FORMAT_ALAC_32 = 0x0073, /* Apple Lossless Audio Codec (32 bit). */
|
||||
|
||||
/* Endian-ness options. */
|
||||
|
||||
@ -154,7 +165,6 @@ enum
|
||||
SFC_GET_MAX_ALL_CHANNELS = 0x1045,
|
||||
|
||||
SFC_SET_ADD_PEAK_CHUNK = 0x1050,
|
||||
SFC_SET_ADD_HEADER_PAD_CHUNK = 0x1051,
|
||||
|
||||
SFC_UPDATE_HEADER_NOW = 0x1060,
|
||||
SFC_SET_UPDATE_HEADER_AUTO = 0x1061,
|
||||
@ -174,6 +184,10 @@ enum
|
||||
SFC_SET_CLIPPING = 0x10C0,
|
||||
SFC_GET_CLIPPING = 0x10C1,
|
||||
|
||||
SFC_GET_CUE_COUNT = 0x10CD,
|
||||
SFC_GET_CUE = 0x10CE,
|
||||
SFC_SET_CUE = 0x10CF,
|
||||
|
||||
SFC_GET_INSTRUMENT = 0x10D0,
|
||||
SFC_SET_INSTRUMENT = 0x10D1,
|
||||
|
||||
@ -191,17 +205,35 @@ enum
|
||||
SFC_WAVEX_SET_AMBISONIC = 0x1200,
|
||||
SFC_WAVEX_GET_AMBISONIC = 0x1201,
|
||||
|
||||
/*
|
||||
** RF64 files can be set so that on-close, writable files that have less
|
||||
** than 4GB of data in them are converted to RIFF/WAV, as per EBU
|
||||
** recommendations.
|
||||
*/
|
||||
SFC_RF64_AUTO_DOWNGRADE = 0x1210,
|
||||
|
||||
SFC_SET_VBR_ENCODING_QUALITY = 0x1300,
|
||||
SFC_SET_COMPRESSION_LEVEL = 0x1301,
|
||||
|
||||
/* Cart Chunk support */
|
||||
SFC_SET_CART_INFO = 0x1400,
|
||||
SFC_GET_CART_INFO = 0x1401,
|
||||
|
||||
/* Opus files original samplerate metadata */
|
||||
SFC_SET_ORIGINAL_SAMPLERATE = 0x1500,
|
||||
SFC_GET_ORIGINAL_SAMPLERATE = 0x1501,
|
||||
|
||||
/* Following commands for testing only. */
|
||||
SFC_TEST_IEEE_FLOAT_REPLACE = 0x6001,
|
||||
|
||||
/*
|
||||
** SFC_SET_ADD_* values are deprecated and will disappear at some
|
||||
** These SFC_SET_ADD_* values are deprecated and will disappear at some
|
||||
** time in the future. They are guaranteed to be here up to and
|
||||
** including version 1.0.8 to avoid breakage of existng software.
|
||||
** including version 1.0.8 to avoid breakage of existing software.
|
||||
** They currently do nothing and will continue to do nothing.
|
||||
*/
|
||||
SFC_SET_ADD_HEADER_PAD_CHUNK = 0x1051,
|
||||
|
||||
SFC_SET_ADD_DITHER_ON_WRITE = 0x1070,
|
||||
SFC_SET_ADD_DITHER_ON_READ = 0x1071
|
||||
} ;
|
||||
@ -232,7 +264,7 @@ enum
|
||||
*/
|
||||
|
||||
#define SF_STR_FIRST SF_STR_TITLE
|
||||
#define SF_STR_LAST SF_STR_LICENSE
|
||||
#define SF_STR_LAST SF_STR_GENRE
|
||||
|
||||
enum
|
||||
{ /* True and false */
|
||||
@ -311,7 +343,7 @@ typedef struct SNDFILE_tag SNDFILE ;
|
||||
** and the Microsoft compiler.
|
||||
*/
|
||||
|
||||
#if (defined (_MSCVER) || defined (_MSC_VER))
|
||||
#if (defined (_MSCVER) || defined (_MSC_VER) && (_MSC_VER < 1310))
|
||||
typedef __int64 sf_count_t ;
|
||||
#define SF_COUNT_MAX 0x7fffffffffffffffi64
|
||||
#else
|
||||
@ -383,6 +415,28 @@ typedef struct
|
||||
sf_count_t length ;
|
||||
} SF_EMBED_FILE_INFO ;
|
||||
|
||||
/*
|
||||
** Struct used to retrieve cue marker information from a file
|
||||
*/
|
||||
|
||||
typedef struct
|
||||
{ int32_t indx ;
|
||||
uint32_t position ;
|
||||
int32_t fcc_chunk ;
|
||||
int32_t chunk_start ;
|
||||
int32_t block_start ;
|
||||
uint32_t sample_offset ;
|
||||
char name [256] ;
|
||||
} SF_CUE_POINT ;
|
||||
|
||||
#define SF_CUES_VAR(count) \
|
||||
struct \
|
||||
{ uint32_t cue_count ; \
|
||||
SF_CUE_POINT cue_points [count] ; \
|
||||
}
|
||||
|
||||
typedef SF_CUES_VAR (100) SF_CUES ;
|
||||
|
||||
/*
|
||||
** Structs used to retrieve music sample information from a file.
|
||||
*/
|
||||
@ -406,9 +460,9 @@ typedef struct
|
||||
|
||||
struct
|
||||
{ int mode ;
|
||||
unsigned int start ;
|
||||
unsigned int end ;
|
||||
unsigned int count ;
|
||||
uint32_t start ;
|
||||
uint32_t end ;
|
||||
uint32_t count ;
|
||||
} loops [16] ; /* make variable in a sensible way */
|
||||
} SF_INSTRUMENT ;
|
||||
|
||||
@ -426,7 +480,7 @@ typedef struct
|
||||
/* a full bar of 7/8 is 7 beats */
|
||||
|
||||
float bpm ; /* suggestion, as it can be calculated using other fields:*/
|
||||
/* file's lenght, file's sampleRate and our time_sig_den*/
|
||||
/* file's length, file's sampleRate and our time_sig_den*/
|
||||
/* -> bpms are always the amount of _quarter notes_ per minute */
|
||||
|
||||
int root_key ; /* MIDI note, or -1 for None */
|
||||
@ -439,23 +493,61 @@ typedef struct
|
||||
*/
|
||||
#define SF_BROADCAST_INFO_VAR(coding_hist_size) \
|
||||
struct \
|
||||
{ char description [256] ; \
|
||||
char originator [32] ; \
|
||||
char originator_reference [32] ; \
|
||||
char origination_date [10] ; \
|
||||
char origination_time [8] ; \
|
||||
unsigned int time_reference_low ; \
|
||||
unsigned int time_reference_high ; \
|
||||
short version ; \
|
||||
char umid [64] ; \
|
||||
char reserved [190] ; \
|
||||
unsigned int coding_history_size ; \
|
||||
char coding_history [coding_hist_size] ; \
|
||||
{ char description [256] ; \
|
||||
char originator [32] ; \
|
||||
char originator_reference [32] ; \
|
||||
char origination_date [10] ; \
|
||||
char origination_time [8] ; \
|
||||
uint32_t time_reference_low ; \
|
||||
uint32_t time_reference_high ; \
|
||||
short version ; \
|
||||
char umid [64] ; \
|
||||
int16_t loudness_value ; \
|
||||
int16_t loudness_range ; \
|
||||
int16_t max_true_peak_level ; \
|
||||
int16_t max_momentary_loudness ; \
|
||||
int16_t max_shortterm_loudness ; \
|
||||
char reserved [180] ; \
|
||||
uint32_t coding_history_size ; \
|
||||
char coding_history [coding_hist_size] ; \
|
||||
}
|
||||
|
||||
/* SF_BROADCAST_INFO is the above struct with coding_history field of 256 bytes. */
|
||||
typedef SF_BROADCAST_INFO_VAR (256) SF_BROADCAST_INFO ;
|
||||
|
||||
struct SF_CART_TIMER
|
||||
{ char usage [4] ;
|
||||
int32_t value ;
|
||||
} ;
|
||||
|
||||
typedef struct SF_CART_TIMER SF_CART_TIMER ;
|
||||
|
||||
#define SF_CART_INFO_VAR(p_tag_text_size) \
|
||||
struct \
|
||||
{ char version [4] ; \
|
||||
char title [64] ; \
|
||||
char artist [64] ; \
|
||||
char cut_id [64] ; \
|
||||
char client_id [64] ; \
|
||||
char category [64] ; \
|
||||
char classification [64] ; \
|
||||
char out_cue [64] ; \
|
||||
char start_date [10] ; \
|
||||
char start_time [8] ; \
|
||||
char end_date [10] ; \
|
||||
char end_time [8] ; \
|
||||
char producer_app_id [64] ; \
|
||||
char producer_app_version [64] ; \
|
||||
char user_def [64] ; \
|
||||
int32_t level_reference ; \
|
||||
SF_CART_TIMER post_timers [8] ; \
|
||||
char reserved [276] ; \
|
||||
char url [1024] ; \
|
||||
uint32_t tag_text_size ; \
|
||||
char tag_text [p_tag_text_size] ; \
|
||||
}
|
||||
|
||||
typedef SF_CART_INFO_VAR (256) SF_CART_INFO ;
|
||||
|
||||
/* Virtual I/O functionality. */
|
||||
|
||||
@ -487,7 +579,7 @@ SNDFILE* sf_open (const char *path, int mode, SF_INFO *sfinfo) ;
|
||||
|
||||
/* Use the existing file descriptor to create a SNDFILE object. If close_desc
|
||||
** is TRUE, the file descriptor will be closed when sf_close() is called. If
|
||||
** it is FALSE, the descritor will not be closed.
|
||||
** it is FALSE, the descriptor will not be closed.
|
||||
** When passed a descriptor like this, the library will assume that the start
|
||||
** of file header is at the current file offset. This allows sound files within
|
||||
** larger container files to be read and/or written.
|
||||
@ -525,7 +617,7 @@ const char* sf_error_number (int errnum) ;
|
||||
|
||||
|
||||
/* The following two error functions are deprecated but they will remain in the
|
||||
** library for the forseeable future. The function sf_strerror() should be used
|
||||
** library for the foreseeable future. The function sf_strerror() should be used
|
||||
** in their place.
|
||||
*/
|
||||
|
||||
@ -555,6 +647,12 @@ int sf_format_check (const SF_INFO *info) ;
|
||||
** On error all of these functions return -1.
|
||||
*/
|
||||
|
||||
enum
|
||||
{ SF_SEEK_SET = SEEK_SET,
|
||||
SF_SEEK_CUR = SEEK_CUR,
|
||||
SF_SEEK_END = SEEK_END
|
||||
} ;
|
||||
|
||||
sf_count_t sf_seek (SNDFILE *sndfile, sf_count_t frames, int whence) ;
|
||||
|
||||
|
||||
@ -575,6 +673,18 @@ const char* sf_get_string (SNDFILE *sndfile, int str_type) ;
|
||||
|
||||
const char * sf_version_string (void) ;
|
||||
|
||||
/* Return the current byterate at this point in the file. The byte rate in this
|
||||
** case is the number of bytes per second of audio data. For instance, for a
|
||||
** stereo, 18 bit PCM encoded file with an 16kHz sample rate, the byte rate
|
||||
** would be 2 (stereo) * 2 (two bytes per sample) * 16000 => 64000 bytes/sec.
|
||||
** For some file formats the returned value will be accurate and exact, for some
|
||||
** it will be a close approximation, for some it will be the average bitrate for
|
||||
** the whole file and for some it will be a time varying value that was accurate
|
||||
** when the file was most recently read or written.
|
||||
** To get the bitrate, multiple this value by 8.
|
||||
** Returns -1 for unknown.
|
||||
*/
|
||||
int sf_current_byterate (SNDFILE *sndfile) ;
|
||||
|
||||
/* Functions for reading/writing the waveform data of a sound file.
|
||||
*/
|
||||
@ -652,15 +762,110 @@ void sf_write_sync (SNDFILE *sndfile) ;
|
||||
** #including <sndfile.h>
|
||||
*/
|
||||
|
||||
#if ENABLE_SNDFILE_WINDOWS_PROTOTYPES
|
||||
#if (defined (ENABLE_SNDFILE_WINDOWS_PROTOTYPES) && ENABLE_SNDFILE_WINDOWS_PROTOTYPES)
|
||||
SNDFILE* sf_wchar_open (LPCWSTR wpath, int mode, SF_INFO *sfinfo) ;
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
/* Getting and setting of chunks from within a sound file.
|
||||
**
|
||||
** These functions allow the getting and setting of chunks within a sound file
|
||||
** (for those formats which allow it).
|
||||
**
|
||||
** These functions fail safely. Specifically, they will not allow you to overwrite
|
||||
** existing chunks or add extra versions of format specific reserved chunks but
|
||||
** should allow you to retrieve any and all chunks (may not be implemented for
|
||||
** all chunks or all file formats).
|
||||
*/
|
||||
|
||||
struct SF_CHUNK_INFO
|
||||
{ char id [64] ; /* The chunk identifier. */
|
||||
unsigned id_size ; /* The size of the chunk identifier. */
|
||||
unsigned datalen ; /* The size of that data. */
|
||||
void *data ; /* Pointer to the data. */
|
||||
} ;
|
||||
|
||||
typedef struct SF_CHUNK_INFO SF_CHUNK_INFO ;
|
||||
|
||||
/* Set the specified chunk info (must be done before any audio data is written
|
||||
** to the file). This will fail for format specific reserved chunks.
|
||||
** The chunk_info->data pointer must be valid until the file is closed.
|
||||
** Returns SF_ERR_NO_ERROR on success or non-zero on failure.
|
||||
*/
|
||||
int sf_set_chunk (SNDFILE * sndfile, const SF_CHUNK_INFO * chunk_info) ;
|
||||
|
||||
/*
|
||||
** An opaque structure to an iterator over the all chunks of a given id
|
||||
*/
|
||||
typedef struct SF_CHUNK_ITERATOR SF_CHUNK_ITERATOR ;
|
||||
|
||||
/* Get an iterator for all chunks matching chunk_info.
|
||||
** The iterator will point to the first chunk matching chunk_info.
|
||||
** Chunks are matching, if (chunk_info->id) matches the first
|
||||
** (chunk_info->id_size) bytes of a chunk found in the SNDFILE* handle.
|
||||
** If chunk_info is NULL, an iterator to all chunks in the SNDFILE* handle
|
||||
** is returned.
|
||||
** The values of chunk_info->datalen and chunk_info->data are ignored.
|
||||
** If no matching chunks are found in the sndfile, NULL is returned.
|
||||
** The returned iterator will stay valid until one of the following occurs:
|
||||
** a) The sndfile is closed.
|
||||
** b) A new chunk is added using sf_set_chunk().
|
||||
** c) Another chunk iterator function is called on the same SNDFILE* handle
|
||||
** that causes the iterator to be modified.
|
||||
** The memory for the iterator belongs to the SNDFILE* handle and is freed when
|
||||
** sf_close() is called.
|
||||
*/
|
||||
SF_CHUNK_ITERATOR *
|
||||
sf_get_chunk_iterator (SNDFILE * sndfile, const SF_CHUNK_INFO * chunk_info) ;
|
||||
|
||||
/* Iterate through chunks by incrementing the iterator.
|
||||
** Increments the iterator and returns a handle to the new one.
|
||||
** After this call, iterator will no longer be valid, and you must use the
|
||||
** newly returned handle from now on.
|
||||
** The returned handle can be used to access the next chunk matching
|
||||
** the criteria as defined in sf_get_chunk_iterator().
|
||||
** If iterator points to the last chunk, this will free all resources
|
||||
** associated with iterator and return NULL.
|
||||
** The returned iterator will stay valid until sf_get_chunk_iterator_next
|
||||
** is called again, the sndfile is closed or a new chunk us added.
|
||||
*/
|
||||
SF_CHUNK_ITERATOR *
|
||||
sf_next_chunk_iterator (SF_CHUNK_ITERATOR * iterator) ;
|
||||
|
||||
|
||||
/* Get the size of the specified chunk.
|
||||
** If the specified chunk exists, the size will be returned in the
|
||||
** datalen field of the SF_CHUNK_INFO struct.
|
||||
** Additionally, the id of the chunk will be copied to the id
|
||||
** field of the SF_CHUNK_INFO struct and it's id_size field will
|
||||
** be updated accordingly.
|
||||
** If the chunk doesn't exist chunk_info->datalen will be zero, and the
|
||||
** id and id_size fields will be undefined.
|
||||
** The function will return SF_ERR_NO_ERROR on success or non-zero on
|
||||
** failure.
|
||||
*/
|
||||
int
|
||||
sf_get_chunk_size (const SF_CHUNK_ITERATOR * it, SF_CHUNK_INFO * chunk_info) ;
|
||||
|
||||
/* Get the specified chunk data.
|
||||
** If the specified chunk exists, up to chunk_info->datalen bytes of
|
||||
** the chunk data will be copied into the chunk_info->data buffer
|
||||
** (allocated by the caller) and the chunk_info->datalen field
|
||||
** updated to reflect the size of the data. The id and id_size
|
||||
** field will be updated according to the retrieved chunk
|
||||
** If the chunk doesn't exist chunk_info->datalen will be zero, and the
|
||||
** id and id_size fields will be undefined.
|
||||
** The function will return SF_ERR_NO_ERROR on success or non-zero on
|
||||
** failure.
|
||||
*/
|
||||
int
|
||||
sf_get_chunk_data (const SF_CHUNK_ITERATOR * it, SF_CHUNK_INFO * chunk_info) ;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* SNDFILE_H */
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user