You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Basically the problem is related to the issue #37, where the .Len() of the file is returning 0 because the deprecated mp3 decoder does not handle correctly embedded files.
The program panics with the following message:
panic: invalid argument to Loop2; start position 0 must be smaller than the source streamer length 0
Using beep.Loop works fine with the mp3 decoder.
I am just opening the issue in case someone else ends up with the same issue, and the possible solution with the current state of the code is:
Use beep.Loop instead of beep.Loop2
UPDATE: I had a bug in my OGG example, beep.Loop2 also panics for that case.
The text was updated successfully, but these errors were encountered:
hanchon
changed the title
panic: beep.Loop2 and mp3 decoder
panic: beep.Loop2 and embedded music files
Jan 27, 2025
Hi,
I was trying the lib and I found an issue with the new
beep.Loop2
function while using MP3 files embedded in the code.Here is the minimal replication
Basically the problem is related to the issue #37, where the
.Len()
of the file is returning 0 because the deprecated mp3 decoder does not handle correctly embedded files.The program panics with the following message:
Using
beep.Loop
works fine with the mp3 decoder.I am just opening the issue in case someone else ends up with the same issue, and the possible solution with the current state of the code is:
beep.Loop
instead ofbeep.Loop2
UPDATE: I had a bug in my
OGG
example,beep.Loop2
also panics for that case.The text was updated successfully, but these errors were encountered: