mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 03:21:49 +00:00
audio fixes
This commit is contained in:
parent
2440d852d3
commit
d1b145e7a4
4 changed files with 5 additions and 11 deletions
|
|
@ -26,7 +26,6 @@ audio::PCM* ogg::load_pcm(const std::filesystem::path& file, bool headerOnly) {
|
|||
if ((code = ov_fopen(file.u8string().c_str(), &vf))) {
|
||||
throw std::runtime_error(vorbis_error_message(code));
|
||||
}
|
||||
|
||||
std::vector<char> data;
|
||||
|
||||
vorbis_info* info = ov_info(&vf, -1);
|
||||
|
|
@ -52,5 +51,5 @@ audio::PCM* ogg::load_pcm(const std::filesystem::path& file, bool headerOnly) {
|
|||
}
|
||||
|
||||
ov_clear(&vf);
|
||||
return new audio::PCM(data, channels, 16, sampleRate);
|
||||
return new audio::PCM(std::move(data), channels, 16, sampleRate);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue