[VFS] Rewrote STFS to use memory mapping
- Replaced old-style buffer, buffer_length with std::span - Added STFS and SVOD specific Entry and File classes - Other smaller improvements
This commit is contained in:
committed by
Radosław Gliński
parent
e85c2392ba
commit
fe739208b6
@@ -412,8 +412,9 @@ bool AudioMediaPlayer::LoadSongToMemory(std::vector<uint8_t>* buffer) {
|
||||
|
||||
buffer->resize(vfs_file->entry()->size());
|
||||
size_t bytes_read = 0;
|
||||
result = vfs_file->ReadSync(buffer->data(), vfs_file->entry()->size(), 0,
|
||||
&bytes_read);
|
||||
result = vfs_file->ReadSync(
|
||||
std::span<uint8_t>(buffer->data(), vfs_file->entry()->size()), 0,
|
||||
&bytes_read);
|
||||
|
||||
return !result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user