16
0
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:
milek7
2019-09-12 18:15:28 +02:00
parent f457ad8dc4
commit be5312493f
2 changed files with 3 additions and 1 deletions

View File

@@ -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");
}