Changeset View
Changeset View
Standalone View
Standalone View
source/soundmanager/items/CStreamItem.cpp
/* Copyright (C) 2021 Wildfire Games. | /* Copyright (C) 2021 Wildfire Games. | ||||
Lint: Inaccurate Copyright Year: Inaccurate Copyright Year | |||||
* This file is part of 0 A.D. | * This file is part of 0 A.D. | ||||
* | * | ||||
* 0 A.D. is free software: you can redistribute it and/or modify | * 0 A.D. is free software: you can redistribute it and/or modify | ||||
* it under the terms of the GNU General Public License as published by | * it under the terms of the GNU General Public License as published by | ||||
* the Free Software Foundation, either version 2 of the License, or | * the Free Software Foundation, either version 2 of the License, or | ||||
* (at your option) any later version. | * (at your option) any later version. | ||||
* | * | ||||
* 0 A.D. is distributed in the hope that it will be useful, | * 0 A.D. is distributed in the hope that it will be useful, | ||||
Show All 40 Lines | if (m_ALSource != 0) | ||||
{ | { | ||||
ALuint* al_buf = new ALuint[num_processed]; | ALuint* al_buf = new ALuint[num_processed]; | ||||
alSourceUnqueueBuffers(m_ALSource, num_processed, al_buf); | alSourceUnqueueBuffers(m_ALSource, num_processed, al_buf); | ||||
AL_CHECK; | AL_CHECK; | ||||
delete[] al_buf; | delete[] al_buf; | ||||
} | } | ||||
alSourcei(m_ALSource, AL_BUFFER, 0); | alSourcei(m_ALSource, AL_BUFFER, 0); | ||||
AL_CHECK; | AL_CHECK; | ||||
((CSoundManager*)g_SoundManager)->ReleaseALSource(m_ALSource); | static_cast<CSoundManager*>(g_SoundManager)->ReleaseALSource(m_ALSource); | ||||
AL_CHECK; | AL_CHECK; | ||||
m_ALSource = 0; | m_ALSource = 0; | ||||
} | } | ||||
} | } | ||||
bool CStreamItem::IdleTask() | bool CStreamItem::IdleTask() | ||||
{ | { | ||||
AL_CHECK; | AL_CHECK; | ||||
▲ Show 20 Lines • Show All 71 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator
Inaccurate Copyright Year