mirror of
https://github.com/cookiengineer/audacity
synced 2025-11-21 16:37:12 +01:00
Update libsndfile to 1.0.29pre2+git
This pulls in MANY (over 890) changes compared to our from our current 1.0.24 version.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
** Copyright (C) 2002-2011 Erik de Castro Lopo <erikd@mega-nerd.com>
|
||||
** Copyright (C) 2002-2014 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
|
||||
@@ -22,16 +22,19 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
#if HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#else
|
||||
#include "sf_unistd.h"
|
||||
#endif
|
||||
|
||||
#include <sndfile.h>
|
||||
|
||||
#include "utils.h"
|
||||
|
||||
#define BUFFER_LEN (1<<10)
|
||||
#define BUFFER_LEN (1 << 10)
|
||||
#define LOG_BUFFER_SIZE 1024
|
||||
|
||||
static void raw_offset_test (const char *filename, int typeminor) ;
|
||||
@@ -60,7 +63,7 @@ raw_offset_test (const char *filename, int typeminor)
|
||||
{ SNDFILE *sndfile ;
|
||||
SF_INFO sfinfo ;
|
||||
sf_count_t start ;
|
||||
int k, frames ;
|
||||
int k ;
|
||||
|
||||
print_test_name ("raw_offset_test", filename) ;
|
||||
|
||||
@@ -69,8 +72,6 @@ raw_offset_test (const char *filename, int typeminor)
|
||||
sfinfo.channels = 1 ;
|
||||
sfinfo.frames = 0 ;
|
||||
|
||||
frames = BUFFER_LEN / sfinfo.channels ;
|
||||
|
||||
sndfile = test_open_file_or_die (filename, SFM_RDWR, &sfinfo, SF_TRUE, __LINE__) ;
|
||||
|
||||
start = 0 ;
|
||||
@@ -85,8 +86,8 @@ raw_offset_test (const char *filename, int typeminor)
|
||||
sndfile = test_open_file_or_die (filename, SFM_READ, &sfinfo, SF_TRUE, __LINE__) ;
|
||||
check_log_buffer_or_die (sndfile, __LINE__) ;
|
||||
|
||||
if (abs (BUFFER_LEN - sfinfo.frames) > 1)
|
||||
{ printf ("\n\nLine %d : Incorrect sample count (%ld should be %d)\n", __LINE__, SF_COUNT_TO_LONG (sfinfo.frames), BUFFER_LEN) ;
|
||||
if (ABS (BUFFER_LEN - sfinfo.frames) > 1)
|
||||
{ printf ("\n\nLine %d : Incorrect sample count (%" PRId64 " should be %d)\n", __LINE__, sfinfo.frames, BUFFER_LEN) ;
|
||||
dump_log_buffer (sndfile) ;
|
||||
exit (1) ;
|
||||
} ;
|
||||
|
||||
Reference in New Issue
Block a user