mirror of
https://gitee.com/openharmony/third_party_libsnd
synced 2024-11-23 09:59:54 +00:00
Add file tests/ogg_test.c, hook into build.
This commit is contained in:
parent
a065003d5f
commit
6e46221b5f
@ -7,6 +7,7 @@
|
||||
*.la
|
||||
*.lo
|
||||
*.loT
|
||||
*.oga
|
||||
*.paf
|
||||
*.sd2
|
||||
*.sds
|
||||
@ -46,6 +47,7 @@ sndfile.pc
|
||||
src/*sndfile.def
|
||||
src/FLAC/src/test_grabbag/cuesheet/test_cuesheet
|
||||
src/FLAC/src/test_grabbag/picture/test_picture
|
||||
src/FLAC/src/test_libFLAC/matrix
|
||||
src/FLAC/src/test_libFLAC/test_libFLAC
|
||||
src/FLAC/src/test_seeking/test_seeking
|
||||
src/FLAC/src/test_streams/test_streams
|
||||
@ -82,4 +84,3 @@ tests/sfversion
|
||||
tests/utils.c
|
||||
tests/utils.h
|
||||
tests/write_read_test.c
|
||||
src/FLAC/src/test_libFLAC/matrix
|
||||
|
@ -12,7 +12,7 @@ noinst_PROGRAMS = sfversion floating_point_test write_read_test \
|
||||
pcm_test headerless_test pipe_test benchmark header_test misc_test \
|
||||
raw_test string_test open_fail_test multi_file_test dither_test \
|
||||
scale_clip_test win32_test fix_this aiff_rw_test virtual_io_test \
|
||||
locale_test largefile_test win32_ordinal_test $(CPP_TEST)
|
||||
locale_test largefile_test win32_ordinal_test ogg_test $(CPP_TEST)
|
||||
|
||||
SNDFILEDIR = ../src
|
||||
INCLUDES = -I$(srcdir)/$(SNDFILEDIR)
|
||||
@ -109,6 +109,9 @@ multi_file_test_LDADD = $(SNDFILEDIR)/libsndfile.la
|
||||
virtual_io_test_SOURCES = virtual_io_test.c utils.c
|
||||
virtual_io_test_LDADD = $(SNDFILEDIR)/libsndfile.la
|
||||
|
||||
ogg_test_SOURCES = ogg_test.c utils.c
|
||||
ogg_test_LDADD = $(SNDFILEDIR)/libsndfile.la
|
||||
|
||||
win32_test_SOURCES = win32_test.c
|
||||
win32_test_LDADD =
|
||||
|
||||
|
46
tests/ogg_test.c
Normal file
46
tests/ogg_test.c
Normal file
@ -0,0 +1,46 @@
|
||||
/*
|
||||
** Copyright (C) 2007 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
|
||||
** the Free Software Foundation; either version 2 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 General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU 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 <math.h>
|
||||
|
||||
#include <sndfile.h>
|
||||
|
||||
#include "utils.h"
|
||||
#include "generate.h"
|
||||
|
||||
#define SAMPLE_RATE 44100
|
||||
#define DATA_LENGTH (2 * SAMPLE_RATE)
|
||||
|
||||
|
||||
int
|
||||
main (void)
|
||||
{ const char * filename = "vorbis.oga" ;
|
||||
|
||||
print_test_name ("ogg test",filename) ;
|
||||
|
||||
puts ("ok") ;
|
||||
|
||||
return 0 ;
|
||||
} /* main */
|
||||
|
Loading…
Reference in New Issue
Block a user