mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-13 23:54:35 +00:00
Initial commit
added libraries: opus flac libsndfile updated: libvorbis libogg openal - Everything works as expected for now. Bare in mind libsndfile needed the check for whether or not it could find the xiph libraries removed in order for this to work.
This commit is contained in:
parent
05a083ca6f
commit
a745fc3757
1954 changed files with 431332 additions and 21037 deletions
61
Engine/lib/libsndfile/src/test_binheader_writef.c
Normal file
61
Engine/lib/libsndfile/src/test_binheader_writef.c
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
/*
|
||||
** Copyright (C) 2017 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
|
||||
** the Free Software Foundation; either version 2.1 of the License, or
|
||||
** (at your option) any later version.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
** GNU Lesser General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public License
|
||||
** along with this program; if not, write to the Free Software
|
||||
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "sfconfig.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#include "test_main.h"
|
||||
|
||||
void
|
||||
test_binheader_writef (void)
|
||||
{ char buffer [18] ;
|
||||
SF_PRIVATE sf_private, *psf ;
|
||||
int k, errors = 0 ;
|
||||
|
||||
print_test_name ("Testing binheader_writef") ;
|
||||
|
||||
memset (&sf_private, 0, sizeof (sf_private)) ;
|
||||
|
||||
psf = &sf_private ;
|
||||
for (k = 0 ; errors == 0 && k < 10 ; k++)
|
||||
{ psf_strlcpy (buffer, sizeof (buffer), "abcdefghijklmnop") ;
|
||||
buffer [k] = 0 ;
|
||||
|
||||
psf_binheader_writef (psf, "Ep", BHWp (buffer)) ;
|
||||
|
||||
if ((psf->header.indx & 1) != 0)
|
||||
errors = 1 ;
|
||||
} ;
|
||||
|
||||
free (psf->header.ptr) ;
|
||||
|
||||
if (errors)
|
||||
{ puts ("\nExiting due to errors.\n") ;
|
||||
exit (1) ;
|
||||
} ;
|
||||
|
||||
puts ("ok") ;
|
||||
} /* test_log_printf */
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue