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
|
|
@ -188,7 +188,7 @@ uint ALAudio::getFreeSource(){
|
|||
}
|
||||
ALuint id;
|
||||
alGenSources(1, &id);
|
||||
if (!AL_GET_ERORR())
|
||||
if (!AL_GET_ERROR())
|
||||
return 0;
|
||||
allsources.push_back(id);
|
||||
return id;
|
||||
|
|
@ -200,13 +200,9 @@ uint ALAudio::getFreeBuffer(){
|
|||
freebuffers.pop_back();
|
||||
return buffer;
|
||||
}
|
||||
if (allbuffers.size() == maxBuffers){
|
||||
std::cerr << "attempted to create new ALbuffer, but limit is " << maxBuffers << std::endl;
|
||||
return 0;
|
||||
}
|
||||
ALuint id;
|
||||
alGenBuffers(1, &id);
|
||||
if (!AL_GET_ERORR()) {
|
||||
if (!AL_GET_ERROR()) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -227,7 +223,7 @@ std::vector<std::string> ALAudio::getAvailableDevices() const {
|
|||
|
||||
const ALCchar* devices;
|
||||
devices = alcGetString(device, ALC_DEVICE_SPECIFIER);
|
||||
if (!AL_GET_ERORR()) {
|
||||
if (!AL_GET_ERROR()) {
|
||||
return devicesVec;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue