Skip to content

Commit cddfb07

Browse files
committed
Fixed some warnings and comments in mp3 handler
1 parent 0c21d46 commit cddfb07

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

src/mp3-util.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -378,8 +378,6 @@ static size_t mp3_duration(sox_format_t * ft)
378378

379379
lsx_rewind(ft);
380380

381-
// fprintf(stderr, "File length in samples, according to mpg123 (after scan): %zu / %zu\n", samples, samples * channels);
382-
383381
return (size_t) (samples * channels);
384382
}
385383

src/mp3.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* MP3 support for SoX
22
*
3-
* Uses libmad for MP3 decoding
3+
* Uses libmad or libmpg123 for MP3 decoding
44
* libmp3lame for MP3 encoding
55
* and libtwolame for MP2 encoding
66
*
@@ -326,7 +326,7 @@ typedef struct mp3_priv_t {
326326
#endif
327327
} priv_t;
328328

329-
#if defined(HAVE_MAD_H) || defined(HAVE_MPG123_H)
329+
#if defined(HAVE_MAD_H)
330330

331331
/* This function merges the functions tagtype() and id3_tag_query()
332332
from MAD's libid3tag, so we don't have to link to it
@@ -357,7 +357,7 @@ static int tagtype(const unsigned char *data, size_t length)
357357
return 0;
358358
}
359359

360-
#endif /*HAVE_MAD_H || HAVE_MPG123_H */
360+
#endif /*HAVE_MAD_H */
361361

362362
#include "mp3-util.h"
363363

@@ -825,7 +825,7 @@ static int startread(sox_format_t * ft)
825825
lsx_fail_errno(ft, SOX_EOF, "Could not get mpg123 handle: %s", mpg123_plain_strerror(error));
826826
return SOX_EOF;
827827
}
828-
error = mpg123_param(p->handle, MPG123_FLAGS, MPG123_FUZZY | MPG123_SEEKBUFFER | MPG123_GAPLESS | MPG123_FORCE_FLOAT, 0);
828+
error = mpg123_param(p->handle, MPG123_FLAGS, MPG123_FUZZY | MPG123_SEEKBUFFER | MPG123_GAPLESS | MPG123_FORCE_FLOAT, 0.);
829829
if (error) {
830830
lsx_fail_errno(ft, SOX_EOF, "Unable to set library options: %s", mpg123_plain_strerror(error));
831831
return SOX_EOF;
@@ -961,7 +961,7 @@ static int stopread(sox_format_t * ft)
961961
return SOX_SUCCESS;
962962
}
963963

964-
static int sox_mp3seek(sox_format_t * ft, uint64_t offset)
964+
static int sox_mp3seek(sox_format_t * ft UNUSED, uint64_t offset UNUSED)
965965
{
966966
lsx_fail("Seeking in mp3 is not yet implemented");
967967
return SOX_EOF;

0 commit comments

Comments
 (0)