From 6c0b78e6f6735085d7379ac2b9499f47bfda94ea Mon Sep 17 00:00:00 2001 From: theogf Date: Mon, 5 Feb 2024 18:34:51 +0100 Subject: [PATCH] use sox_uint64 where necessary --- src/flac.c | 2 +- src/mp3.c | 2 +- src/opus.c | 2 +- src/prc.c | 2 +- src/raw.c | 2 +- src/skelform.c | 2 +- src/smp.c | 2 +- src/sndfile.c | 2 +- src/sox_i.h | 2 +- src/vorbis.c | 2 +- src/wav.c | 2 +- src/wavpack.c | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/flac.c b/src/flac.c index 4abcc580..6729f5b2 100644 --- a/src/flac.c +++ b/src/flac.c @@ -582,7 +582,7 @@ static int stop_write(sox_format_t * const ft) -static int seek(sox_format_t * ft, uint64_t offset) +static int seek(sox_format_t * ft, sox_uint64_t offset) { priv_t * p = (priv_t *)ft->priv; p->seek_offset = offset; diff --git a/src/mp3.c b/src/mp3.c index 1fd144d1..b75e13b5 100644 --- a/src/mp3.c +++ b/src/mp3.c @@ -559,7 +559,7 @@ static int stopread(sox_format_t * ft) return SOX_SUCCESS; } -static int sox_mp3seek(sox_format_t * ft, uint64_t offset) +static int sox_mp3seek(sox_format_t * ft, sox_uint64_t offset) { priv_t * p = (priv_t *) ft->priv; size_t initial_bitrate = p->Frame.header.bitrate; diff --git a/src/opus.c b/src/opus.c index 49fa74be..787a1e50 100644 --- a/src/opus.c +++ b/src/opus.c @@ -215,7 +215,7 @@ static int stopread(sox_format_t * ft) return (SOX_SUCCESS); } -static int seek(sox_format_t * ft, uint64_t offset) +static int seek(sox_format_t * ft, sox_uint64_t offset) { priv_t * vb = (priv_t *) ft->priv; diff --git a/src/prc.c b/src/prc.c index 58f765ed..b15f647f 100644 --- a/src/prc.c +++ b/src/prc.c @@ -68,7 +68,7 @@ typedef struct { static void prcwriteheader(sox_format_t * ft); -static int seek(sox_format_t * ft, uint64_t offset) +static int seek(sox_format_t * ft, sox_uint64_t offset) { priv_t * p = (priv_t *)ft->priv; if (ft->encoding.encoding == SOX_ENCODING_ALAW) diff --git a/src/raw.c b/src/raw.c index 6c0eaa1b..e7cbcd45 100644 --- a/src/raw.c +++ b/src/raw.c @@ -19,7 +19,7 @@ typedef sox_int16_t sox_int13_t; #define SOX_SAMPLE_TO_ULAW_BYTE(d,c) sox_14linear2ulaw(SOX_SAMPLE_TO_UNSIGNED(14,d,c) - 0x2000) #define SOX_SAMPLE_TO_ALAW_BYTE(d,c) sox_13linear2alaw(SOX_SAMPLE_TO_UNSIGNED(13,d,c) - 0x1000) -int lsx_rawseek(sox_format_t * ft, uint64_t offset) +int lsx_rawseek(sox_format_t * ft, sox_uint64_t offset) { return lsx_offset_seek(ft, (off_t)ft->data_start, (off_t)offset); } diff --git a/src/skelform.c b/src/skelform.c index 793c767e..412bea5d 100644 --- a/src/skelform.c +++ b/src/skelform.c @@ -183,7 +183,7 @@ static int stopwrite(sox_format_t UNUSED * ft) return SOX_SUCCESS; } -static int seek(sox_format_t UNUSED * ft, uint64_t UNUSED offset) +static int seek(sox_format_t UNUSED * ft, sox_uint64_t UNUSED offset) { /* Seek relative to current position. */ return SOX_SUCCESS; diff --git a/src/smp.c b/src/smp.c index bf8ac632..90197f38 100644 --- a/src/smp.c +++ b/src/smp.c @@ -172,7 +172,7 @@ static int writetrailer(sox_format_t * ft, struct smptrailer *trailer) return(SOX_SUCCESS); } -static int sox_smpseek(sox_format_t * ft, uint64_t offset) +static int sox_smpseek(sox_format_t * ft, sox_uint64_t offset) { uint64_t new_offset; size_t channel_block, alignment; diff --git a/src/sndfile.c b/src/sndfile.c index 1eda79c7..c50864b3 100644 --- a/src/sndfile.c +++ b/src/sndfile.c @@ -479,7 +479,7 @@ static int stopwrite(sox_format_t * ft) return SOX_SUCCESS; } -static int seek(sox_format_t * ft, uint64_t offset) +static int seek(sox_format_t * ft, sox_uint64_t offset) { priv_t * sf = (priv_t *)ft->priv; sf->sf_seek(sf->sf_file, (sf_count_t)(offset / ft->signal.channels), SEEK_CUR); diff --git a/src/sox_i.h b/src/sox_i.h index c8552f97..301bb5e8 100644 --- a/src/sox_i.h +++ b/src/sox_i.h @@ -237,7 +237,7 @@ size_t lsx_rawread(sox_format_t * ft, sox_sample_t *buf, size_t nsamp); int lsx_rawstopread(sox_format_t * ft); int lsx_rawstartwrite(sox_format_t * ft); size_t lsx_rawwrite(sox_format_t * ft, const sox_sample_t *buf, size_t nsamp); -int lsx_rawseek(sox_format_t * ft, uint64_t offset); +int lsx_rawseek(sox_format_t * ft, sox_uint64_t offset); int lsx_rawstart(sox_format_t * ft, sox_bool default_rate, sox_bool default_channels, sox_bool default_length, sox_encoding_t encoding, unsigned bits_per_sample); #define lsx_rawstartread(ft) lsx_rawstart(ft, sox_false, sox_false, sox_false, SOX_ENCODING_UNKNOWN, 0) #define lsx_rawstartwrite lsx_rawstartread diff --git a/src/vorbis.c b/src/vorbis.c index 9fa234ce..88e55656 100644 --- a/src/vorbis.c +++ b/src/vorbis.c @@ -408,7 +408,7 @@ static int stopwrite(sox_format_t * ft) return (SOX_SUCCESS); } -static int seek(sox_format_t * ft, uint64_t offset) +static int seek(sox_format_t * ft, sox_uint64_t offset) { priv_t * vb = (priv_t *) ft->priv; diff --git a/src/wav.c b/src/wav.c index 3f6beb45..647359c8 100644 --- a/src/wav.c +++ b/src/wav.c @@ -1588,7 +1588,7 @@ static const char *wav_format_str(unsigned tag) return f ? f->name : "unknown"; } -static int seek(sox_format_t * ft, uint64_t offset) +static int seek(sox_format_t * ft, sox_uint64_t offset) { priv_t * wav = (priv_t *) ft->priv; diff --git a/src/wavpack.c b/src/wavpack.c index b7e8dafa..4812e375 100644 --- a/src/wavpack.c +++ b/src/wavpack.c @@ -179,7 +179,7 @@ static int stop_write(sox_format_t * ft) return SOX_SUCCESS; } -static int seek(sox_format_t * ft, uint64_t offset) +static int seek(sox_format_t * ft, sox_uint64_t offset) { priv_t * p = (priv_t *)ft->priv;