From 36543549401fa720d0bae712b9c37755cdc00e8b Mon Sep 17 00:00:00 2001 From: xufulong Date: Tue, 5 Oct 2021 17:23:15 +0800 Subject: [PATCH] remove cdr.c --- app/src/main/cpp/sox/CmakeLists.txt | 2 -- app/src/main/cpp/sox/cdr.c | 49 ----------------------------- app/src/main/cpp/sox/formats.h | 2 +- 3 files changed, 1 insertion(+), 52 deletions(-) delete mode 100644 app/src/main/cpp/sox/cdr.c diff --git a/app/src/main/cpp/sox/CmakeLists.txt b/app/src/main/cpp/sox/CmakeLists.txt index cd5975d..420c15e 100644 --- a/app/src/main/cpp/sox/CmakeLists.txt +++ b/app/src/main/cpp/sox/CmakeLists.txt @@ -87,8 +87,6 @@ set(formats_srcs adpcms.h adpcms.c al-fmt.c - avr.c - cdr.c cvsd.h cvsd.c cvsd-fmt.c diff --git a/app/src/main/cpp/sox/cdr.c b/app/src/main/cpp/sox/cdr.c deleted file mode 100644 index 0b6b061..0000000 --- a/app/src/main/cpp/sox/cdr.c +++ /dev/null @@ -1,49 +0,0 @@ -/* libSoX file format: cdda (c) 2006-8 SoX contributors - * Based on an original idea by David Elliott - * - * This library 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 library 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 library; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include "sox_i.h" - -static int start(sox_format_t * ft) -{ - return lsx_check_read_params(ft, 2, 44100., SOX_ENCODING_SIGN2, 16, (uint64_t)0, sox_true); -} - -static int stopwrite(sox_format_t * ft) -{ - unsigned const sector_num_samples = 588 * ft->signal.channels; - unsigned i = ft->olength % sector_num_samples; - - if (i) while (i++ < sector_num_samples) /* Pad with silence to multiple */ - lsx_writew(ft, 0); /* of 1/75th of a second. */ - return SOX_SUCCESS; -} - -LSX_FORMAT_HANDLER(cdr) -{ - static char const * const names[] = {"cdda", "cdr", NULL}; - static unsigned const write_encodings[] = {SOX_ENCODING_SIGN2, 16, 0, 0}; - static sox_rate_t const write_rates[] = {44100, 0}; - static sox_format_handler_t handler = {SOX_LIB_VERSION_CODE, - "Red Book Compact Disc Digital Audio", - names, SOX_FILE_BIG_END|SOX_FILE_STEREO, - start, lsx_rawread, NULL, - NULL, lsx_rawwrite, stopwrite, - lsx_rawseek, write_encodings, write_rates, 0 - }; - return &handler; -} diff --git a/app/src/main/cpp/sox/formats.h b/app/src/main/cpp/sox/formats.h index f199af8..0e78ada 100644 --- a/app/src/main/cpp/sox/formats.h +++ b/app/src/main/cpp/sox/formats.h @@ -22,7 +22,7 @@ FORMAT(al) // FORMAT(au) // FORMAT(avr) - FORMAT(cdr) +// FORMAT(cdr) FORMAT(cvsd) FORMAT(cvu) FORMAT(dat)