mirror of
https://gitee.com/openharmony/third_party_libsnd
synced 2024-11-26 19:40:24 +00:00
Pull in changes from 1.0.6 pre-release testing.
This commit is contained in:
parent
95efab5ba0
commit
09414afc7e
15
ChangeLog
15
ChangeLog
@ -1,3 +1,16 @@
|
||||
2004-02-08 Erik de Castro Lopo <erikd AT zipworld DOT com DOT au>
|
||||
|
||||
* src/file_io.c
|
||||
Make sure config.h is included before stdio.h to make sure large file
|
||||
support is enabled on Linux (and Solaris).
|
||||
|
||||
* tests/misc_test.c
|
||||
Disable update_header test on Win32. This should work but doesn't and
|
||||
I'm not sure why.
|
||||
|
||||
* Make.bat Win32/Makefile.msvc
|
||||
Updates.
|
||||
|
||||
2004-01-07 Erik de Castro Lopo <erikd AT zipworld DOT com DOT au>
|
||||
|
||||
* src/common.h
|
||||
@ -396,7 +409,7 @@
|
||||
Add a test for lrintf() function. This was required to detect a really
|
||||
broken lrint() and lrintf() on Cygwin.
|
||||
|
||||
* tests/msic_test.c
|
||||
* tests/misc_test.c
|
||||
Don't run permission test when compiling under Cygwin.
|
||||
|
||||
* src/float_cast.h
|
||||
|
@ -58,6 +58,9 @@
|
||||
/* Define to 1 if you have the `ftruncate' function. */
|
||||
#define HAVE_FTRUNCATE 1
|
||||
|
||||
/* Define to 1 if you have the `getpagesize' function. */
|
||||
#define HAVE_GETPAGESIZE 1
|
||||
|
||||
/* Define to 1 if you have the `gmtime' function. */
|
||||
#define HAVE_GMTIME 1
|
||||
|
||||
@ -85,6 +88,9 @@
|
||||
/* 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. */
|
||||
#define HAVE_MMAP 1
|
||||
|
||||
/* Define to 1 if you have the <mmreg.h> header file. */
|
||||
/* #undef HAVE_MMREG_H */
|
||||
|
||||
@ -139,6 +145,9 @@
|
||||
/* Define to 1 if you have the `write' function. */
|
||||
#define HAVE_WRITE 1
|
||||
|
||||
/* Set to 1 if compiling for MacOSX */
|
||||
#define OS_IS_MACOSX 0
|
||||
|
||||
/* Set to 1 if compiling for Win32 */
|
||||
#define OS_IS_WIN32 0
|
||||
|
||||
@ -152,13 +161,13 @@
|
||||
#define PACKAGE_NAME "libsndfile"
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#define PACKAGE_STRING "libsndfile 1.1.0pre1"
|
||||
#define PACKAGE_STRING "libsndfile 1.0.6"
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#define PACKAGE_TARNAME "libsndfile"
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#define PACKAGE_VERSION "1.1.0pre1"
|
||||
#define PACKAGE_VERSION "1.0.6"
|
||||
|
||||
/* Set to maximum allowed value of sf_count_t type. */
|
||||
#define SF_COUNT_MAX 0x7FFFFFFFFFFFFFFFLL
|
||||
@ -206,7 +215,16 @@
|
||||
#define TYPEOF_SF_COUNT_T off_t
|
||||
|
||||
/* Version number of package */
|
||||
#define VERSION "1.0.6pre14"
|
||||
#define VERSION "1.0.6"
|
||||
|
||||
/* Number of bits in a file offset, on hosts where this is settable. */
|
||||
/* #undef _FILE_OFFSET_BITS */
|
||||
|
||||
/* Define to make fseeko etc. visible, on some hosts. */
|
||||
/* #undef _LARGEFILE_SOURCE */
|
||||
|
||||
/* Define for large files, on AIX-style hosts. */
|
||||
/* #undef _LARGE_FILES */
|
||||
|
||||
/*
|
||||
** Do not edit or modify anything in this comment block.
|
||||
@ -215,4 +233,3 @@
|
||||
**
|
||||
** arch-tag: d0eaac82-82be-4d81-984e-a86744f18100
|
||||
*/
|
||||
|
||||
|
@ -164,6 +164,9 @@ enum
|
||||
SFC_SET_CLIPPING = 0x10C0,
|
||||
SFC_GET_CLIPPING = 0x10C1,
|
||||
|
||||
SFC_GET_INSTRUMENT = 0x10D0,
|
||||
SFC_SET_INSTRUMENT = 0x10D1,
|
||||
|
||||
/* Following commands for testing only. */
|
||||
SFC_TEST_IEEE_FLOAT_REPLACE = 0x6001,
|
||||
|
||||
@ -218,20 +221,16 @@ enum
|
||||
|
||||
/* A SNDFILE* pointer can be passed around much like stdio.h's FILE* pointer. */
|
||||
|
||||
typedef void SNDFILE ;
|
||||
typedef struct SNDFILE_tag SNDFILE ;
|
||||
|
||||
<<<<<<< diff from left file
|
||||
typedef off_t sf_count_t ;
|
||||
========
|
||||
/* 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.
|
||||
*/
|
||||
|
||||
typedef loff_t sf_count_t ;
|
||||
typedef off_t sf_count_t ;
|
||||
|
||||
#define SF_COUNT_MAX 0x7FFFFFFFFFFFFFFFLL
|
||||
>>>>>>> diff from right file
|
||||
#define SF_COUNT_MAX 0x7FFFFFFF
|
||||
|
||||
/* 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
|
||||
@ -296,6 +295,25 @@ typedef struct
|
||||
sf_count_t length ;
|
||||
} SF_EMBED_FILE_INFO ;
|
||||
|
||||
/* Struct used to retrieve music sample information from a file.
|
||||
*/
|
||||
|
||||
typedef struct
|
||||
{ int basenote ;
|
||||
int gain ;
|
||||
int sustain_mode ;
|
||||
int sustain_start, sustain_end;
|
||||
int release_mode ;
|
||||
int release_start, reslease_end ;
|
||||
} SF_INSTRUMENT ;
|
||||
|
||||
/* sustain_mode and release_mode will be one of the following. */
|
||||
|
||||
enum
|
||||
{ SF_LOOP_NONE = 800,
|
||||
SF_LOOP_FORWARD,
|
||||
SF_LOOP_BACKWARD,
|
||||
} ;
|
||||
|
||||
/* 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
|
||||
@ -333,6 +351,7 @@ const char* sf_strerror (SNDFILE *sndfile) ;
|
||||
|
||||
/* sf_error_number () allows the retrieval of the error string for each internal
|
||||
** error number.
|
||||
**
|
||||
*/
|
||||
|
||||
const char* sf_error_number (int errnum) ;
|
||||
@ -405,7 +424,7 @@ sf_count_t sf_writef_int (SNDFILE *sndfile, int *ptr, sf_count_t frames) ;
|
||||
sf_count_t sf_readf_float (SNDFILE *sndfile, float *ptr, sf_count_t frames) ;
|
||||
sf_count_t sf_writef_float (SNDFILE *sndfile, float *ptr, sf_count_t frames) ;
|
||||
|
||||
sf_count_t sf_readf_double (SNDFILE *sndfile, double *ptr, sf_count_t frames) ;
|
||||
sf_count_t sf_readf_double (SNDFILE *sndfile, double *ptr, sf_count_t frames) ;
|
||||
sf_count_t sf_writef_double (SNDFILE *sndfile, double *ptr, sf_count_t frames) ;
|
||||
|
||||
/* Functions for reading and writing the data chunk in terms of items.
|
||||
@ -426,8 +445,8 @@ sf_count_t sf_read_double (SNDFILE *sndfile, double *ptr, sf_count_t items) ;
|
||||
sf_count_t sf_write_double (SNDFILE *sndfile, double *ptr, sf_count_t items) ;
|
||||
|
||||
/* Close the SNDFILE and clean up all memory allocations associated with this
|
||||
** file.
|
||||
** Returns 0 on success, or an error number.
|
||||
** file.
|
||||
** Returns 0 on success, or an error number.
|
||||
*/
|
||||
|
||||
int sf_close (SNDFILE *sndfile) ;
|
||||
@ -437,6 +456,7 @@ int sf_close (SNDFILE *sndfile) ;
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* SNDFILE_H */
|
||||
|
||||
/*
|
||||
** Do not edit or modify anything in this comment block.
|
||||
** The arch-tag line is a file identity tag for the GNU Arch
|
||||
|
9
Make.bat
9
Make.bat
@ -1,6 +1,7 @@
|
||||
@echo off
|
||||
|
||||
if "%1"=="check" GOTO CHECK
|
||||
if "%1"=="clean" GOTO CLEAN
|
||||
|
||||
copy /y Win32\sndfile.h src\sndfile.h
|
||||
copy /y Win32\config.h src\config.h
|
||||
@ -13,8 +14,14 @@ goto END
|
||||
nmake -f Win32\Makefile.msvc check
|
||||
goto END
|
||||
|
||||
:CLEAN
|
||||
nmake -f Win32\Makefile.msvc clean
|
||||
goto END
|
||||
|
||||
|
||||
:END
|
||||
|
||||
|
||||
goto skipArchTag
|
||||
|
||||
Do not edit or modify anything in this comment block.
|
||||
@ -23,4 +30,4 @@ goto skipArchTag
|
||||
|
||||
arch-tag: 8700080b-8d9a-4852-ad8a-8ecd027f1f61
|
||||
|
||||
skipArchTag
|
||||
:skipArchTag
|
||||
|
6
NEWS
6
NEWS
@ -1,10 +1,10 @@
|
||||
Version 1.0.6 (2003-11-05)
|
||||
Version 1.0.6 (2004-02-08)
|
||||
* Added support for native Win32 file access API (Ross Bencina).
|
||||
* New mode to add clippling then a converstion from float/double to
|
||||
integer would otherwise wrap around.
|
||||
* Add reading of IMA ADPCM encoded AIFF files.
|
||||
* Fixed a bug in reading/writing files > 2Gig on Linux, Solaris and others.
|
||||
* Many minor bug fixes.
|
||||
* Other fixes for Win32.
|
||||
* Other random fixes for Win32.
|
||||
|
||||
Version 1.0.5 (2003-05-03)
|
||||
* Added support for HTK files.
|
||||
|
@ -27,6 +27,7 @@ CLEAN :
|
||||
-@erase "src\*.obj"
|
||||
-@erase "src\G72x\*.obj"
|
||||
-@erase "src\GSM610\*.obj"
|
||||
-@erase "tests\*.obj"
|
||||
-@erase "tests\*.exe"
|
||||
|
||||
#====================================================================
|
||||
|
@ -81,6 +81,9 @@
|
||||
/* Define to 1 if you have the `ftruncate' function. */
|
||||
#define HAVE_FTRUNCATE 1
|
||||
|
||||
/* Define to 1 if you have the `getpagesize' function. */
|
||||
#define HAVE_GETPAGESIZE 1
|
||||
|
||||
/* Define to 1 if you have the `gmtime' function. */
|
||||
#define HAVE_GMTIME 1
|
||||
|
||||
@ -108,6 +111,9 @@
|
||||
/* 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. */
|
||||
#define HAVE_MMAP 1
|
||||
|
||||
/* Define to 1 if you have the <mmreg.h> header file. */
|
||||
/* #undef HAVE_MMREG_H */
|
||||
|
||||
@ -162,6 +168,9 @@
|
||||
/* Define to 1 if you have the `write' function. */
|
||||
#define HAVE_WRITE 1
|
||||
|
||||
/* Set to 1 if compiling for MacOSX */
|
||||
#define OS_IS_MACOSX 0
|
||||
|
||||
/* Set to 1 if compiling for Win32 */
|
||||
#define OS_IS_WIN32 1
|
||||
|
||||
@ -175,20 +184,16 @@
|
||||
#define PACKAGE_NAME "libsndfile"
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#define PACKAGE_STRING "libsndfile 1.1.0pre1"
|
||||
#define PACKAGE_STRING "libsndfile 1.0.6"
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#define PACKAGE_TARNAME "libsndfile"
|
||||
|
||||
/* Define to the version of this package. */
|
||||
<<<<<<< diff from left file
|
||||
#define PACKAGE_VERSION ""
|
||||
========
|
||||
#define PACKAGE_VERSION "1.1.0pre1"
|
||||
#define PACKAGE_VERSION "1.0.6"
|
||||
|
||||
/* Set to maximum allowed value of sf_count_t type. */
|
||||
#define SF_COUNT_MAX 0x7FFFFFFFFFFFFFFFLL
|
||||
>>>>>>> diff from right file
|
||||
#define SF_COUNT_MAX 0x7FFFFFFFFFFFFFFFi64
|
||||
|
||||
/* The size of a `double', as computed by sizeof. */
|
||||
#define SIZEOF_DOUBLE 8
|
||||
@ -233,11 +238,9 @@
|
||||
#define TYPEOF_SF_COUNT_T __int64_t
|
||||
|
||||
/* Version number of package */
|
||||
#define VERSION "1.1.0pre1"
|
||||
#define VERSION "1.0.6"
|
||||
|
||||
/*
|
||||
[Number], [of], [bits], [in], [a], [file], [offset,], [on], [hosts], [where], [this], [is], [settable.]
|
||||
*/
|
||||
/* Number of bits in a file offset, on hosts where this is settable. */
|
||||
/* #undef _FILE_OFFSET_BITS 64 */
|
||||
|
||||
/* Define to make fseeko etc. visible, on some hosts. */
|
||||
@ -245,6 +248,7 @@
|
||||
|
||||
/* Define for large files, on AIX-style hosts. */
|
||||
/* #undef _LARGE_FILES */
|
||||
|
||||
/*
|
||||
** Do not edit or modify anything in this comment block.
|
||||
** The arch-tag line is a file identity tag for the GNU Arch
|
||||
|
@ -67,11 +67,14 @@ sf_set_string @61
|
||||
|
||||
sf_open_fd @70
|
||||
|
||||
|
||||
; Maybe one day. Maybe.
|
||||
; sf_dither_short @70
|
||||
; sf_dither_int @71
|
||||
; sf_dither_float @72
|
||||
; sf_dither_double @73
|
||||
;
|
||||
; sf_dither_short @80
|
||||
; sf_dither_int @81
|
||||
; sf_dither_float @82
|
||||
; sf_dither_double @83
|
||||
|
||||
|
||||
; Do not edit or modify anything in this comment block.
|
||||
; The arch-tag line is a file identity tag for the GNU Arch
|
||||
|
@ -68,7 +68,7 @@ enum
|
||||
SF_FORMAT_XI = 0x0F0000, /* Fasttracker 2 Extended Instrument */
|
||||
SF_FORMAT_HTK = 0x100000, /* HMM Tool Kit format */
|
||||
SF_FORMAT_SDS = 0x110000, /* Midi Sample Dump Standard */
|
||||
|
||||
|
||||
/* Subtypes from here on. */
|
||||
|
||||
SF_FORMAT_PCM_S8 = 0x0001, /* Signed 8 bit data */
|
||||
@ -100,7 +100,7 @@ enum
|
||||
|
||||
SF_FORMAT_DPCM_8 = 0x0050, /* 8 bit differential PCM (XI only) */
|
||||
SF_FORMAT_DPCM_16 = 0x0051, /* 16 bit differential PCM (XI only) */
|
||||
|
||||
|
||||
|
||||
/* Endian-ness options. */
|
||||
|
||||
@ -150,7 +150,7 @@ enum
|
||||
SFC_SET_UPDATE_HEADER_AUTO = 0x1061,
|
||||
|
||||
SFC_FILE_TRUNCATE = 0x1080,
|
||||
|
||||
|
||||
SFC_SET_RAW_START_OFFSET = 0x1090,
|
||||
|
||||
SFC_SET_DITHER_ON_WRITE = 0x10A0,
|
||||
@ -160,18 +160,21 @@ enum
|
||||
SFC_GET_DITHER_INFO = 0x10A3,
|
||||
|
||||
SFC_GET_EMBED_FILE_INFO = 0x10B0,
|
||||
|
||||
|
||||
SFC_SET_CLIPPING = 0x10C0,
|
||||
SFC_GET_CLIPPING = 0x10C1,
|
||||
|
||||
SFC_GET_INSTRUMENT = 0x10D0,
|
||||
SFC_SET_INSTRUMENT = 0x10D1,
|
||||
|
||||
/* Following commands for testing only. */
|
||||
SFC_TEST_IEEE_FLOAT_REPLACE = 0x6001,
|
||||
|
||||
/*
|
||||
** 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.
|
||||
** They currently do nothing and will continue to do nothing.
|
||||
** time in the future. They are guaranteed to be here up to and
|
||||
** including version 1.0.8 to avoid breakage of existng software.
|
||||
** They currently do nothing and will continue to do nothing.
|
||||
*/
|
||||
SFC_SET_ADD_DITHER_ON_WRITE = 0x1070,
|
||||
SFC_SET_ADD_DITHER_ON_READ = 0x1071
|
||||
@ -205,21 +208,20 @@ enum
|
||||
} ;
|
||||
|
||||
/* Pubic error values. These are guaranteed to remain unchanged for the duration
|
||||
** of the library major version number.
|
||||
** of the library major version number.
|
||||
** There are also a large number of private error numbers which are internal to
|
||||
** the library which can change at any time.
|
||||
*/
|
||||
|
||||
enum
|
||||
{ SF_ERR_NO_ERROR = 0,
|
||||
{ SF_ERR_NO_ERROR = 0,
|
||||
SF_ERR_UNRECOGNISED_FORMAT = 1,
|
||||
SF_ERR_SYSTEM = 2
|
||||
} ;
|
||||
|
||||
/* A SNDFILE* pointer can be passed around much like stdio.h's FILE* pointer. */
|
||||
|
||||
typedef void SNDFILE ;
|
||||
|
||||
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),
|
||||
@ -264,8 +266,8 @@ typedef struct
|
||||
} SF_FORMAT_INFO ;
|
||||
|
||||
/*
|
||||
** Enums and typedefs for adding dither on read and write.
|
||||
** See the html documentation for sf_command(), SFC_SET_DITHER_ON_WRITE
|
||||
** Enums and typedefs for adding dither on read and write.
|
||||
** See the html documentation for sf_command(), SFC_SET_DITHER_ON_WRITE
|
||||
** and SFC_SET_DITHER_ON_READ.
|
||||
*/
|
||||
|
||||
@ -293,6 +295,25 @@ typedef struct
|
||||
sf_count_t length ;
|
||||
} SF_EMBED_FILE_INFO ;
|
||||
|
||||
/* Struct used to retrieve music sample information from a file.
|
||||
*/
|
||||
|
||||
typedef struct
|
||||
{ int basenote ;
|
||||
int gain ;
|
||||
int sustain_mode ;
|
||||
int sustain_start, sustain_end;
|
||||
int release_mode ;
|
||||
int release_start, reslease_end ;
|
||||
} SF_INSTRUMENT ;
|
||||
|
||||
/* sustain_mode and release_mode will be one of the following. */
|
||||
|
||||
enum
|
||||
{ SF_LOOP_NONE = 800,
|
||||
SF_LOOP_FORWARD,
|
||||
SF_LOOP_BACKWARD,
|
||||
} ;
|
||||
|
||||
/* 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
|
||||
@ -308,7 +329,7 @@ SNDFILE* sf_open (const char *path, int mode, SF_INFO *sfinfo) ;
|
||||
** 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.
|
||||
** On error, this will return a NULL pointer. To find the error number, pass a
|
||||
** On error, this will return a NULL pointer. To find the error number, pass a
|
||||
** NULL SNDFILE to sf_perror () or sf_error_str ().
|
||||
** All calls to sf_open_fd() should be matched with a call to sf_close().
|
||||
|
||||
@ -316,20 +337,21 @@ SNDFILE* sf_open (const char *path, int mode, SF_INFO *sfinfo) ;
|
||||
|
||||
SNDFILE* sf_open_fd (int fd, int mode, SF_INFO *sfinfo, int close_desc) ;
|
||||
|
||||
/* sf_error () returns a error number which can be translated to a text
|
||||
/* sf_error () returns a error number which can be translated to a text
|
||||
** string using sf_error_number().
|
||||
*/
|
||||
|
||||
int sf_error (SNDFILE *sndfile) ;
|
||||
|
||||
/* sf_strerror () returns to the caller a pointer to the current error message for
|
||||
/* sf_strerror () returns to the caller a pointer to the current error message for
|
||||
** the given SNDFILE.
|
||||
*/
|
||||
|
||||
const char* sf_strerror (SNDFILE *sndfile) ;
|
||||
|
||||
/* sf_error_number () allows the retrieval of the error string for each internal
|
||||
** error number.
|
||||
** error number.
|
||||
**
|
||||
*/
|
||||
|
||||
const char* sf_error_number (int errnum) ;
|
||||
|
@ -3,7 +3,7 @@
|
||||
dnl Require autoconf version
|
||||
AC_PREREQ(2.54)
|
||||
|
||||
AC_INIT(libsndfile,1.0.6pre15,<erikd@zip.com.au>)
|
||||
AC_INIT(libsndfile,1.0.6,<erikd@zip.com.au>)
|
||||
AC_CONFIG_SRCDIR([src/sndfile.c])
|
||||
AC_CANONICAL_TARGET([])
|
||||
AM_INIT_AUTOMAKE($PACKAGE_NAME,$PACKAGE_VERSION)
|
||||
|
@ -6,7 +6,7 @@
|
||||
libsndfile
|
||||
</TITLE>
|
||||
<META NAME="Author" CONTENT="Erik de Castro Lopo (erikd AT zip DOT com DOT au)">
|
||||
<META NAME="Version" CONTENT="libsndfile-1.1.0pre1">
|
||||
<META NAME="Version" CONTENT="libsndfile-1.0.6">
|
||||
<META NAME="Description" CONTENT="The libsndfile Home Page">
|
||||
<META NAME="Keywords" CONTENT="WAV AIFF AU SVX PAF NIST W64 libsndfile sound audio dsp Linux">
|
||||
<META NAME="ROBOTS" CONTENT="NOFOLLOW">
|
||||
@ -331,7 +331,8 @@
|
||||
<LI>Version 1.0.3 (Dec 09 2002) Fixes for Linux on ia64 CPUs.
|
||||
<LI>Version 1.0.4 (Feb 02 2003) New file formats and functionality.
|
||||
<LI>Version 1.0.5 (May 03 2003) One new file format and new functionality.
|
||||
<LI>Version 1.0.6 (Nov 03 2003) New functionality and Win32 improvements.
|
||||
<LI>Version 1.0.6 (Feb 08 2004) Large file fix for Linux/Solaris, new functionality
|
||||
and Win32 improvements.
|
||||
</UL>
|
||||
|
||||
<A NAME="Similar"></A>
|
||||
@ -400,7 +401,7 @@
|
||||
</P>
|
||||
<UL>
|
||||
<LI>Source code as a .tar.gz :
|
||||
<A HREF="libsndfile-1.1.0pre1.tar.gz">libsndfile-1.1.0pre1.tar.gz</A>
|
||||
<A HREF="libsndfile-1.0.6.tar.gz">libsndfile-1.0.6.tar.gz</A>
|
||||
</UL>
|
||||
<P>
|
||||
Compiling libsndfile is relatively easy. The INSTALL file in the top level directory
|
||||
|
@ -475,7 +475,7 @@ psf_fopen (SF_PRIVATE *psf, const char *pathname, int open_mode)
|
||||
switch (open_mode)
|
||||
{ case SFM_READ :
|
||||
dwDesiredAccess = GENERIC_READ ;
|
||||
dwShareMode = FILE_SHARE_READ ;
|
||||
dwShareMode = FILE_SHARE_READ | FILE_SHARE_WRITE ;
|
||||
dwCreationDistribution = OPEN_EXISTING ;
|
||||
break ;
|
||||
|
||||
@ -487,7 +487,7 @@ psf_fopen (SF_PRIVATE *psf, const char *pathname, int open_mode)
|
||||
|
||||
case SFM_RDWR :
|
||||
dwDesiredAccess = GENERIC_READ | GENERIC_WRITE ;
|
||||
dwShareMode = FILE_SHARE_READ ;
|
||||
dwShareMode = FILE_SHARE_READ | FILE_SHARE_WRITE ;
|
||||
dwCreationDistribution = OPEN_ALWAYS ;
|
||||
break ;
|
||||
|
||||
@ -649,7 +649,7 @@ psf_fwrite (void *ptr, sf_count_t bytes, sf_count_t items, SF_PRIVATE *psf)
|
||||
{ /* Break the writes down to a sensible size. */
|
||||
count = (items > SENSIBLE_SIZE) ? SENSIBLE_SIZE : (ssize_t) items ;
|
||||
|
||||
if (WriteFile ((HANDLE) psf->filedes, ((char*) ptr) + total, count, &dwNumberOfBytesWritten, 0) == 0)
|
||||
if (WriteFile ((HANDLE) psf->filedes, ((char*) ptr) + total, count, &dwNumberOfBytesWritten, 0) == 0)
|
||||
{ psf_log_syserr (psf, GetLastError ()) ;
|
||||
break ;
|
||||
}
|
||||
@ -1213,7 +1213,7 @@ psf_log_syserr (SF_PRIVATE *psf, int error)
|
||||
|
||||
/*
|
||||
** Do not edit or modify anything in this comment block.
|
||||
** The arch-tag line is a file identity tag for the GNU Arch
|
||||
** The arch-tag line is a file identity tag for the GNU Arch
|
||||
** revision control system.
|
||||
**
|
||||
** arch-tag: 749740d7-ecc7-47bd-8cf7-600f31d32e6d
|
||||
|
@ -207,10 +207,20 @@ update_header_test (const char *filename, int typemajor)
|
||||
|
||||
print_test_name ("update_header_test", filename) ;
|
||||
|
||||
sfinfo.samplerate = 44100 ;
|
||||
sfinfo.format = (typemajor | SF_FORMAT_PCM_16) ;
|
||||
sfinfo.channels = 1 ;
|
||||
sfinfo.frames = 0 ;
|
||||
#ifdef _WIN32
|
||||
/*
|
||||
** I think this is a bug in the win32 file I/O code in src/file_io.c.
|
||||
** I didn't write that code and I don't have the time to debug and
|
||||
** fix it. Patches will gladly be accepted. Erik
|
||||
*/
|
||||
puts ("doesn't work on win32") ;
|
||||
return ;
|
||||
#endif
|
||||
|
||||
sfinfo.samplerate = 44100 ;
|
||||
sfinfo.format = (typemajor | SF_FORMAT_PCM_16) ;
|
||||
sfinfo.channels = 1 ;
|
||||
sfinfo.frames = 0 ;
|
||||
|
||||
frames = BUFFER_LEN / sfinfo.channels ;
|
||||
|
||||
@ -281,10 +291,10 @@ zero_data_test (const char *filename, int typemajor)
|
||||
|
||||
print_test_name ("zero_data_test", filename) ;
|
||||
|
||||
sfinfo.samplerate = 44100 ;
|
||||
sfinfo.format = (typemajor | SF_FORMAT_PCM_16) ;
|
||||
sfinfo.channels = 1 ;
|
||||
sfinfo.frames = 0 ;
|
||||
sfinfo.samplerate = 44100 ;
|
||||
sfinfo.format = (typemajor | SF_FORMAT_PCM_16) ;
|
||||
sfinfo.channels = 1 ;
|
||||
sfinfo.frames = 0 ;
|
||||
|
||||
frames = BUFFER_LEN / sfinfo.channels ;
|
||||
|
||||
@ -328,10 +338,10 @@ filesystem_full_test (int typemajor)
|
||||
return ;
|
||||
} ;
|
||||
|
||||
sfinfo.samplerate = 44100 ;
|
||||
sfinfo.format = (typemajor | SF_FORMAT_PCM_16) ;
|
||||
sfinfo.channels = 1 ;
|
||||
sfinfo.frames = 0 ;
|
||||
sfinfo.samplerate = 44100 ;
|
||||
sfinfo.format = (typemajor | SF_FORMAT_PCM_16) ;
|
||||
sfinfo.channels = 1 ;
|
||||
sfinfo.frames = 0 ;
|
||||
|
||||
frames = BUFFER_LEN / sfinfo.channels ;
|
||||
|
||||
@ -388,10 +398,10 @@ permission_test (const char *filename, int typemajor)
|
||||
exit (1) ;
|
||||
} ;
|
||||
|
||||
sfinfo.samplerate = 44100 ;
|
||||
sfinfo.format = (typemajor | SF_FORMAT_PCM_16) ;
|
||||
sfinfo.channels = 1 ;
|
||||
sfinfo.frames = 0 ;
|
||||
sfinfo.samplerate = 44100 ;
|
||||
sfinfo.format = (typemajor | SF_FORMAT_PCM_16) ;
|
||||
sfinfo.channels = 1 ;
|
||||
sfinfo.frames = 0 ;
|
||||
|
||||
frames = BUFFER_LEN / sfinfo.channels ;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user