PCMStream interface update

This commit is contained in:
MihailRis
2024-03-01 14:27:04 +03:00
parent 7c51e39dfe
commit 2fab1593c8
5 changed files with 50 additions and 61 deletions
+1 -1
View File
@@ -46,7 +46,7 @@ std::shared_ptr<PCMStream> ALStream::getSource() const {
}
bool ALStream::preloadBuffer(uint buffer, bool loop) {
size_t read = source->read(this->buffer, BUFFER_SIZE, loop);
size_t read = source->readFully(this->buffer, BUFFER_SIZE, loop);
if (!read)
return false;
ALenum format = AL::to_al_format(source->getChannels(), source->getBitsPerSample());