Skip to content

Commit

Permalink
LibAudio: Allow WAV files up to 1GB.
Browse files Browse the repository at this point in the history
We were limiting ourselves to only play WAV files smaller than 42 MB
for no particular reason. This patch increases the limit to 1 GB.
Perhaps there should not be any limit at all, but 1GB seems like a
reasonable sanity check at the moment. :^)
  • Loading branch information
awesomekling committed Jul 27, 2019
1 parent eda272e commit dbebf10
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Libraries/LibAudio/AWavLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ bool AWavLoader::parse_header()

u32 sz;
stream >> sz;
ok = ok && sz < 1024 * 1024 * 42; // arbitrary
ok = ok && sz < 1024 * 1024 * 1024; // arbitrary
CHECK_OK("File size");
ASSERT(sz < 1024 * 1024 * 42);
ASSERT(sz < 1024 * 1024 * 1024);

u32 wave;
stream >> wave;
Expand Down

0 comments on commit dbebf10

Please sign in to comment.