Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoerg Mueller <nexyon@gmail.com>2011-06-22 00:13:27 +0400
committerJoerg Mueller <nexyon@gmail.com>2011-06-22 00:13:27 +0400
commit3d932ba4968d8caa3c936d9186439781e7cedca0 (patch)
treeb6968fff93462e6e05caba6d89c58d80982325b8 /intern/audaspace/OpenAL
parentf2ceca4eb05675f4058fc6666805de58cb10916f (diff)
3D Audio GSoC:
Buffer.assureSize - a function that should long have been there.
Diffstat (limited to 'intern/audaspace/OpenAL')
-rw-r--r--intern/audaspace/OpenAL/AUD_OpenALDevice.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/intern/audaspace/OpenAL/AUD_OpenALDevice.cpp b/intern/audaspace/OpenAL/AUD_OpenALDevice.cpp
index 2780f108cda..18c50d29225 100644
--- a/intern/audaspace/OpenAL/AUD_OpenALDevice.cpp
+++ b/intern/audaspace/OpenAL/AUD_OpenALDevice.cpp
@@ -160,8 +160,7 @@ void AUD_OpenALDevice::updateStreams()
if(info)
{
specs.specs = sound->reader->getSpecs();
- if(m_buffer.getSize() < m_buffersize * AUD_DEVICE_SAMPLE_SIZE(specs))
- m_buffer.resize(m_buffersize * AUD_DEVICE_SAMPLE_SIZE(specs));
+ m_buffer.assureSize(m_buffersize * AUD_DEVICE_SAMPLE_SIZE(specs));
// for all empty buffers
while(info--)
@@ -582,8 +581,7 @@ AUD_Handle* AUD_OpenALDevice::play(AUD_Reference<AUD_IReader> reader, bool keep)
try
{
- if(m_buffer.getSize() < m_buffersize * AUD_DEVICE_SAMPLE_SIZE(specs))
- m_buffer.resize(m_buffersize * AUD_DEVICE_SAMPLE_SIZE(specs));
+ m_buffer.assureSize(m_buffersize * AUD_DEVICE_SAMPLE_SIZE(specs));
int length;
for(int i = 0; i < AUD_OPENAL_CYCLE_BUFFERS; i++)
@@ -884,8 +882,7 @@ bool AUD_OpenALDevice::seek(AUD_Handle* handle, float position)
int length;
AUD_DeviceSpecs specs = m_specs;
specs.specs = alhandle->reader->getSpecs();
- if(m_buffer.getSize() < m_buffersize * AUD_DEVICE_SAMPLE_SIZE(specs))
- m_buffer.resize(m_buffersize * AUD_DEVICE_SAMPLE_SIZE(specs));
+ m_buffer.assureSize(m_buffersize * AUD_DEVICE_SAMPLE_SIZE(specs));
for(int i = 0; i < AUD_OPENAL_CYCLE_BUFFERS; i++)
{