Commit 9e407f59 authored by GrimReaperFloof's avatar GrimReaperFloof

Change WritableBuffer<uint8_t> to AllocatedArray<std::byte>

parent fec6aac0
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
#include "input/InputStream.hxx" #include "input/InputStream.hxx"
#include "tag/Handler.hxx" #include "tag/Handler.hxx"
#include "tag/Type.h" #include "tag/Type.h"
#include "util/WritableBuffer.hxx"
#include "util/Domain.hxx" #include "util/Domain.hxx"
#include "util/RuntimeError.hxx" #include "util/RuntimeError.hxx"
#include "util/StringView.hxx" #include "util/StringView.hxx"
...@@ -72,8 +71,7 @@ mod_decode(DecoderClient &client, InputStream &is) ...@@ -72,8 +71,7 @@ mod_decode(DecoderClient &client, InputStream &is)
return; return;
} }
openmpt::module mod(buffer.data, buffer.size); openmpt::module mod(buffer.data(), buffer.size());
delete[] buffer.data;
/* alter settings */ /* alter settings */
mod.set_render_param(mod.RENDER_STEREOSEPARATION_PERCENT, openmpt_stereo_separation); mod.set_render_param(mod.RENDER_STEREOSEPARATION_PERCENT, openmpt_stereo_separation);
...@@ -122,8 +120,7 @@ openmpt_scan_stream(InputStream &is, TagHandler &handler) noexcept ...@@ -122,8 +120,7 @@ openmpt_scan_stream(InputStream &is, TagHandler &handler) noexcept
return false; return false;
} }
openmpt::module mod(buffer.data, buffer.size); openmpt::module mod(buffer.data(), buffer.size());
delete[] buffer.data;
handler.OnDuration(SongTime::FromS(mod.get_duration_seconds())); handler.OnDuration(SongTime::FromS(mod.get_duration_seconds()));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment