mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-20 11:29:18 +02:00
tweaks in buffer handling after failure
This commit is contained in:
@@ -64,9 +64,11 @@ openal_buffer::openal_buffer( std::string const &Filename ) :
|
||||
|
||||
alGenBuffers(1, &id);
|
||||
if (id != null_resource && alIsBuffer(id)) {
|
||||
alGetError();
|
||||
alBufferData(id, AL_FORMAT_MONO16, buf, si.frames * 2, rate);
|
||||
}
|
||||
else {
|
||||
id = null_resource;
|
||||
ErrorLog("sound: failed to create AL buffer");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user