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:
authorCampbell Barton <ideasman42@gmail.com>2010-11-21 17:32:55 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-11-21 17:32:55 +0300
commitc85c2746dfc27c46dcd6ecbd82f923428d7e68b6 (patch)
treed0adb1b9dd812646102abd6f34a9578e5cf2d57c /intern/audaspace
parent5fff1a98a1b0f5159129e6fb2311878dd3b0249b (diff)
WITH_SAMPLERATE option for cmake, without this playback wont behave right so this is mainly intended for developers who build without audio enabled.
Diffstat (limited to 'intern/audaspace')
-rw-r--r--intern/audaspace/CMakeLists.txt12
-rw-r--r--intern/audaspace/SConscript3
-rw-r--r--intern/audaspace/intern/AUD_DefaultMixer.cpp6
3 files changed, 17 insertions, 4 deletions
diff --git a/intern/audaspace/CMakeLists.txt b/intern/audaspace/CMakeLists.txt
index be39a7348aa..a476ea3dea8 100644
--- a/intern/audaspace/CMakeLists.txt
+++ b/intern/audaspace/CMakeLists.txt
@@ -61,8 +61,6 @@ SET(SRC
FX/AUD_SuperposeFactory.cpp
FX/AUD_SuperposeReader.cpp
FX/AUD_VolumeFactory.cpp
- SRC/AUD_SRCResampleFactory.cpp
- SRC/AUD_SRCResampleReader.cpp
intern/AUD_3DMath.h
intern/AUD_Buffer.cpp
intern/AUD_Buffer.h
@@ -164,6 +162,14 @@ IF(WITH_SNDFILE)
)
ENDIF(WITH_SNDFILE)
+IF(WITH_SAMPLERATE)
+ ADD_DEFINITIONS(-DWITH_SAMPLERATE)
+ SET(SRCFILESRC
+ SRC/AUD_SRCResampleFactory.cpp
+ SRC/AUD_SRCResampleReader.cpp
+ )
+ENDIF(WITH_SAMPLERATE)
+
#IF(WITH_FFTW3)
# ADD_DEFINITIONS(-DWITH_FFTW3)
# LIST(APPEND INC fftw ${FFTW3_INC})
@@ -181,6 +187,6 @@ IF(WITH_PYTHON)
ADD_DEFINITIONS(-DWITH_PYTHON)
ENDIF(WITH_PYTHON)
-SET(SRC ${SRC} ${FFMPEGSRC} ${SNDFILESRC} ${FFTW3SRC} ${SDLSRC} ${OPENALSRC} ${JACKSRC} ${PYTHONSRC})
+SET(SRC ${SRC} ${FFMPEGSRC} ${SNDFILESRC} ${SRCFILESRC} ${FFTW3SRC} ${SDLSRC} ${OPENALSRC} ${JACKSRC} ${PYTHONSRC})
BLENDERLIB(bf_intern_audaspace "${SRC}" "${INC}")
diff --git a/intern/audaspace/SConscript b/intern/audaspace/SConscript
index 2c86849bc62..ecc94987185 100644
--- a/intern/audaspace/SConscript
+++ b/intern/audaspace/SConscript
@@ -44,4 +44,7 @@ if env['WITH_BF_PYTHON']:
if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'):
incs += ' ' + env['BF_PTHREADS_INC']
+# not optional with scons yet
+defs.append('WITH_SAMPLERATE')
+
env.BlenderLib ('bf_intern_audaspace', sources, Split(incs), defs, libtype=['intern','player'], priority = [25,215] )
diff --git a/intern/audaspace/intern/AUD_DefaultMixer.cpp b/intern/audaspace/intern/AUD_DefaultMixer.cpp
index 12faa10d866..2b641b6bd1a 100644
--- a/intern/audaspace/intern/AUD_DefaultMixer.cpp
+++ b/intern/audaspace/intern/AUD_DefaultMixer.cpp
@@ -24,7 +24,9 @@
*/
#include "AUD_DefaultMixer.h"
+#ifdef WITH_SAMPLERATE
#include "AUD_SRCResampleReader.h"
+#endif
#include "AUD_ChannelMapperReader.h"
#include "AUD_ChannelMapperFactory.h"
@@ -50,10 +52,12 @@ AUD_IReader* AUD_DefaultMixer::prepare(AUD_IReader* reader)
specs.channels = m_specs.channels;
}
+#ifdef WITH_SAMPLERATE
// resample
if(specs.rate != m_specs.rate)
reader = new AUD_SRCResampleReader(reader, m_specs.specs);
-
+#endif
+
// rechannel
if(specs.channels != m_specs.channels)
reader = new AUD_ChannelMapperReader(reader,