Skip to content

Commit

Permalink
audio: clear buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
inanevin committed Jan 25, 2025
1 parent 7d5bb8a commit 57c5509
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions LinaCore/src/Audio/Audio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ namespace Lina

bool Audio::LoadFromFile(const String& path)
{
m_audioBuffer.resize(0);
AudioFile<int16> file;
file.load(path.c_str());

Expand Down Expand Up @@ -102,6 +103,7 @@ namespace Lina

void Audio::LoadFromStream(IStream& stream)
{
m_audioBuffer.resize(0);
Resource::LoadFromStream(stream);
uint32 version = 0;
stream >> version;
Expand Down

0 comments on commit 57c5509

Please sign in to comment.