diff options
| author | Ray <raysan5@gmail.com> | 2018-10-19 16:17:44 +0200 |
|---|---|---|
| committer | Ray <raysan5@gmail.com> | 2018-10-19 16:17:44 +0200 |
| commit | 27592183681cdcaf0378406fbfbb93b60f84bc98 (patch) | |
| tree | 9d144df5473d2e3c5f3524381986db381f3ec26a /src | |
| parent | fa5cebdfd27f7081b37d54401624d2556a04a4d2 (diff) | |
| download | raylib-27592183681cdcaf0378406fbfbb93b60f84bc98.tar.gz raylib-27592183681cdcaf0378406fbfbb93b60f84bc98.zip | |
Added comment on issue
Diffstat (limited to 'src')
| -rw-r--r-- | src/audio.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/audio.c b/src/audio.c index dcde6e65..f0362b2d 100644 --- a/src/audio.c +++ b/src/audio.c @@ -1158,8 +1158,9 @@ Music LoadMusicStream(const char *fileName) music->stream = InitAudioStream(music->ctxMp3.sampleRate, 32, music->ctxMp3.channels); - // TODO: It seems the total number of samples is not obtained correctly... - music->totalSamples = (unsigned int)music->ctxMp3.framesRemaining*music->ctxMp3.channels; + // TODO: There is not an easy way to compute the total number of samples available + // in an MP3, frames size could be variable... we tried with a 60 seconds music... but crashes... + music->totalSamples = 60*music->ctxMp3.sampleRate*music->ctxMp3.channels; music->samplesLeft = music->totalSamples; music->ctxType = MUSIC_AUDIO_MP3; music->loopCount = -1; // Infinite loop by default |
