Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/alexmarsev/libbs2b.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorboris_mikhaylov <boris_mikhaylov@bc0edfbe-c936-4687-b64d-f70bc3985e72>2009-03-06 17:26:07 +0300
committerboris_mikhaylov <boris_mikhaylov@bc0edfbe-c936-4687-b64d-f70bc3985e72>2009-03-06 17:26:07 +0300
commitc0979ce42866effe4ab834b813c3e8347e247b8e (patch)
tree1f4c8bcc5bcd2116fdd5c9ecf09122dac17d8574
parent71ea90363799c6fb086ad057ac5b00516aa2839d (diff)
libsndfile v1.0.17 -> v1.0.19
git-svn-id: svn://svn.code.sf.net/p/bs2b/code/trunk/libbs2b@55 bc0edfbe-c936-4687-b64d-f70bc3985e72
-rw-r--r--win32/bs2bconvert/bs2bconvert-readme.txt2
-rw-r--r--win32/sndfile/libsndfile-1.libbin8180 -> 8176 bytes
-rw-r--r--win32/sndfile/readme.txt2
-rw-r--r--win32/sndfile/sndfile.h131
4 files changed, 99 insertions, 36 deletions
diff --git a/win32/bs2bconvert/bs2bconvert-readme.txt b/win32/bs2bconvert/bs2bconvert-readme.txt
index 8c06b1b..fabf724 100644
--- a/win32/bs2bconvert/bs2bconvert-readme.txt
+++ b/win32/bs2bconvert/bs2bconvert-readme.txt
@@ -7,7 +7,7 @@ Project source code and description is available at
http://bs2b.sourceforge.net/
bs2bconvert.exe - win32 x86 binary.
-libsndfile-1.dll - libsndfile library v1.0.17.
+libsndfile-1.dll - libsndfile library v1.0.19.
libsndfile is copyright by Erik de Castro Lopo.
http://www.mega-nerd.com/libsndfile/
diff --git a/win32/sndfile/libsndfile-1.lib b/win32/sndfile/libsndfile-1.lib
index d15663f..ec664a2 100644
--- a/win32/sndfile/libsndfile-1.lib
+++ b/win32/sndfile/libsndfile-1.lib
Binary files differ
diff --git a/win32/sndfile/readme.txt b/win32/sndfile/readme.txt
index 401ca22..d303006 100644
--- a/win32/sndfile/readme.txt
+++ b/win32/sndfile/readme.txt
@@ -1,4 +1,4 @@
-Win32 import library and header file of libsndfile library v1.0.17.
+Win32 import library and header file of libsndfile library v1.0.19.
libsndfile is copyright by Erik de Castro Lopo.
http://www.mega-nerd.com/libsndfile/
diff --git a/win32/sndfile/sndfile.h b/win32/sndfile/sndfile.h
index 1b5dc92..08e63d2 100644
--- a/win32/sndfile/sndfile.h
+++ b/win32/sndfile/sndfile.h
@@ -1,5 +1,5 @@
/*
-** Copyright (C) 1999-2006 Erik de Castro Lopo <erikd@mega-nerd.com>
+** Copyright (C) 1999-2009 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,14 +30,7 @@
#define SNDFILE_1
#include <stdio.h>
-
-/* For the Metrowerks CodeWarrior Pro Compiler (mainly MacOS) */
-
-#if (defined (__MWERKS__))
-#include <unix.h>
-#else
-#include <sys/types.h>
-#endif
+#include <sys/types.h>
#ifdef __cplusplus
extern "C" {
@@ -73,6 +66,10 @@ enum
SF_FORMAT_SD2 = 0x160000, /* Sound Designer 2 */
SF_FORMAT_FLAC = 0x170000, /* FLAC lossless file format */
SF_FORMAT_CAF = 0x180000, /* Core Audio File format */
+ SF_FORMAT_WVE = 0x190000, /* Psion WVE format */
+ SF_FORMAT_OGG = 0x200000, /* Xiph OGG container */
+ SF_FORMAT_MPC2K = 0x210000, /* Akai MPC 2000 sampler */
+ SF_FORMAT_RF64 = 0x220000, /* RF64 WAV file */
/* Subtypes from here on. */
@@ -106,6 +103,8 @@ enum
SF_FORMAT_DPCM_8 = 0x0050, /* 8 bit differential PCM (XI only) */
SF_FORMAT_DPCM_16 = 0x0051, /* 16 bit differential PCM (XI only) */
+ SF_FORMAT_VORBIS = 0x0060, /* Xiph Vorbis encoding. */
+
/* Endian-ness options. */
SF_ENDIAN_FILE = 0x00000000, /* Default file endian-ness. */
@@ -127,12 +126,15 @@ enum
enum
{ SFC_GET_LIB_VERSION = 0x1000,
SFC_GET_LOG_INFO = 0x1001,
+ SFC_GET_CURRENT_SF_INFO = 0x1002,
+
SFC_GET_NORM_DOUBLE = 0x1010,
SFC_GET_NORM_FLOAT = 0x1011,
SFC_SET_NORM_DOUBLE = 0x1012,
SFC_SET_NORM_FLOAT = 0x1013,
SFC_SET_SCALE_FLOAT_INT_READ = 0x1014,
+ SFC_SET_SCALE_INT_FLOAT_WRITE = 0x1015,
SFC_GET_SIMPLE_FORMAT_COUNT = 0x1020,
SFC_GET_SIMPLE_FORMAT = 0x1021,
@@ -152,6 +154,7 @@ 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,
@@ -179,6 +182,17 @@ enum
SFC_GET_BROADCAST_INFO = 0x10F0,
SFC_SET_BROADCAST_INFO = 0x10F1,
+ SFC_GET_CHANNEL_MAP_INFO = 0x1100,
+ SFC_SET_CHANNEL_MAP_INFO = 0x1101,
+
+ SFC_RAW_DATA_NEEDS_ENDSWAP = 0x1110,
+
+ /* Support for Wavex Ambisonics Format */
+ SFC_WAVEX_SET_AMBISONIC = 0x1200,
+ SFC_WAVEX_GET_AMBISONIC = 0x1201,
+
+ SFC_SET_VBR_ENCODING_QUALITY = 0x1300,
+
/* Following commands for testing only. */
SFC_TEST_IEEE_FLOAT_REPLACE = 0x6001,
@@ -205,7 +219,9 @@ enum
SF_STR_SOFTWARE = 0x03,
SF_STR_ARTIST = 0x04,
SF_STR_COMMENT = 0x05,
- SF_STR_DATE = 0x06
+ SF_STR_DATE = 0x06,
+ SF_STR_ALBUM = 0x07,
+ SF_STR_LICENSE = 0x08
} ;
/*
@@ -214,7 +230,7 @@ enum
*/
#define SF_STR_FIRST SF_STR_TITLE
-#define SF_STR_LAST SF_STR_DATE
+#define SF_STR_LAST SF_STR_LICENSE
enum
{ /* True and false */
@@ -224,7 +240,10 @@ enum
/* Modes for opening files. */
SFM_READ = 0x10,
SFM_WRITE = 0x20,
- SFM_RDWR = 0x30
+ SFM_RDWR = 0x30,
+
+ SF_AMBISONIC_NONE = 0x40,
+ SF_AMBISONIC_B_FORMAT = 0x41
} ;
/* Public error values. These are guaranteed to remain unchanged for the duration
@@ -241,18 +260,55 @@ enum
SF_ERR_UNSUPPORTED_ENCODING = 4
} ;
+
+/* Channel map values (used with SFC_SET/GET_CHANNEL_MAP).
+*/
+
+enum
+{ SF_CHANNEL_MAP_INVALID = 0,
+ SF_CHANNEL_MAP_MONO = 1,
+ SF_CHANNEL_MAP_LEFT,
+ SF_CHANNEL_MAP_RIGHT,
+ SF_CHANNEL_MAP_CENTER,
+ SF_CHANNEL_MAP_FRONT_LEFT,
+ SF_CHANNEL_MAP_FRONT_RIGHT,
+ SF_CHANNEL_MAP_FRONT_CENTER,
+ SF_CHANNEL_MAP_REAR_CENTER,
+ SF_CHANNEL_MAP_REAR_LEFT,
+ SF_CHANNEL_MAP_REAR_RIGHT,
+ SF_CHANNEL_MAP_LFE,
+ SF_CHANNEL_MAP_FRONT_LEFT_OF_CENTER,
+ SF_CHANNEL_MAP_FRONT_RIGHT_OF_CENTER,
+ SF_CHANNEL_MAP_SIDE_LEFT,
+ SF_CHANNEL_MAP_SIDE_RIGHT,
+ SF_CHANNEL_MAP_TOP_CENTER,
+ SF_CHANNEL_MAP_TOP_FRONT_LEFT,
+ SF_CHANNEL_MAP_TOP_FRONT_RIGHT,
+ SF_CHANNEL_MAP_TOP_FRONT_CENTER,
+ SF_CHANNEL_MAP_TOP_REAR_LEFT,
+ SF_CHANNEL_MAP_TOP_REAR_RIGHT,
+ SF_CHANNEL_MAP_TOP_REAR_CENTER
+} ;
+
+
/* A SNDFILE* pointer can be passed around much like stdio.h's FILE* pointer. */
typedef struct SNDFILE_tag SNDFILE ;
-/* The following typedef is system specific and is defined when libsndfile is.
-** compiled. sf_count_t can be one of loff_t (Linux), off_t (*BSD),
-** off64_t (Solaris), __int64_t (Win32) etc.
+/* The following typedef is system specific and is defined when libsndfile is
+** compiled. sf_count_t can be one of loff_t (Linux), off_t (*BSD), off64_t
+** (Solaris), __int64_t (Win32) etc. On windows, we need to allow the same
+** header file to be compiler by both GCC and the microsoft compiler.
*/
+#ifdef _MSCVER
+typedef __int64_t sf_count_t ;
+#define SF_COUNT_MAX 0x7fffffffffffffffi64
+#else
typedef __int64 sf_count_t ;
-
#define SF_COUNT_MAX 0x7FFFFFFFFFFFFFFFLL
+#endif
+
/* A pointer to a SF_INFO structure is passed to sf_open_read () and filled in.
** On write, the SF_INFO structure is filled in by the user and passed into
@@ -368,23 +424,30 @@ typedef struct
} SF_LOOP_INFO ;
-/* Struct used to retrieve broadcast (EBU) information from a file.
+/* Struct used to retrieve broadcast (EBU) information from a file.
** Strongly (!) based on EBU "bext" chunk format used in Broadcast WAVE.
*/
-typedef struct
-{ char description [256] ;
- char originator [32] ;
- char originator_reference [32] ;
- char origination_date [10] ;
- char origination_time [8] ;
- int time_reference_low ;
- int time_reference_high ;
- short version ;
- char umid [64] ;
- char reserved [190] ;
- unsigned int coding_history_size ;
- char coding_history [256] ;
-} SF_BROADCAST_INFO ;
+#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] ; \
+ }
+
+/* SF_BROADCAST_INFO is the above struct with coding_history field of 256 bytes. */
+typedef SF_BROADCAST_INFO_VAR (256) SF_BROADCAST_INFO ;
+
+
+/* Virtual I/O functionality. */
typedef sf_count_t (*sf_vio_get_filelen) (void *user_data) ;
typedef sf_count_t (*sf_vio_seek) (sf_count_t offset, int whence, void *user_data) ;
@@ -404,7 +467,7 @@ typedef struct SF_VIRTUAL_IO SF_VIRTUAL_IO ;
/* Open the specified file for read, write or both. On error, this will
** return a NULL pointer. To find the error number, pass a NULL SNDFILE
-** to sf_perror () or sf_error_str ().
+** to sf_strerror ().
** All calls to sf_open() should be matched with a call to sf_close().
*/
@@ -417,7 +480,7 @@ SNDFILE* sf_open (const char *path, int mode, SF_INFO *sfinfo) ;
** of file header is at the current file offset. This allows sound files within
** larger container files to be read and/or written.
** On error, this will return a NULL pointer. To find the error number, pass a
-** NULL SNDFILE to sf_perror () or sf_error_str ().
+** NULL SNDFILE to sf_strerror ().
** All calls to sf_open_fd() should be matched with a call to sf_close().
*/
@@ -445,7 +508,7 @@ const char* sf_strerror (SNDFILE *sndfile) ;
const char* sf_error_number (int errnum) ;
-/* The following three error functions are deprecated but they will remain in the
+/* 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
** in their place.
*/