ref: 1094247c75da59c9ae90fbc3ce922846ed448ae1
parent: 5c88b8add0b59701ee9ac4ec6df9b1a6ad6764e1
author: cbagwell <cbagwell>
date: Sat Oct 11 13:16:20 EDT 2008
Rename files not used by sox.c to be lsx_*.
--- a/src/adpcms.c
+++ b/src/adpcms.c
@@ -109,7 +109,7 @@
*/
/******************************************************************************
- * Function : sox_adpcm_reset
+ * Function : lsx_adpcm_reset
* Description: Resets the ADPCM codec state.
* Parameters : state - ADPCM state structure
* type - SOX_ENCODING_OKI_ADPCM or SOX_ENCODING_IMA_ADPCM
@@ -119,7 +119,7 @@
* the decoder between frames.
******************************************************************************/
-void sox_adpcm_reset(adpcm_io_t * state, sox_encoding_t type)
+void lsx_adpcm_reset(adpcm_io_t * state, sox_encoding_t type)
{
state->file.count = 0;
state->file.pos = 0;
@@ -130,7 +130,7 @@
}
/******************************************************************************
- * Function : adpcm_start
+ * Function : lsx_adpcm_start
* Description: Initialises the file parameters and ADPCM codec state.
* Parameters : ft - file info structure
* state - ADPCM state structure
@@ -153,23 +153,23 @@
state->file.size = sox_globals.bufsiz;
ft->signal.channels = 1;
- sox_adpcm_reset(state, type);
+ lsx_adpcm_reset(state, type);
return lsx_rawstart(ft, sox_true, sox_false, sox_true, type, 4);
}
-int sox_adpcm_oki_start(sox_format_t * ft, adpcm_io_t * state)
+int lsx_adpcm_oki_start(sox_format_t * ft, adpcm_io_t * state)
{
return adpcm_start(ft, state, SOX_ENCODING_OKI_ADPCM);
}
-int sox_adpcm_ima_start(sox_format_t * ft, adpcm_io_t * state)
+int lsx_adpcm_ima_start(sox_format_t * ft, adpcm_io_t * state)
{
return adpcm_start(ft, state, SOX_ENCODING_IMA_ADPCM);
}
/******************************************************************************
- * Function : sox_adpcm_read
+ * Function : lsx_adpcm_read
* Description: Converts the OKI ADPCM 4-bit samples to 16-bit signed PCM and
* then scales the samples to full sox_sample_t range.
* Parameters : ft - file info structure
@@ -181,7 +181,7 @@
* Notes :
******************************************************************************/
-size_t sox_adpcm_read(sox_format_t * ft, adpcm_io_t * state, sox_sample_t * buffer, size_t len)
+size_t lsx_adpcm_read(sox_format_t * ft, adpcm_io_t * state, sox_sample_t * buffer, size_t len)
{
size_t n = 0;
uint8_t byte;
@@ -219,7 +219,7 @@
* Notes :
******************************************************************************/
-int sox_adpcm_stopread(sox_format_t * ft UNUSED, adpcm_io_t * state)
+int lsx_adpcm_stopread(sox_format_t * ft UNUSED, adpcm_io_t * state)
{
if (state->encoder.errors)
sox_warn("%s: ADPCM state errors: %u", ft->filename, state->encoder.errors);
@@ -243,7 +243,7 @@
* Notes :
******************************************************************************/
-size_t sox_adpcm_write(sox_format_t * ft, adpcm_io_t * state, const sox_sample_t * buffer, size_t length)
+size_t lsx_adpcm_write(sox_format_t * ft, adpcm_io_t * state, const sox_sample_t * buffer, size_t length)
{
size_t count = 0;
uint8_t byte = state->store.byte;
@@ -278,7 +278,7 @@
}
/******************************************************************************
- * Function : sox_adpcm_flush
+ * Function : lsx_adpcm_flush
* Description: Flushes any leftover samples.
* Parameters : ft - file info structure
* state - ADPCM state structure
@@ -287,7 +287,7 @@
* Notes : 1. Called directly for writing framed formats
******************************************************************************/
-void sox_adpcm_flush(sox_format_t * ft, adpcm_io_t * state)
+void lsx_adpcm_flush(sox_format_t * ft, adpcm_io_t * state)
{
uint8_t byte = state->store.byte;
uint8_t flag = state->store.flag;
@@ -303,7 +303,7 @@
}
/******************************************************************************
- * Function : sox_adpcm_stopwrite
+ * Function : lsx_adpcm_stopwrite
* Description: Flushes any leftover samples and frees the internal buffer
* allocated in voxstart/imastart.
* Parameters : ft - file info structure
@@ -313,9 +313,9 @@
* Notes :
******************************************************************************/
-int sox_adpcm_stopwrite(sox_format_t * ft, adpcm_io_t * state)
+int lsx_adpcm_stopwrite(sox_format_t * ft, adpcm_io_t * state)
{
- sox_adpcm_flush(ft, state);
+ lsx_adpcm_flush(ft, state);
free(state->file.buf);
return (SOX_SUCCESS);
}
--- a/src/adpcms.h
+++ b/src/adpcms.h
@@ -45,11 +45,11 @@
} adpcm_io_t;
/* Format methods */
-void sox_adpcm_reset(adpcm_io_t * state, sox_encoding_t type);
-int sox_adpcm_oki_start(sox_format_t * ft, adpcm_io_t * state);
-int sox_adpcm_ima_start(sox_format_t * ft, adpcm_io_t * state);
-size_t sox_adpcm_read(sox_format_t * ft, adpcm_io_t * state, sox_sample_t *buffer, size_t len);
-int sox_adpcm_stopread(sox_format_t * ft, adpcm_io_t * state);
-size_t sox_adpcm_write(sox_format_t * ft, adpcm_io_t * state, const sox_sample_t *buffer, size_t length);
-void sox_adpcm_flush(sox_format_t * ft, adpcm_io_t * state);
-int sox_adpcm_stopwrite(sox_format_t * ft, adpcm_io_t * state);
+void lsx_adpcm_reset(adpcm_io_t * state, sox_encoding_t type);
+int lsx_adpcm_oki_start(sox_format_t * ft, adpcm_io_t * state);
+int lsx_adpcm_ima_start(sox_format_t * ft, adpcm_io_t * state);
+size_t lsx_adpcm_read(sox_format_t * ft, adpcm_io_t * state, sox_sample_t *buffer, size_t len);
+int lsx_adpcm_stopread(sox_format_t * ft, adpcm_io_t * state);
+size_t lsx_adpcm_write(sox_format_t * ft, adpcm_io_t * state, const sox_sample_t *buffer, size_t length);
+void lsx_adpcm_flush(sox_format_t * ft, adpcm_io_t * state);
+int lsx_adpcm_stopwrite(sox_format_t * ft, adpcm_io_t * state);
--- a/src/aifc-fmt.c
+++ b/src/aifc-fmt.c
@@ -26,9 +26,9 @@
static sox_format_handler_t const sox_aifc_format = {SOX_LIB_VERSION_CODE,
"AIFF-C (not compressed, linear), defined in DAVIC 1.4 Part 9 Annex B",
names, SOX_FILE_BIG_END,
- sox_aiffstartread, sox_aiffread, sox_aiffstopread,
- sox_aifcstartwrite, sox_aiffwrite, sox_aifcstopwrite,
- sox_aiffseek, write_encodings, NULL, sizeof(aiff_priv_t)
+ lsx_aiffstartread, lsx_aiffread, lsx_aiffstopread,
+ lsx_aifcstartwrite, lsx_aiffwrite, lsx_aifcstopwrite,
+ lsx_aiffseek, write_encodings, NULL, sizeof(aiff_priv_t)
};
return &sox_aifc_format;
}
--- a/src/aiff-fmt.c
+++ b/src/aiff-fmt.c
@@ -25,9 +25,9 @@
SOX_ENCODING_SIGN2, 32, 24, 16, 8, 0, 0};
static sox_format_handler_t const sox_aiff_format = {SOX_LIB_VERSION_CODE,
"AIFF files used on Apple IIc/IIgs and SGI", names, SOX_FILE_BIG_END,
- sox_aiffstartread, sox_aiffread, sox_aiffstopread,
- sox_aiffstartwrite, sox_aiffwrite, sox_aiffstopwrite,
- sox_aiffseek, write_encodings, NULL, sizeof(aiff_priv_t)
+ lsx_aiffstartread, lsx_aiffread, lsx_aiffstopread,
+ lsx_aiffstartwrite, lsx_aiffwrite, lsx_aiffstopwrite,
+ lsx_aiffseek, write_encodings, NULL, sizeof(aiff_priv_t)
};
return &sox_aiff_format;
}
--- a/src/aiff.c
+++ b/src/aiff.c
@@ -38,7 +38,7 @@
/* Private data used by writer */
typedef aiff_priv_t priv_t;
-int sox_aiffseek(sox_format_t * ft, uint64_t offset)
+int lsx_aiffseek(sox_format_t * ft, uint64_t offset)
{
priv_t * aiff = (priv_t *) ft->priv;
size_t new_offset, channel_block, alignment;
@@ -64,7 +64,7 @@
return(ft->sox_errno);
}
-int sox_aiffstartread(sox_format_t * ft)
+int lsx_aiffstartread(sox_format_t * ft)
{
priv_t * aiff = (priv_t *) ft->priv;
char buf[5];
@@ -590,7 +590,7 @@
return(SOX_SUCCESS);
}
-size_t sox_aiffread(sox_format_t * ft, sox_sample_t *buf, size_t len)
+size_t lsx_aiffread(sox_format_t * ft, sox_sample_t *buf, size_t len)
{
priv_t * aiff = (priv_t *) ft->priv;
off_t done;
@@ -604,7 +604,7 @@
return done;
}
-int sox_aiffstopread(sox_format_t * ft)
+int lsx_aiffstopread(sox_format_t * ft)
{
char buf[5];
uint32_t chunksize;
@@ -645,7 +645,7 @@
Strictly spoken this is not legal, but the playaiff utility
will still be able to play the resulting file. */
-int sox_aiffstartwrite(sox_format_t * ft)
+int lsx_aiffstartwrite(sox_format_t * ft)
{
priv_t * aiff = (priv_t *) ft->priv;
int rc;
@@ -666,7 +666,7 @@
return(aiffwriteheader(ft, (size_t) 0x7f000000 / ((ft->encoding.bits_per_sample>>3)*ft->signal.channels)));
}
-size_t sox_aiffwrite(sox_format_t * ft, const sox_sample_t *buf, size_t len)
+size_t lsx_aiffwrite(sox_format_t * ft, const sox_sample_t *buf, size_t len)
{
priv_t * aiff = (priv_t *) ft->priv;
aiff->nsamples += len;
@@ -674,7 +674,7 @@
return(len);
}
-int sox_aiffstopwrite(sox_format_t * ft)
+int lsx_aiffstopwrite(sox_format_t * ft)
{
priv_t * aiff = (priv_t *) ft->priv;
@@ -842,7 +842,7 @@
return(SOX_SUCCESS);
}
-int sox_aifcstartwrite(sox_format_t * ft)
+int lsx_aifcstartwrite(sox_format_t * ft)
{
priv_t * aiff = (priv_t *) ft->priv;
int rc;
@@ -863,7 +863,7 @@
return(aifcwriteheader(ft, (size_t) 0x7f000000 / ((ft->encoding.bits_per_sample >> 3)*ft->signal.channels)));
}
-int sox_aifcstopwrite(sox_format_t * ft)
+int lsx_aifcstopwrite(sox_format_t * ft)
{
priv_t * aiff = (priv_t *) ft->priv;
--- a/src/aiff.h
+++ b/src/aiff.h
@@ -20,12 +20,12 @@
size_t dataStart; /* need to for seeking */
} aiff_priv_t;
-int sox_aiffseek(sox_format_t * ft, uint64_t offset);
-int sox_aiffstartread(sox_format_t * ft);
-size_t sox_aiffread(sox_format_t * ft, sox_sample_t *buf, size_t len);
-int sox_aiffstopread(sox_format_t * ft);
-int sox_aiffstartwrite(sox_format_t * ft);
-size_t sox_aiffwrite(sox_format_t * ft, const sox_sample_t *buf, size_t len);
-int sox_aiffstopwrite(sox_format_t * ft);
-int sox_aifcstartwrite(sox_format_t * ft);
-int sox_aifcstopwrite(sox_format_t * ft);
+int lsx_aiffseek(sox_format_t * ft, uint64_t offset);
+int lsx_aiffstartread(sox_format_t * ft);
+size_t lsx_aiffread(sox_format_t * ft, sox_sample_t *buf, size_t len);
+int lsx_aiffstopread(sox_format_t * ft);
+int lsx_aiffstartwrite(sox_format_t * ft);
+size_t lsx_aiffwrite(sox_format_t * ft, const sox_sample_t *buf, size_t len);
+int lsx_aiffstopwrite(sox_format_t * ft);
+int lsx_aifcstartwrite(sox_format_t * ft);
+int lsx_aifcstopwrite(sox_format_t * ft);
--- a/src/cvsd-fmt.c
+++ b/src/cvsd-fmt.c
@@ -24,8 +24,8 @@
static sox_format_handler_t const handler = {SOX_LIB_VERSION_CODE,
"Headerless MIL Std 188 113 Continuously Variable Slope Delta modulation",
names, SOX_FILE_MONO,
- sox_cvsdstartread, sox_cvsdread, sox_cvsdstopread,
- sox_cvsdstartwrite, sox_cvsdwrite, sox_cvsdstopwrite,
+ lsx_cvsdstartread, lsx_cvsdread, lsx_cvsdstopread,
+ lsx_cvsdstartwrite, lsx_cvsdwrite, lsx_cvsdstopwrite,
lsx_rawseek, write_encodings, NULL, sizeof(cvsd_priv_t)
};
return &handler;
--- a/src/cvsd.c
+++ b/src/cvsd.c
@@ -106,7 +106,7 @@
/* ---------------------------------------------------------------------- */
-int sox_cvsdstartread(sox_format_t * ft)
+int lsx_cvsdstartread(sox_format_t * ft)
{
priv_t *p = (priv_t *) ft->priv;
float *fp1;
@@ -132,7 +132,7 @@
/* ---------------------------------------------------------------------- */
-int sox_cvsdstartwrite(sox_format_t * ft)
+int lsx_cvsdstartwrite(sox_format_t * ft)
{
priv_t *p = (priv_t *) ft->priv;
float *fp1;
@@ -154,7 +154,7 @@
/* ---------------------------------------------------------------------- */
-int sox_cvsdstopwrite(sox_format_t * ft)
+int lsx_cvsdstopwrite(sox_format_t * ft)
{
priv_t *p = (priv_t *) ft->priv;
@@ -170,7 +170,7 @@
/* ---------------------------------------------------------------------- */
-int sox_cvsdstopread(sox_format_t * ft)
+int lsx_cvsdstopread(sox_format_t * ft)
{
priv_t *p = (priv_t *) ft->priv;
@@ -182,7 +182,7 @@
/* ---------------------------------------------------------------------- */
-size_t sox_cvsdread(sox_format_t * ft, sox_sample_t *buf, size_t nsamp)
+size_t lsx_cvsdread(sox_format_t * ft, sox_sample_t *buf, size_t nsamp)
{
priv_t *p = (priv_t *) ft->priv;
size_t done = 0;
@@ -238,7 +238,7 @@
/* ---------------------------------------------------------------------- */
-size_t sox_cvsdwrite(sox_format_t * ft, const sox_sample_t *buf, size_t nsamp)
+size_t lsx_cvsdwrite(sox_format_t * ft, const sox_sample_t *buf, size_t nsamp)
{
priv_t *p = (priv_t *) ft->priv;
size_t done = 0;
@@ -468,7 +468,7 @@
/* ---------------------------------------------------------------------- */
-int sox_dvmsstartread(sox_format_t * ft)
+int lsx_dvmsstartread(sox_format_t * ft)
{
struct dvms_header hdr;
int rc;
@@ -496,7 +496,7 @@
sox_debug("DVMS rate %dbit/s using %gbit/s deviation %g%%",
hdr.Srate*100, ft->signal.rate,
((ft->signal.rate - hdr.Srate*100) * 100) / ft->signal.rate);
- rc = sox_cvsdstartread(ft);
+ rc = lsx_cvsdstartread(ft);
if (rc)
return rc;
@@ -505,12 +505,12 @@
/* ---------------------------------------------------------------------- */
-int sox_dvmsstartwrite(sox_format_t * ft)
+int lsx_dvmsstartwrite(sox_format_t * ft)
{
struct dvms_header hdr;
int rc;
- rc = sox_cvsdstartwrite(ft);
+ rc = lsx_cvsdstartwrite(ft);
if (rc)
return rc;
@@ -529,12 +529,12 @@
/* ---------------------------------------------------------------------- */
-int sox_dvmsstopwrite(sox_format_t * ft)
+int lsx_dvmsstopwrite(sox_format_t * ft)
{
struct dvms_header hdr;
int rc;
- sox_cvsdstopwrite(ft);
+ lsx_cvsdstopwrite(ft);
if (!ft->seekable)
{
sox_warn("File not seekable");
--- a/src/cvsd.h
+++ b/src/cvsd.h
@@ -52,13 +52,13 @@
unsigned cvsd_rate;
} cvsd_priv_t;
-int sox_cvsdstartread(sox_format_t * ft);
-int sox_cvsdstartwrite(sox_format_t * ft);
-size_t sox_cvsdread(sox_format_t * ft, sox_sample_t *buf, size_t nsamp);
-size_t sox_cvsdwrite(sox_format_t * ft, const sox_sample_t *buf, size_t nsamp);
-int sox_cvsdstopread(sox_format_t * ft);
-int sox_cvsdstopwrite(sox_format_t * ft);
+int lsx_cvsdstartread(sox_format_t * ft);
+int lsx_cvsdstartwrite(sox_format_t * ft);
+size_t lsx_cvsdread(sox_format_t * ft, sox_sample_t *buf, size_t nsamp);
+size_t lsx_cvsdwrite(sox_format_t * ft, const sox_sample_t *buf, size_t nsamp);
+int lsx_cvsdstopread(sox_format_t * ft);
+int lsx_cvsdstopwrite(sox_format_t * ft);
-int sox_dvmsstartread(sox_format_t * ft);
-int sox_dvmsstartwrite(sox_format_t * ft);
-int sox_dvmsstopwrite(sox_format_t * ft);
+int lsx_dvmsstartread(sox_format_t * ft);
+int lsx_dvmsstartwrite(sox_format_t * ft);
+int lsx_dvmsstopwrite(sox_format_t * ft);
--- a/src/dvms-fmt.c
+++ b/src/dvms-fmt.c
@@ -24,8 +24,8 @@
static sox_format_handler_t const handler = {SOX_LIB_VERSION_CODE,
"MIL Std 188 113 Continuously Variable Slope Delta modulation with header",
names, SOX_FILE_MONO,
- sox_dvmsstartread, sox_cvsdread, sox_cvsdstopread,
- sox_dvmsstartwrite, sox_cvsdwrite, sox_dvmsstopwrite,
+ lsx_dvmsstartread, lsx_cvsdread, lsx_cvsdstopread,
+ lsx_dvmsstartwrite, lsx_cvsdwrite, lsx_dvmsstopwrite,
NULL, write_encodings, NULL, sizeof(cvsd_priv_t)
};
return &handler;
--- a/src/formats.c
+++ b/src/formats.c
@@ -401,7 +401,7 @@
if (!filetype) {
if (ft->seekable) {
- filetype = detect_magic(ft, find_file_extension(path));
+ filetype = detect_magic(ft, sox_find_file_extension(path));
lsx_rewind(ft);
#if HAVE_MAGIC
if (!filetype) {
@@ -428,7 +428,7 @@
}
}
else {
- if (!(filetype = find_file_extension(path))) {
+ if (!(filetype = sox_find_file_extension(path))) {
sox_fail("can't determine type of `%s'", path);
goto error;
}
@@ -500,7 +500,7 @@
assert(path);
assert(encoding);
if (!filetype)
- filetype = find_file_extension(path);
+ filetype = sox_find_file_extension(path);
if (!filetype || !(handler = sox_find_format(filetype, is_file_extension)) ||
!handler->write_formats)
@@ -693,7 +693,7 @@
ft->handler = *handler;
}
else {
- if (!(filetype = find_file_extension(path))) {
+ if (!(filetype = sox_find_file_extension(path))) {
sox_fail("can't determine type of `%s'", path);
goto error;
}
--- a/src/ima-fmt.c
+++ b/src/ima-fmt.c
@@ -25,8 +25,8 @@
static unsigned const write_encodings[] = {SOX_ENCODING_IMA_ADPCM, 4, 0, 0};
static sox_format_handler_t handler = {SOX_LIB_VERSION_CODE,
"Raw IMA ADPCM", names, SOX_FILE_MONO,
- sox_ima_start, sox_vox_read, sox_vox_stopread,
- sox_ima_start, sox_vox_write, sox_vox_stopwrite,
+ lsx_ima_start, lsx_vox_read, lsx_vox_stopread,
+ lsx_ima_start, lsx_vox_write, lsx_vox_stopwrite,
lsx_rawseek, write_encodings, NULL, sizeof(adpcm_io_t)
};
return &handler;
--- a/src/prc.c
+++ b/src/prc.c
@@ -199,7 +199,7 @@
return SOX_EOF;
} else if (ft->encoding.encoding == SOX_ENCODING_IMA_ADPCM) {
p->frame_samp = 0;
- if (sox_adpcm_ima_start(ft, &p->adpcm))
+ if (lsx_adpcm_ima_start(ft, &p->adpcm))
return SOX_EOF;
}
@@ -269,11 +269,11 @@
sox_debug_more("list length %d", trash);
/* Reset CODEC for start of frame */
- sox_adpcm_reset(&p->adpcm, ft->encoding.encoding);
+ lsx_adpcm_reset(&p->adpcm, ft->encoding.encoding);
}
nsamp = min(p->frame_samp, samp);
p->nsamp += nsamp;
- read = sox_adpcm_read(ft, &p->adpcm, buf, nsamp);
+ read = lsx_adpcm_read(ft, &p->adpcm, buf, nsamp);
p->frame_samp -= read;
sox_debug_more("samples left in this frame: %d", p->frame_samp);
return read;
@@ -288,7 +288,7 @@
priv_t * p = (priv_t *)ft->priv;
if (ft->encoding.encoding == SOX_ENCODING_IMA_ADPCM)
- return sox_adpcm_stopread(ft, &p->adpcm);
+ return lsx_adpcm_stopread(ft, &p->adpcm);
else
return SOX_SUCCESS;
}
@@ -310,7 +310,7 @@
if (lsx_rawstartwrite(ft))
return SOX_EOF;
} else if (ft->encoding.encoding == SOX_ENCODING_IMA_ADPCM) {
- if (sox_adpcm_ima_start(ft, &p->adpcm))
+ if (lsx_adpcm_ima_start(ft, &p->adpcm))
return SOX_EOF;
}
@@ -373,11 +373,11 @@
/* Write length again (seems to be a BListL) */
sox_debug_more("list length %lu", (unsigned long)samp);
lsx_writedw(ft, (unsigned) samp);
- sox_adpcm_reset(&p->adpcm, ft->encoding.encoding);
- written1 = sox_adpcm_write(ft, &p->adpcm, buf + written, samp);
+ lsx_adpcm_reset(&p->adpcm, ft->encoding.encoding);
+ written1 = lsx_adpcm_write(ft, &p->adpcm, buf + written, samp);
if (written1 != samp)
break;
- sox_adpcm_flush(ft, &p->adpcm);
+ lsx_adpcm_flush(ft, &p->adpcm);
written += written1;
}
} else
--- a/src/sox.c
+++ b/src/sox.c
@@ -261,7 +261,7 @@
{
static char const * const no_yes[] = {"no", "yes"};
FILE * const output = sox_mode == sox_soxi? stdout : stderr;
- char const * filetype = find_file_extension(ft->filename);
+ char const * filetype = sox_find_file_extension(ft->filename);
sox_bool show_type = sox_true;
size_t i;
--- a/src/sox.h
+++ b/src/sox.h
@@ -553,6 +553,7 @@
sox_enum_item const * sox_find_enum_text(char const * text, sox_enum_item const * sox_enum_items);
sox_enum_item const * sox_find_enum_value(unsigned value, sox_enum_item const * sox_enum_items);
+char const * sox_find_file_extension(char const * pathname);
char const * sox_sigfigs3(size_t number);
char const * sox_sigfigs3p(double percentage);
--- a/src/util.c
+++ b/src/util.c
@@ -36,7 +36,7 @@
}
#endif
-char const * find_file_extension(char const * pathname)
+char const * sox_find_file_extension(char const * pathname)
{
/* First, chop off any path portions of filename. This
* prevents the next search from considering that part. */
--- a/src/util.h
+++ b/src/util.h
@@ -98,5 +98,3 @@
#define MACHINE_IS_BIGENDIAN 0
#define MACHINE_IS_LITTLEENDIAN 1
#endif
-
-char const * find_file_extension(char const * pathname);
--- a/src/vox-fmt.c
+++ b/src/vox-fmt.c
@@ -25,8 +25,8 @@
static unsigned const write_encodings[] = {SOX_ENCODING_OKI_ADPCM, 4, 0, 0};
static sox_format_handler_t handler = {SOX_LIB_VERSION_CODE,
"Raw OKI/Dialogic ADPCM", names, SOX_FILE_MONO,
- sox_vox_start, sox_vox_read, sox_vox_stopread,
- sox_vox_start, sox_vox_write, sox_vox_stopwrite,
+ lsx_vox_start, lsx_vox_read, lsx_vox_stopread,
+ lsx_vox_start, lsx_vox_write, lsx_vox_stopwrite,
lsx_rawseek, write_encodings, NULL, sizeof(adpcm_io_t)
};
return &handler;
--- a/src/vox.c
+++ b/src/vox.c
@@ -16,32 +16,32 @@
/* .vox doesn't need any private state over and above adpcm_io_t *, so
just have simple wrappers that pass it on directly. */
-int sox_vox_start(sox_format_t * ft)
+int lsx_vox_start(sox_format_t * ft)
{
- return sox_adpcm_oki_start(ft, (adpcm_io_t *)ft->priv);
+ return lsx_adpcm_oki_start(ft, (adpcm_io_t *)ft->priv);
}
-int sox_ima_start(sox_format_t * ft)
+int lsx_ima_start(sox_format_t * ft)
{
- return sox_adpcm_ima_start(ft, (adpcm_io_t *)ft->priv);
+ return lsx_adpcm_ima_start(ft, (adpcm_io_t *)ft->priv);
}
-size_t sox_vox_read(sox_format_t * ft, sox_sample_t *buffer, size_t len)
+size_t lsx_vox_read(sox_format_t * ft, sox_sample_t *buffer, size_t len)
{
- return sox_adpcm_read(ft, (adpcm_io_t *)ft->priv, buffer, len);
+ return lsx_adpcm_read(ft, (adpcm_io_t *)ft->priv, buffer, len);
}
-int sox_vox_stopread(sox_format_t * ft)
+int lsx_vox_stopread(sox_format_t * ft)
{
- return sox_adpcm_stopread(ft, (adpcm_io_t *)ft->priv);
+ return lsx_adpcm_stopread(ft, (adpcm_io_t *)ft->priv);
}
-size_t sox_vox_write(sox_format_t * ft, const sox_sample_t *buffer, size_t length)
+size_t lsx_vox_write(sox_format_t * ft, const sox_sample_t *buffer, size_t length)
{
- return sox_adpcm_write(ft, (adpcm_io_t *)ft->priv, buffer, length);
+ return lsx_adpcm_write(ft, (adpcm_io_t *)ft->priv, buffer, length);
}
-int sox_vox_stopwrite(sox_format_t * ft)
+int lsx_vox_stopwrite(sox_format_t * ft)
{
- return sox_adpcm_stopwrite(ft, (adpcm_io_t *)ft->priv);
+ return lsx_adpcm_stopwrite(ft, (adpcm_io_t *)ft->priv);
}
--- a/src/vox.h
+++ b/src/vox.h
@@ -15,9 +15,9 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-int sox_vox_start(sox_format_t * ft);
-int sox_ima_start(sox_format_t * ft);
-size_t sox_vox_read(sox_format_t * ft, sox_sample_t *buffer, size_t len);
-int sox_vox_stopread(sox_format_t * ft);
-size_t sox_vox_write(sox_format_t * ft, const sox_sample_t *buffer, size_t length);
-int sox_vox_stopwrite(sox_format_t * ft);
+int lsx_vox_start(sox_format_t * ft);
+int lsx_ima_start(sox_format_t * ft);
+size_t lsx_vox_read(sox_format_t * ft, sox_sample_t *buffer, size_t len);
+int lsx_vox_stopread(sox_format_t * ft);
+size_t lsx_vox_write(sox_format_t * ft, const sox_sample_t *buffer, size_t length);
+int lsx_vox_stopwrite(sox_format_t * ft);