1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-18 16:41:14 +02:00

Upgrades libsndfile to 1.0.24.

This commit is contained in:
lllucius
2011-04-03 03:08:57 +00:00
parent dbf2cdf605
commit fa00dd005f
267 changed files with 13363 additions and 14998 deletions

View File

@@ -1,5 +1,5 @@
/*
** Copyright (C) 2001-2009 Erik de Castro Lopo <erikd@mega-nerd.com>
** Copyright (C) 2001-2011 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 General Public License as published by
@@ -138,7 +138,7 @@ stdin_test (int typemajor, int count)
SNDFILE *file ;
SF_INFO sfinfo ;
int k, total ;
int k, total, err ;
if (typemajor == SF_FORMAT_RAW)
{ sfinfo.samplerate = 44100 ;
@@ -147,15 +147,21 @@ stdin_test (int typemajor, int count)
sfinfo.frames = 0 ;
}
else
sfinfo.format = 0 ;
memset (&sfinfo, 0, sizeof (sfinfo)) ;
if (! (file = sf_open ("-", SFM_READ, &sfinfo)))
{ fprintf (stderr, "sf_open_read failed with error : ") ;
if ((file = sf_open_fd (STDIN_FILENO, SFM_READ, &sfinfo, SF_TRUE)) == NULL)
{ fprintf (stderr, "sf_open_fd failed with error : ") ;
puts (sf_strerror (NULL)) ;
dump_log_buffer (NULL) ;
exit (1) ;
} ;
err = sf_error (file) ;
if (err != SF_ERR_NO_ERROR)
{ printf ("Line %d : unexpected error : %s\n", __LINE__, sf_error_number (err)) ;
exit (1) ;
} ;
if ((sfinfo.format & SF_FORMAT_TYPEMASK) != typemajor)
{ fprintf (stderr, "\n\nError : File type doesn't match.\n") ;
exit (1) ;