faiface / beep

A little package that brings sound to any Go application. Suitable for playback and audio-processing.
MIT License
2.07k stars 152 forks source link

WAV File with maximum filesize (FFFFFFFF) hangs Beep playback #160

Open ms140569 opened 1 year ago

ms140569 commented 1 year ago

Hi,

Supplying to the Beep library a WAV File with an unlimited Filesize (FFFFFFFF) at byte offset 0x4 and 0x134 hangs the playback. One needs to kill the whole process. While an unlimited filesize might be not a valid WAV-File (although Mac Finder plays the file fine) and should be therefore rejected it should not hang the library in any case. Drop me a line if you want to fix this and need a sample.

Cheers, Matthias

MarkKremer commented 1 year ago

I may want to play with this a bit. May or may not result in a fix.

Could you provide me with the invalid WAV file?

Also, what's at byte offset 0x134? I don't think the file size at offset 0x4 is used by the decoder.