Skip to content

Commit 280cd8f

Browse files
SiegeLordExSiegeLord
authored andcommitted
Fix MP3 compillation, warnings.
1 parent 05009f7 commit 280cd8f

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

addons/acodec/mp3.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ ALLEGRO_SAMPLE *_al_load_mp3_f(ALLEGRO_FILE *f)
6060
}
6161

6262
// Allocate buffer and read all the file
63-
uint8_t* mp3data = (uint8_t*)al_malloc(fsize);
64-
size_t readbytes = al_fread(f, mp3data, fsize);
65-
if (readbytes != fsize) {
63+
uint8_t* mp3data = (uint8_t*)al_malloc(filesize);
64+
size_t readbytes = al_fread(f, mp3data, filesize);
65+
if (readbytes != (size_t)filesize) {
6666
ALLEGRO_WARN("Failed to read file into memory.\n");
6767
al_free(mp3data);
6868
return NULL;
@@ -100,6 +100,9 @@ ALLEGRO_AUDIO_STREAM *_al_load_mp3_audio_stream(const char *filename, size_t buf
100100

101101
ALLEGRO_AUDIO_STREAM *_al_load_mp3_audio_stream_f(ALLEGRO_FILE* f, size_t buffer_count, unsigned int samples)
102102
{
103+
(void)f;
104+
(void)buffer_count;
105+
(void)samples;
103106
mp3_initminimp3(); // Make sure library is initialised
104107
return NULL;
105108
}

0 commit comments

Comments
 (0)