Changeset View
Changeset View
Standalone View
Standalone View
source/soundmanager/data/OggData.cpp
Show First 20 Lines • Show All 52 Lines • ▼ Show 20 Lines | |||||
bool COggData::IsStereo() | bool COggData::IsStereo() | ||||
{ | { | ||||
return m_Format == AL_FORMAT_STEREO16; | return m_Format == AL_FORMAT_STEREO16; | ||||
} | } | ||||
bool COggData::InitOggFile(const VfsPath& itemPath) | bool COggData::InitOggFile(const VfsPath& itemPath) | ||||
{ | { | ||||
CSoundManager* sndManager = (CSoundManager*)g_SoundManager; | CSoundManager* sndManager = (CSoundManager*)ISoundManager::GetSoundManager(); | ||||
if (!sndManager) | if (!sndManager) | ||||
return false; | return false; | ||||
int buffersToStart = sndManager->GetBufferCount(); | int buffersToStart = sndManager->GetBufferCount(); | ||||
if (OpenOggNonstream(g_VFS, itemPath, ogg) != INFO::OK) | if (OpenOggNonstream(g_VFS, itemPath, ogg) != INFO::OK) | ||||
return false; | return false; | ||||
m_FileFinished = false; | m_FileFinished = false; | ||||
▲ Show 20 Lines • Show All 44 Lines • ▼ Show 20 Lines | |||||
bool COggData::IsOneShot() | bool COggData::IsOneShot() | ||||
{ | { | ||||
return m_OneShot; | return m_OneShot; | ||||
} | } | ||||
int COggData::FetchDataIntoBuffer(int count, ALuint* buffers) | int COggData::FetchDataIntoBuffer(int count, ALuint* buffers) | ||||
{ | { | ||||
CSoundManager* sndManager = (CSoundManager*)g_SoundManager; | CSoundManager* sndManager = (CSoundManager*)ISoundManager::GetSoundManager(); | ||||
if (!sndManager) | if (!sndManager) | ||||
return 0; | return 0; | ||||
long bufferSize = sndManager->GetBufferSize(); | long bufferSize = sndManager->GetBufferSize(); | ||||
u8* pcmout = new u8[bufferSize + 5000]; | u8* pcmout = new u8[bufferSize + 5000]; | ||||
int buffersWritten = 0; | int buffersWritten = 0; | ||||
Show All 27 Lines |
Wildfire Games · Phabricator