Skip to content

Commit

Permalink
wav/au: fix buffer size, we're allocating shorts here
Browse files Browse the repository at this point in the history
  • Loading branch information
drfiemost committed Nov 11, 2024
1 parent f530ae9 commit 39b33da
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/audio/au/auFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ bool auFile::open(AudioConfig &cfg)
// We need to make a buffer for the user
try
{
_sampleBuffer = new short[bufSize];
_sampleBuffer = new short[bufSize/2];
}
catch (std::bad_alloc const &ba)
{
Expand Down
2 changes: 1 addition & 1 deletion src/audio/wav/WavFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ bool WavFile::open(AudioConfig &cfg)
// We need to make a buffer for the user
try
{
_sampleBuffer = new short[bufSize];
_sampleBuffer = new short[bufSize/2];
}
catch (std::bad_alloc const &ba)
{
Expand Down

0 comments on commit 39b33da

Please sign in to comment.