Compare commits
15 Commits
tmp-eevee-
...
obj-import
Author | SHA1 | Date | |
---|---|---|---|
b3a7e47c9e | |||
f55198da42 | |||
95e71dad88 | |||
6a61e86b43 | |||
7ae5433779 | |||
4be9d4541e | |||
01416b7e8d | |||
df984b1dd6 | |||
a4d1acf1ce | |||
a40bdbb5fc | |||
0f2147bf52 | |||
d4a3adf045 | |||
c7d9070ccb | |||
3512be55e9 | |||
4a4a36627e |
@@ -191,7 +191,6 @@ ForEachMacros:
|
|||||||
- FOREACH_MAIN_ID_BEGIN
|
- FOREACH_MAIN_ID_BEGIN
|
||||||
- FOREACH_MAIN_LISTBASE_BEGIN
|
- FOREACH_MAIN_LISTBASE_BEGIN
|
||||||
- FOREACH_MAIN_LISTBASE_ID_BEGIN
|
- FOREACH_MAIN_LISTBASE_ID_BEGIN
|
||||||
- FOREACH_MESH_BUFFER_CACHE
|
|
||||||
- FOREACH_NODETREE_BEGIN
|
- FOREACH_NODETREE_BEGIN
|
||||||
- FOREACH_OBJECT_BEGIN
|
- FOREACH_OBJECT_BEGIN
|
||||||
- FOREACH_OBJECT_FLAG_BEGIN
|
- FOREACH_OBJECT_FLAG_BEGIN
|
||||||
@@ -214,7 +213,6 @@ ForEachMacros:
|
|||||||
- GHASH_ITER_INDEX
|
- GHASH_ITER_INDEX
|
||||||
- GPU_SELECT_LOAD_IF_PICKSEL_LIST
|
- GPU_SELECT_LOAD_IF_PICKSEL_LIST
|
||||||
- GP_EDITABLE_STROKES_BEGIN
|
- GP_EDITABLE_STROKES_BEGIN
|
||||||
- GP_EVALUATED_STROKES_BEGIN
|
|
||||||
- GSET_FOREACH_BEGIN
|
- GSET_FOREACH_BEGIN
|
||||||
- GSET_ITER
|
- GSET_ITER
|
||||||
- GSET_ITER_INDEX
|
- GSET_ITER_INDEX
|
||||||
@@ -238,6 +236,7 @@ ForEachMacros:
|
|||||||
- LISTBASE_FOREACH_BACKWARD
|
- LISTBASE_FOREACH_BACKWARD
|
||||||
- LISTBASE_FOREACH_MUTABLE
|
- LISTBASE_FOREACH_MUTABLE
|
||||||
- LISTBASE_FOREACH_BACKWARD_MUTABLE
|
- LISTBASE_FOREACH_BACKWARD_MUTABLE
|
||||||
|
- MAN2D_ITER_AXES_BEGIN
|
||||||
- MAN_ITER_AXES_BEGIN
|
- MAN_ITER_AXES_BEGIN
|
||||||
- NODE_INSTANCE_HASH_ITER
|
- NODE_INSTANCE_HASH_ITER
|
||||||
- NODE_SOCKET_TYPES_BEGIN
|
- NODE_SOCKET_TYPES_BEGIN
|
||||||
@@ -245,18 +244,13 @@ ForEachMacros:
|
|||||||
- NODE_TYPES_BEGIN
|
- NODE_TYPES_BEGIN
|
||||||
- PIXEL_LOOPER_BEGIN
|
- PIXEL_LOOPER_BEGIN
|
||||||
- PIXEL_LOOPER_BEGIN_CHANNELS
|
- PIXEL_LOOPER_BEGIN_CHANNELS
|
||||||
- RENDER_PASS_ITER_BEGIN
|
|
||||||
- RNA_BEGIN
|
- RNA_BEGIN
|
||||||
- RNA_PROP_BEGIN
|
- RNA_PROP_BEGIN
|
||||||
- RNA_STRUCT_BEGIN
|
- RNA_STRUCT_BEGIN
|
||||||
- RNA_STRUCT_BEGIN_SKIP_RNA_TYPE
|
- RNA_STRUCT_BEGIN_SKIP_RNA_TYPE
|
||||||
- SCULPT_VERTEX_DUPLICATES_AND_NEIGHBORS_ITER_BEGIN
|
|
||||||
- SCULPT_VERTEX_NEIGHBORS_ITER_BEGIN
|
|
||||||
- SEQP_BEGIN
|
- SEQP_BEGIN
|
||||||
- SEQ_BEGIN
|
- SEQ_BEGIN
|
||||||
- SURFACE_QUAD_ITER_BEGIN
|
|
||||||
- foreach
|
- foreach
|
||||||
- ED_screen_areas_iter
|
|
||||||
|
|
||||||
# Use once we bump the minimum version to version 8.
|
# Use once we bump the minimum version to version 8.
|
||||||
# # Without this string literals that in-line 'STRINGIFY' behave strangely (a bug?).
|
# # Without this string literals that in-line 'STRINGIFY' behave strangely (a bug?).
|
||||||
|
@@ -138,6 +138,11 @@ get_blender_version()
|
|||||||
#-----------------------------------------------------------------------------
|
#-----------------------------------------------------------------------------
|
||||||
# Options
|
# Options
|
||||||
|
|
||||||
|
# First platform specific non-cached vars
|
||||||
|
if(UNIX AND NOT (APPLE OR HAIKU))
|
||||||
|
set(WITH_X11 ON)
|
||||||
|
endif()
|
||||||
|
|
||||||
# Blender internal features
|
# Blender internal features
|
||||||
option(WITH_BLENDER "Build blender (disable to build only the blender player)" ON)
|
option(WITH_BLENDER "Build blender (disable to build only the blender player)" ON)
|
||||||
mark_as_advanced(WITH_BLENDER)
|
mark_as_advanced(WITH_BLENDER)
|
||||||
@@ -202,15 +207,7 @@ mark_as_advanced(WITH_GHOST_DEBUG)
|
|||||||
option(WITH_GHOST_SDL "Enable building Blender against SDL for windowing rather than the native APIs" OFF)
|
option(WITH_GHOST_SDL "Enable building Blender against SDL for windowing rather than the native APIs" OFF)
|
||||||
mark_as_advanced(WITH_GHOST_SDL)
|
mark_as_advanced(WITH_GHOST_SDL)
|
||||||
|
|
||||||
if(UNIX AND NOT (APPLE OR HAIKU))
|
if(WITH_X11)
|
||||||
option(WITH_GHOST_X11 "Enable building Blender against X11 for windowing" ON)
|
|
||||||
mark_as_advanced(WITH_GHOST_X11)
|
|
||||||
|
|
||||||
option(WITH_GHOST_WAYLAND "Enable building Blender against Wayland for windowing (under development)" OFF)
|
|
||||||
mark_as_advanced(WITH_GHOST_WAYLAND)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(WITH_GHOST_X11)
|
|
||||||
option(WITH_GHOST_XDND "Enable drag'n'drop support on X11 using XDND protocol" ON)
|
option(WITH_GHOST_XDND "Enable drag'n'drop support on X11 using XDND protocol" ON)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@@ -235,7 +232,7 @@ if(UNIX AND NOT APPLE)
|
|||||||
mark_as_advanced(WITH_OPENMP_STATIC)
|
mark_as_advanced(WITH_OPENMP_STATIC)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(WITH_GHOST_X11)
|
if(WITH_X11)
|
||||||
option(WITH_X11_XINPUT "Enable X11 Xinput (tablet support and unicode input)" ON)
|
option(WITH_X11_XINPUT "Enable X11 Xinput (tablet support and unicode input)" ON)
|
||||||
option(WITH_X11_XF86VMODE "Enable X11 video mode switching" ON)
|
option(WITH_X11_XF86VMODE "Enable X11 video mode switching" ON)
|
||||||
option(WITH_X11_XFIXES "Enable X11 XWayland cursor warping workaround" ON)
|
option(WITH_X11_XFIXES "Enable X11 XWayland cursor warping workaround" ON)
|
||||||
@@ -326,10 +323,6 @@ option(WITH_FREESTYLE "Enable Freestyle (advanced edges rendering)" ON)
|
|||||||
option(WITH_NEW_OBJECT_TYPES "Enable new hair and pointcloud objects (use for development only, don't save in files)" OFF)
|
option(WITH_NEW_OBJECT_TYPES "Enable new hair and pointcloud objects (use for development only, don't save in files)" OFF)
|
||||||
mark_as_advanced(WITH_NEW_OBJECT_TYPES)
|
mark_as_advanced(WITH_NEW_OBJECT_TYPES)
|
||||||
|
|
||||||
# New simulation data block
|
|
||||||
option(WITH_NEW_SIMULATION_TYPE "Enable simulation data block (use for development only, don't save in files)" OFF)
|
|
||||||
mark_as_advanced(WITH_NEW_SIMULATION_TYPE)
|
|
||||||
|
|
||||||
# Misc
|
# Misc
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
option(WITH_INPUT_IME "Enable Input Method Editor (IME) for complex Asian character input" ON)
|
option(WITH_INPUT_IME "Enable Input Method Editor (IME) for complex Asian character input" ON)
|
||||||
@@ -436,8 +429,6 @@ endif()
|
|||||||
option(WITH_GTESTS "Enable GTest unit testing" OFF)
|
option(WITH_GTESTS "Enable GTest unit testing" OFF)
|
||||||
option(WITH_OPENGL_RENDER_TESTS "Enable OpenGL render related unit testing (Experimental)" OFF)
|
option(WITH_OPENGL_RENDER_TESTS "Enable OpenGL render related unit testing (Experimental)" OFF)
|
||||||
option(WITH_OPENGL_DRAW_TESTS "Enable OpenGL UI drawing related unit testing (Experimental)" OFF)
|
option(WITH_OPENGL_DRAW_TESTS "Enable OpenGL UI drawing related unit testing (Experimental)" OFF)
|
||||||
set(TEST_PYTHON_EXE "" CACHE PATH "Python executable to run unit tests")
|
|
||||||
mark_as_advanced(TEST_PYTHON_EXE)
|
|
||||||
|
|
||||||
# Documentation
|
# Documentation
|
||||||
if(UNIX AND NOT APPLE)
|
if(UNIX AND NOT APPLE)
|
||||||
@@ -478,8 +469,6 @@ endif()
|
|||||||
if(CMAKE_COMPILER_IS_GNUCC)
|
if(CMAKE_COMPILER_IS_GNUCC)
|
||||||
option(WITH_LINKER_GOLD "Use ld.gold linker which is usually faster than ld.bfd" ON)
|
option(WITH_LINKER_GOLD "Use ld.gold linker which is usually faster than ld.bfd" ON)
|
||||||
mark_as_advanced(WITH_LINKER_GOLD)
|
mark_as_advanced(WITH_LINKER_GOLD)
|
||||||
option(WITH_LINKER_LLD "Use ld.lld linker which is usually faster than ld.gold" OFF)
|
|
||||||
mark_as_advanced(WITH_LINKER_LLD)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang")
|
if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang")
|
||||||
@@ -543,15 +532,6 @@ if(WIN32)
|
|||||||
option(WITH_WINDOWS_BUNDLE_CRT "Bundle the C runtime for install free distribution." ON)
|
option(WITH_WINDOWS_BUNDLE_CRT "Bundle the C runtime for install free distribution." ON)
|
||||||
mark_as_advanced(WITH_WINDOWS_BUNDLE_CRT)
|
mark_as_advanced(WITH_WINDOWS_BUNDLE_CRT)
|
||||||
|
|
||||||
option(WITH_WINDOWS_SCCACHE "Use sccache to speed up builds (Ninja builder only)" OFF)
|
|
||||||
mark_as_advanced(WITH_WINDOWS_SCCACHE)
|
|
||||||
|
|
||||||
option(WITH_WINDOWS_PDB "Generate a pdb file for client side stacktraces" ON)
|
|
||||||
mark_as_advanced(WITH_WINDOWS_PDB)
|
|
||||||
|
|
||||||
option(WITH_WINDOWS_STRIPPED_PDB "Use a stripped PDB file" On)
|
|
||||||
mark_as_advanced(WITH_WINDOWS_STRIPPED_PDB)
|
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# The following only works with the Ninja generator in CMake >= 3.0.
|
# The following only works with the Ninja generator in CMake >= 3.0.
|
||||||
@@ -653,10 +633,9 @@ set_and_warn_dependency(WITH_BOOST WITH_OPENVDB OFF)
|
|||||||
set_and_warn_dependency(WITH_BOOST WITH_OPENCOLORIO OFF)
|
set_and_warn_dependency(WITH_BOOST WITH_OPENCOLORIO OFF)
|
||||||
set_and_warn_dependency(WITH_BOOST WITH_QUADRIFLOW OFF)
|
set_and_warn_dependency(WITH_BOOST WITH_QUADRIFLOW OFF)
|
||||||
set_and_warn_dependency(WITH_BOOST WITH_USD OFF)
|
set_and_warn_dependency(WITH_BOOST WITH_USD OFF)
|
||||||
set_and_warn_dependency(WITH_BOOST WITH_ALEMBIC OFF)
|
|
||||||
|
|
||||||
if(WITH_BOOST AND NOT (WITH_CYCLES OR WITH_OPENIMAGEIO OR WITH_INTERNATIONAL OR
|
if(WITH_BOOST AND NOT (WITH_CYCLES OR WITH_OPENIMAGEIO OR WITH_INTERNATIONAL OR
|
||||||
WITH_OPENVDB OR WITH_OPENCOLORIO OR WITH_USD OR WITH_ALEMBIC))
|
WITH_OPENVDB OR WITH_OPENCOLORIO OR WITH_USD))
|
||||||
message(STATUS "No dependencies need 'WITH_BOOST' forcing WITH_BOOST=OFF")
|
message(STATUS "No dependencies need 'WITH_BOOST' forcing WITH_BOOST=OFF")
|
||||||
set(WITH_BOOST OFF)
|
set(WITH_BOOST OFF)
|
||||||
endif()
|
endif()
|
||||||
@@ -698,8 +677,7 @@ if(WITH_INSTALL_PORTABLE)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(WITH_GHOST_SDL OR WITH_HEADLESS)
|
if(WITH_GHOST_SDL OR WITH_HEADLESS)
|
||||||
set(WITH_GHOST_WAYLAND OFF)
|
set(WITH_X11 OFF)
|
||||||
set(WITH_GHOST_X11 OFF)
|
|
||||||
set(WITH_X11_XINPUT OFF)
|
set(WITH_X11_XINPUT OFF)
|
||||||
set(WITH_X11_XF86VMODE OFF)
|
set(WITH_X11_XF86VMODE OFF)
|
||||||
set(WITH_X11_XFIXES OFF)
|
set(WITH_X11_XFIXES OFF)
|
||||||
@@ -1739,7 +1717,6 @@ if(FIRST_RUN)
|
|||||||
info_cfg_option(WITH_ALEMBIC)
|
info_cfg_option(WITH_ALEMBIC)
|
||||||
info_cfg_option(WITH_QUADRIFLOW)
|
info_cfg_option(WITH_QUADRIFLOW)
|
||||||
info_cfg_option(WITH_USD)
|
info_cfg_option(WITH_USD)
|
||||||
info_cfg_option(WITH_TBB)
|
|
||||||
|
|
||||||
info_cfg_text("Compiler Options:")
|
info_cfg_text("Compiler Options:")
|
||||||
info_cfg_option(WITH_BUILDINFO)
|
info_cfg_option(WITH_BUILDINFO)
|
||||||
|
50
GNUmakefile
50
GNUmakefile
@@ -71,6 +71,17 @@ Testing Targets
|
|||||||
which are tagged to use the stricter formatting
|
which are tagged to use the stricter formatting
|
||||||
* test_deprecated:
|
* test_deprecated:
|
||||||
Checks for deprecation tags in our code which may need to be removed
|
Checks for deprecation tags in our code which may need to be removed
|
||||||
|
* test_style_c:
|
||||||
|
Checks C/C++ conforms with blenders style guide:
|
||||||
|
https://wiki.blender.org/wiki/Source/Code_Style
|
||||||
|
* test_style_c_qtc:
|
||||||
|
Same as test_style but outputs QtCreator tasks format
|
||||||
|
* test_style_osl:
|
||||||
|
Checks OpenShadingLanguage conforms with blenders style guide:
|
||||||
|
https://wiki.blender.org/wiki/Source/Code_Style
|
||||||
|
* test_style_osl_qtc:
|
||||||
|
Checks OpenShadingLanguage conforms with blenders style guide:
|
||||||
|
https://wiki.blender.org/wiki/Source/Code_Style
|
||||||
|
|
||||||
Static Source Code Checking
|
Static Source Code Checking
|
||||||
Not associated with building Blender.
|
Not associated with building Blender.
|
||||||
@@ -391,6 +402,45 @@ test_cmake: .FORCE
|
|||||||
test_deprecated: .FORCE
|
test_deprecated: .FORCE
|
||||||
$(PYTHON) tests/check_deprecated.py
|
$(PYTHON) tests/check_deprecated.py
|
||||||
|
|
||||||
|
test_style_c: .FORCE
|
||||||
|
# run our own checks on C/C++ style
|
||||||
|
PYTHONIOENCODING=utf_8 $(PYTHON) \
|
||||||
|
"$(BLENDER_DIR)/source/tools/check_source/check_style_c.py" \
|
||||||
|
"$(BLENDER_DIR)/source/blender" \
|
||||||
|
"$(BLENDER_DIR)/source/creator" \
|
||||||
|
--no-length-check
|
||||||
|
|
||||||
|
test_style_c_qtc: .FORCE
|
||||||
|
# run our own checks on C/C++ style
|
||||||
|
USE_QTC_TASK=1 \
|
||||||
|
PYTHONIOENCODING=utf_8 $(PYTHON) \
|
||||||
|
"$(BLENDER_DIR)/source/tools/check_source/check_style_c.py" \
|
||||||
|
"$(BLENDER_DIR)/source/blender" \
|
||||||
|
"$(BLENDER_DIR)/source/creator" \
|
||||||
|
--no-length-check \
|
||||||
|
> \
|
||||||
|
"$(BLENDER_DIR)/test_style.tasks"
|
||||||
|
@echo "written: test_style.tasks"
|
||||||
|
|
||||||
|
|
||||||
|
test_style_osl: .FORCE
|
||||||
|
# run our own checks on C/C++ style
|
||||||
|
PYTHONIOENCODING=utf_8 $(PYTHON) \
|
||||||
|
"$(BLENDER_DIR)/source/tools/check_source/check_style_c.py" \
|
||||||
|
"$(BLENDER_DIR)/intern/cycles/kernel/shaders" \
|
||||||
|
"$(BLENDER_DIR)/release/scripts/templates_osl"
|
||||||
|
|
||||||
|
|
||||||
|
test_style_osl_qtc: .FORCE
|
||||||
|
# run our own checks on C/C++ style
|
||||||
|
USE_QTC_TASK=1 \
|
||||||
|
PYTHONIOENCODING=utf_8 $(PYTHON) \
|
||||||
|
"$(BLENDER_DIR)/source/tools/check_source/check_style_c.py" \
|
||||||
|
"$(BLENDER_DIR)/intern/cycles/kernel/shaders" \
|
||||||
|
"$(BLENDER_DIR)/release/scripts/templates_osl" \
|
||||||
|
> \
|
||||||
|
"$(BLENDER_DIR)/test_style.tasks"
|
||||||
|
@echo "written: test_style.tasks"
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
# Project Files
|
# Project Files
|
||||||
|
@@ -25,8 +25,6 @@ if(UNIX AND NOT APPLE)
|
|||||||
set(BZIP2_CFLAGS "-fPIC -Wall -Winline -O2 -g -D_FILE_OFFSET_BITS=64")
|
set(BZIP2_CFLAGS "-fPIC -Wall -Winline -O2 -g -D_FILE_OFFSET_BITS=64")
|
||||||
set(BZIP2_CONFIGURE_ENV ${BZIP2_CONFIGURE_ENV} && export LDFLAGS=${BZIP2_LDFLAGS} && export CFLAGS=${BZIP2_CFLAGS}
|
set(BZIP2_CONFIGURE_ENV ${BZIP2_CONFIGURE_ENV} && export LDFLAGS=${BZIP2_LDFLAGS} && export CFLAGS=${BZIP2_CFLAGS}
|
||||||
&& export PREFIX=${BZIP2_PREFIX})
|
&& export PREFIX=${BZIP2_PREFIX})
|
||||||
else()
|
|
||||||
set(BZIP2_CONFIGURE_ENV ${CONFIGURE_ENV})
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
ExternalProject_Add(external_bzip2
|
ExternalProject_Add(external_bzip2
|
||||||
|
@@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
# cmake for windows
|
# cmake for windows
|
||||||
set(JPEG_EXTRA_ARGS -DNASM=${NASM_PATH} -DWITH_JPEG8=ON -DCMAKE_DEBUG_POSTFIX=d -DWITH_CRT_DLL=On)
|
set(JPEG_EXTRA_ARGS -DNASM=${NASM_PATH} -DWITH_JPEG8=ON -DCMAKE_DEBUG_POSTFIX=d)
|
||||||
|
|
||||||
ExternalProject_Add(external_jpeg
|
ExternalProject_Add(external_jpeg
|
||||||
URL ${JPEG_URI}
|
URL ${JPEG_URI}
|
||||||
|
@@ -21,7 +21,7 @@ set(OIDN_EXTRA_ARGS
|
|||||||
-DWITH_EXAMPLE=OFF
|
-DWITH_EXAMPLE=OFF
|
||||||
-DWITH_TEST=OFF
|
-DWITH_TEST=OFF
|
||||||
-DTBB_ROOT=${LIBDIR}/tbb
|
-DTBB_ROOT=${LIBDIR}/tbb
|
||||||
-DTBB_STATIC_LIB=${TBB_STATIC_LIBRARY}
|
-DTBB_STATIC_LIB=ON
|
||||||
-DOIDN_STATIC_LIB=ON
|
-DOIDN_STATIC_LIB=ON
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@@ -36,7 +36,7 @@ if(WIN32)
|
|||||||
set(OPENSUBDIV_EXTRA_ARGS
|
set(OPENSUBDIV_EXTRA_ARGS
|
||||||
${OPENSUBDIV_EXTRA_ARGS}
|
${OPENSUBDIV_EXTRA_ARGS}
|
||||||
-DTBB_INCLUDE_DIR=${LIBDIR}/tbb/include
|
-DTBB_INCLUDE_DIR=${LIBDIR}/tbb/include
|
||||||
-DTBB_LIBRARIES=${LIBDIR}/tbb/lib/tbb.lib
|
-DTBB_LIBRARIES=${LIBDIR}/tbb/lib/tbb_static.lib
|
||||||
-DCLEW_INCLUDE_DIR=${LIBDIR}/clew/include/CL
|
-DCLEW_INCLUDE_DIR=${LIBDIR}/clew/include/CL
|
||||||
-DCLEW_LIBRARY=${LIBDIR}/clew/lib/clew${LIBEXT}
|
-DCLEW_LIBRARY=${LIBDIR}/clew/lib/clew${LIBEXT}
|
||||||
-DCUEW_INCLUDE_DIR=${LIBDIR}/cuew/include
|
-DCUEW_INCLUDE_DIR=${LIBDIR}/cuew/include
|
||||||
|
@@ -24,7 +24,7 @@ if(WIN32)
|
|||||||
set(PTHREAD_CPPFLAGS "/I. /DHAVE_CONFIG_H ")
|
set(PTHREAD_CPPFLAGS "/I. /DHAVE_CONFIG_H ")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(PTHREADS_BUILD cd ${BUILD_DIR}/pthreads/src/external_pthreads/ && cd && nmake VC-static /e CPPFLAGS=${PTHREAD_CPPFLAGS})
|
set(PTHREADS_BUILD cd ${BUILD_DIR}/pthreads/src/external_pthreads/ && cd && nmake VC-static /e CPPFLAGS=${PTHREAD_CPPFLAGS} /e XLIBS=/NODEFAULTLIB:msvcr)
|
||||||
|
|
||||||
ExternalProject_Add(external_pthreads
|
ExternalProject_Add(external_pthreads
|
||||||
URL ${PTHREADS_URI}
|
URL ${PTHREADS_URI}
|
||||||
@@ -32,7 +32,6 @@ if(WIN32)
|
|||||||
URL_HASH MD5=${PTHREADS_HASH}
|
URL_HASH MD5=${PTHREADS_HASH}
|
||||||
PREFIX ${BUILD_DIR}/pthreads
|
PREFIX ${BUILD_DIR}/pthreads
|
||||||
CONFIGURE_COMMAND echo .
|
CONFIGURE_COMMAND echo .
|
||||||
PATCH_COMMAND COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/pthreads/src/external_pthreads < ${PATCH_DIR}/pthreads.diff
|
|
||||||
BUILD_COMMAND ${PTHREADS_BUILD}
|
BUILD_COMMAND ${PTHREADS_BUILD}
|
||||||
INSTALL_COMMAND COMMAND
|
INSTALL_COMMAND COMMAND
|
||||||
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/libpthreadVC3${LIBEXT} ${LIBDIR}/pthreads/lib/pthreadVC3${LIBEXT} &&
|
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/libpthreadVC3${LIBEXT} ${LIBDIR}/pthreads/lib/pthreadVC3${LIBEXT} &&
|
||||||
|
@@ -20,10 +20,8 @@ if(WIN32)
|
|||||||
-DTBB_BUILD_SHARED=On
|
-DTBB_BUILD_SHARED=On
|
||||||
-DTBB_BUILD_TBBMALLOC=On
|
-DTBB_BUILD_TBBMALLOC=On
|
||||||
-DTBB_BUILD_TBBMALLOC_PROXY=On
|
-DTBB_BUILD_TBBMALLOC_PROXY=On
|
||||||
-DTBB_BUILD_STATIC=Off
|
-DTBB_BUILD_STATIC=On
|
||||||
)
|
)
|
||||||
set(TBB_LIBRARY tbb)
|
|
||||||
set(TBB_STATIC_LIBRARY Off)
|
|
||||||
else()
|
else()
|
||||||
set(TBB_EXTRA_ARGS
|
set(TBB_EXTRA_ARGS
|
||||||
-DTBB_BUILD_SHARED=Off
|
-DTBB_BUILD_SHARED=Off
|
||||||
@@ -31,8 +29,6 @@ else()
|
|||||||
-DTBB_BUILD_TBBMALLOC_PROXY=Off
|
-DTBB_BUILD_TBBMALLOC_PROXY=Off
|
||||||
-DTBB_BUILD_STATIC=On
|
-DTBB_BUILD_STATIC=On
|
||||||
)
|
)
|
||||||
set(TBB_LIBRARY tbb_static)
|
|
||||||
set(TBB_STATIC_LIBRARY On)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# CMake script for TBB from https://github.com/wjakob/tbb/blob/master/CMakeLists.txt
|
# CMake script for TBB from https://github.com/wjakob/tbb/blob/master/CMakeLists.txt
|
||||||
@@ -50,8 +46,7 @@ ExternalProject_Add(external_tbb
|
|||||||
if(WIN32)
|
if(WIN32)
|
||||||
if(BUILD_MODE STREQUAL Release)
|
if(BUILD_MODE STREQUAL Release)
|
||||||
ExternalProject_Add_Step(external_tbb after_install
|
ExternalProject_Add_Step(external_tbb after_install
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb.lib ${HARVEST_TARGET}/tbb/lib/tbb.lib
|
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb_static.lib ${HARVEST_TARGET}/tbb/lib/tbb.lib
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb.dll ${HARVEST_TARGET}/tbb/lib/tbb.dll
|
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbbmalloc.lib ${HARVEST_TARGET}/tbb/lib/tbbmalloc.lib
|
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbbmalloc.lib ${HARVEST_TARGET}/tbb/lib/tbbmalloc.lib
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbbmalloc.dll ${HARVEST_TARGET}/tbb/lib/tbbmalloc.dll
|
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbbmalloc.dll ${HARVEST_TARGET}/tbb/lib/tbbmalloc.dll
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbbmalloc_proxy.lib ${HARVEST_TARGET}/tbb/lib/tbbmalloc_proxy.lib
|
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbbmalloc_proxy.lib ${HARVEST_TARGET}/tbb/lib/tbbmalloc_proxy.lib
|
||||||
@@ -62,12 +57,7 @@ if(WIN32)
|
|||||||
endif()
|
endif()
|
||||||
if(BUILD_MODE STREQUAL Debug)
|
if(BUILD_MODE STREQUAL Debug)
|
||||||
ExternalProject_Add_Step(external_tbb after_install
|
ExternalProject_Add_Step(external_tbb after_install
|
||||||
# findtbb.cmake in some deps *NEEDS* to find tbb.lib even if they are not going to use it
|
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb_static.lib ${HARVEST_TARGET}/tbb/lib/tbb_debug.lib
|
||||||
# to make that test pass, we place a copy with the right name in the lib folder.
|
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb_debug.lib ${LIBDIR}/tbb/lib/tbb.lib
|
|
||||||
# Normal collection of build artifacts
|
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb_debug.lib ${HARVEST_TARGET}/tbb/lib/debug/tbb_debug.lib
|
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb_debug.dll ${HARVEST_TARGET}/tbb/lib/debug/tbb_debug.dll
|
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbbmalloc_proxy.lib ${HARVEST_TARGET}/tbb/lib/tbbmalloc_proxy_debug.lib
|
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbbmalloc_proxy.lib ${HARVEST_TARGET}/tbb/lib/tbbmalloc_proxy_debug.lib
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbbmalloc.dll ${HARVEST_TARGET}/tbb/lib/debug/tbbmalloc.dll
|
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbbmalloc.dll ${HARVEST_TARGET}/tbb/lib/debug/tbbmalloc.dll
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbbmalloc_proxy.dll ${HARVEST_TARGET}/tbb/lib/debug/tbbmalloc_proxy.dll
|
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbbmalloc_proxy.dll ${HARVEST_TARGET}/tbb/lib/debug/tbbmalloc_proxy.dll
|
||||||
|
@@ -23,8 +23,8 @@ set(USD_EXTRA_ARGS
|
|||||||
-DBoost_USE_STATIC_RUNTIME=OFF
|
-DBoost_USE_STATIC_RUNTIME=OFF
|
||||||
-DBOOST_ROOT=${LIBDIR}/boost
|
-DBOOST_ROOT=${LIBDIR}/boost
|
||||||
-DTBB_INCLUDE_DIRS=${LIBDIR}/tbb/include
|
-DTBB_INCLUDE_DIRS=${LIBDIR}/tbb/include
|
||||||
-DTBB_LIBRARIES=${LIBDIR}/tbb/lib/${LIBPREFIX}${TBB_LIBRARY}${LIBEXT}
|
-DTBB_LIBRARIES=${LIBDIR}/tbb/lib/${LIBPREFIX}tbb_static${LIBEXT}
|
||||||
-DTbb_TBB_LIBRARY=${LIBDIR}/tbb/lib/${LIBPREFIX}${TBB_LIBRARY}${LIBEXT}
|
-DTbb_TBB_LIBRARY=${LIBDIR}/tbb/lib/${LIBPREFIX}tbb_static${LIBEXT}
|
||||||
|
|
||||||
# This is a preventative measure that avoids possible conflicts when add-ons
|
# This is a preventative measure that avoids possible conflicts when add-ons
|
||||||
# try to load another USD library into the same process space.
|
# try to load another USD library into the same process space.
|
||||||
|
@@ -146,8 +146,8 @@ set(PYTHON_URI https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTH
|
|||||||
set(PYTHON_HASH d33e4aae66097051c2eca45ee3604803)
|
set(PYTHON_HASH d33e4aae66097051c2eca45ee3604803)
|
||||||
|
|
||||||
set(TBB_VERSION 2019_U9)
|
set(TBB_VERSION 2019_U9)
|
||||||
set(TBB_URI https://github.com/oneapi-src/oneTBB/archive/${TBB_VERSION}.tar.gz)
|
set(TBB_URI https://github.com/01org/tbb/archive/${TBB_VERSION}.tar.gz)
|
||||||
set(TBB_HASH 26263622e9187212ec240dcf01b66207)
|
set(TBB_HASH 584edbec127c508f2cd5b6e79ad200fc)
|
||||||
|
|
||||||
set(OPENVDB_VERSION 7.0.0)
|
set(OPENVDB_VERSION 7.0.0)
|
||||||
set(OPENVDB_URI https://github.com/dreamworksanimation/openvdb/archive/v${OPENVDB_VERSION}.tar.gz)
|
set(OPENVDB_URI https://github.com/dreamworksanimation/openvdb/archive/v${OPENVDB_VERSION}.tar.gz)
|
||||||
|
@@ -29,7 +29,6 @@ if(UNIX AND NOT APPLE)
|
|||||||
-DBUILD_WITH_WAYLAND_HEADERS=OFF
|
-DBUILD_WITH_WAYLAND_HEADERS=OFF
|
||||||
-DBUILD_WITH_XCB_HEADERS=OFF
|
-DBUILD_WITH_XCB_HEADERS=OFF
|
||||||
-DBUILD_WITH_XLIB_HEADERS=ON
|
-DBUILD_WITH_XLIB_HEADERS=ON
|
||||||
-DBUILD_WITH_SYSTEM_JSONCPP=OFF
|
|
||||||
-DCMAKE_CXX_FLAGS=-DDISABLE_STD_FILESYSTEM=1
|
-DCMAKE_CXX_FLAGS=-DDISABLE_STD_FILESYSTEM=1
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
@@ -53,18 +53,18 @@ getopt \
|
|||||||
--long source:,install:,tmp:,info:,threads:,help,show-deps,no-sudo,no-build,no-confirm,\
|
--long source:,install:,tmp:,info:,threads:,help,show-deps,no-sudo,no-build,no-confirm,\
|
||||||
with-all,with-opencollada,with-jack,with-embree,with-oidn,\
|
with-all,with-opencollada,with-jack,with-embree,with-oidn,\
|
||||||
ver-ocio:,ver-oiio:,ver-llvm:,ver-osl:,ver-osd:,ver-openvdb:,ver-xr-openxr:,\
|
ver-ocio:,ver-oiio:,ver-llvm:,ver-osl:,ver-osd:,ver-openvdb:,ver-xr-openxr:,\
|
||||||
force-all,force-python,force-numpy,force-boost,force-tbb,\
|
force-all,force-python,force-numpy,force-boost,\
|
||||||
force-ocio,force-openexr,force-oiio,force-llvm,force-osl,force-osd,force-openvdb,\
|
force-ocio,force-openexr,force-oiio,force-llvm,force-osl,force-osd,force-openvdb,\
|
||||||
force-ffmpeg,force-opencollada,force-alembic,force-embree,force-oidn,force-usd,\
|
force-ffmpeg,force-opencollada,force-alembic,force-embree,force-oidn,force-usd,\
|
||||||
force-xr-openxr,\
|
force-xr-openxr,\
|
||||||
build-all,build-python,build-numpy,build-boost,build-tbb,\
|
build-all,build-python,build-numpy,build-boost,\
|
||||||
build-ocio,build-openexr,build-oiio,build-llvm,build-osl,build-osd,build-openvdb,\
|
build-ocio,build-openexr,build-oiio,build-llvm,build-osl,build-osd,build-openvdb,\
|
||||||
build-ffmpeg,build-opencollada,build-alembic,build-embree,build-oidn,build-usd,\
|
build-ffmpeg,build-opencollada,build-alembic,build-embree,build-oidn,build-usd,\
|
||||||
build-xr-openxr,\
|
build-xr-openxr,\
|
||||||
skip-python,skip-numpy,skip-boost,skip-tbb,\
|
skip-python,skip-numpy,skip-boost,\
|
||||||
skip-ocio,skip-openexr,skip-oiio,skip-llvm,skip-osl,skip-osd,skip-openvdb,\
|
skip-ocio,skip-openexr,skip-oiio,skip-llvm,skip-osl,skip-osd,skip-openvdb,\
|
||||||
skip-ffmpeg,skip-opencollada,skip-alembic,skip-embree,skip-oidn,skip-usd,\
|
skip-ffmpeg,skip-opencollada,skip-alembic,skip-embree,skip-oidn,skip-usd, \
|
||||||
skip-xr-openxr \
|
skip-xr-openxr\
|
||||||
-- "$@" \
|
-- "$@" \
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -191,9 +191,6 @@ ARGUMENTS_INFO="\"COMMAND LINE ARGUMENTS:
|
|||||||
--build-boost
|
--build-boost
|
||||||
Force the build of Boost.
|
Force the build of Boost.
|
||||||
|
|
||||||
--build-tbb
|
|
||||||
Force the build of TBB.
|
|
||||||
|
|
||||||
--build-ocio
|
--build-ocio
|
||||||
Force the build of OpenColorIO.
|
Force the build of OpenColorIO.
|
||||||
|
|
||||||
@@ -258,9 +255,6 @@ ARGUMENTS_INFO="\"COMMAND LINE ARGUMENTS:
|
|||||||
--force-boost
|
--force-boost
|
||||||
Force the rebuild of Boost.
|
Force the rebuild of Boost.
|
||||||
|
|
||||||
--force-tbb
|
|
||||||
Force the rebuild of TBB.
|
|
||||||
|
|
||||||
--force-ocio
|
--force-ocio
|
||||||
Force the rebuild of OpenColorIO.
|
Force the rebuild of OpenColorIO.
|
||||||
|
|
||||||
@@ -318,9 +312,6 @@ ARGUMENTS_INFO="\"COMMAND LINE ARGUMENTS:
|
|||||||
--skip-boost
|
--skip-boost
|
||||||
Unconditionally skip Boost installation/building.
|
Unconditionally skip Boost installation/building.
|
||||||
|
|
||||||
--skip-tbb
|
|
||||||
Unconditionally skip TBB installation/building.
|
|
||||||
|
|
||||||
--skip-ocio
|
--skip-ocio
|
||||||
Unconditionally skip OpenColorIO installation/building.
|
Unconditionally skip OpenColorIO installation/building.
|
||||||
|
|
||||||
@@ -394,13 +385,6 @@ BOOST_FORCE_BUILD=false
|
|||||||
BOOST_FORCE_REBUILD=false
|
BOOST_FORCE_REBUILD=false
|
||||||
BOOST_SKIP=false
|
BOOST_SKIP=false
|
||||||
|
|
||||||
TBB_VERSION="2019"
|
|
||||||
TBB_VERSION_UPDATE="_U9" # Used for source packages...
|
|
||||||
TBB_VERSION_MIN="2018"
|
|
||||||
TBB_FORCE_BUILD=false
|
|
||||||
TBB_FORCE_REBUILD=false
|
|
||||||
TBB_SKIP=false
|
|
||||||
|
|
||||||
OCIO_VERSION="1.1.0"
|
OCIO_VERSION="1.1.0"
|
||||||
OCIO_VERSION_MIN="1.0"
|
OCIO_VERSION_MIN="1.0"
|
||||||
OCIO_FORCE_BUILD=false
|
OCIO_FORCE_BUILD=false
|
||||||
@@ -669,7 +653,6 @@ while true; do
|
|||||||
PYTHON_FORCE_BUILD=true
|
PYTHON_FORCE_BUILD=true
|
||||||
NUMPY_FORCE_BUILD=true
|
NUMPY_FORCE_BUILD=true
|
||||||
BOOST_FORCE_BUILD=true
|
BOOST_FORCE_BUILD=true
|
||||||
TBB_FORCE_BUILD=true
|
|
||||||
OCIO_FORCE_BUILD=true
|
OCIO_FORCE_BUILD=true
|
||||||
OPENEXR_FORCE_BUILD=true
|
OPENEXR_FORCE_BUILD=true
|
||||||
OIIO_FORCE_BUILD=true
|
OIIO_FORCE_BUILD=true
|
||||||
@@ -699,9 +682,6 @@ while true; do
|
|||||||
--build-boost)
|
--build-boost)
|
||||||
BOOST_FORCE_BUILD=true; shift; continue
|
BOOST_FORCE_BUILD=true; shift; continue
|
||||||
;;
|
;;
|
||||||
--build-tbb)
|
|
||||||
TBB_FORCE_BUILD=true; shift; continue
|
|
||||||
;;
|
|
||||||
--build-ocio)
|
--build-ocio)
|
||||||
OCIO_FORCE_BUILD=true; shift; continue
|
OCIO_FORCE_BUILD=true; shift; continue
|
||||||
;;
|
;;
|
||||||
@@ -748,7 +728,6 @@ while true; do
|
|||||||
PYTHON_FORCE_REBUILD=true
|
PYTHON_FORCE_REBUILD=true
|
||||||
NUMPY_FORCE_REBUILD=true
|
NUMPY_FORCE_REBUILD=true
|
||||||
BOOST_FORCE_REBUILD=true
|
BOOST_FORCE_REBUILD=true
|
||||||
TBB_FORCE_REBUILD=true
|
|
||||||
OCIO_FORCE_REBUILD=true
|
OCIO_FORCE_REBUILD=true
|
||||||
OPENEXR_FORCE_REBUILD=true
|
OPENEXR_FORCE_REBUILD=true
|
||||||
OIIO_FORCE_REBUILD=true
|
OIIO_FORCE_REBUILD=true
|
||||||
@@ -776,9 +755,6 @@ while true; do
|
|||||||
--force-boost)
|
--force-boost)
|
||||||
BOOST_FORCE_REBUILD=true; shift; continue
|
BOOST_FORCE_REBUILD=true; shift; continue
|
||||||
;;
|
;;
|
||||||
--force-tbb)
|
|
||||||
TBB_FORCE_REBUILD=true; shift; continue
|
|
||||||
;;
|
|
||||||
--force-ocio)
|
--force-ocio)
|
||||||
OCIO_FORCE_REBUILD=true; shift; continue
|
OCIO_FORCE_REBUILD=true; shift; continue
|
||||||
;;
|
;;
|
||||||
@@ -830,9 +806,6 @@ while true; do
|
|||||||
--skip-boost)
|
--skip-boost)
|
||||||
BOOST_SKIP=true; shift; continue
|
BOOST_SKIP=true; shift; continue
|
||||||
;;
|
;;
|
||||||
--skip-tbb)
|
|
||||||
TBB_SKIP=true; shift; continue
|
|
||||||
;;
|
|
||||||
--skip-ocio)
|
--skip-ocio)
|
||||||
OCIO_SKIP=true; shift; continue
|
OCIO_SKIP=true; shift; continue
|
||||||
;;
|
;;
|
||||||
@@ -925,12 +898,9 @@ PYTHON_SOURCE=( "https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHO
|
|||||||
NUMPY_SOURCE=( "https://github.com/numpy/numpy/releases/download/v$NUMPY_VERSION/numpy-$NUMPY_VERSION.tar.gz" )
|
NUMPY_SOURCE=( "https://github.com/numpy/numpy/releases/download/v$NUMPY_VERSION/numpy-$NUMPY_VERSION.tar.gz" )
|
||||||
|
|
||||||
_boost_version_nodots=`echo "$BOOST_VERSION" | sed -r 's/\./_/g'`
|
_boost_version_nodots=`echo "$BOOST_VERSION" | sed -r 's/\./_/g'`
|
||||||
BOOST_SOURCE=( "https://dl.bintray.com/boostorg/release/$BOOST_VERSION/source/boost_$_boost_version_nodots.tar.bz2" )
|
BOOST_SOURCE=( "http://sourceforge.net/projects/boost/files/boost/$BOOST_VERSION/boost_$_boost_version_nodots.tar.bz2/download" )
|
||||||
BOOST_BUILD_MODULES="--with-system --with-filesystem --with-thread --with-regex --with-locale --with-date_time --with-wave --with-iostreams --with-python --with-program_options"
|
BOOST_BUILD_MODULES="--with-system --with-filesystem --with-thread --with-regex --with-locale --with-date_time --with-wave --with-iostreams --with-python --with-program_options"
|
||||||
|
|
||||||
TBB_SOURCE=( "https://github.com/oneapi-src/oneTBB/archive/$TBB_VERSION$TBB_VERSION_UPDATE.tar.gz" )
|
|
||||||
TBB_SOURCE_CMAKE=( "https://raw.githubusercontent.com/wjakob/tbb/master/CMakeLists.txt" )
|
|
||||||
|
|
||||||
OCIO_USE_REPO=false
|
OCIO_USE_REPO=false
|
||||||
OCIO_SOURCE=( "https://github.com/AcademySoftwareFoundation/OpenColorIO/archive/v$OCIO_VERSION.tar.gz")
|
OCIO_SOURCE=( "https://github.com/AcademySoftwareFoundation/OpenColorIO/archive/v$OCIO_VERSION.tar.gz")
|
||||||
#~ OCIO_SOURCE_REPO=( "https://github.com/imageworks/OpenColorIO.git" )
|
#~ OCIO_SOURCE_REPO=( "https://github.com/imageworks/OpenColorIO.git" )
|
||||||
@@ -1041,7 +1011,6 @@ You may also want to build them yourself (optional ones are [between brackets]):
|
|||||||
* Python $PYTHON_VERSION_MIN (from $PYTHON_SOURCE).
|
* Python $PYTHON_VERSION_MIN (from $PYTHON_SOURCE).
|
||||||
* [NumPy $NUMPY_VERSION_MIN] (from $NUMPY_SOURCE).
|
* [NumPy $NUMPY_VERSION_MIN] (from $NUMPY_SOURCE).
|
||||||
* Boost $BOOST_VERSION_MIN (from $BOOST_SOURCE, modules: $BOOST_BUILD_MODULES).
|
* Boost $BOOST_VERSION_MIN (from $BOOST_SOURCE, modules: $BOOST_BUILD_MODULES).
|
||||||
* TBB $TBB_VERSION_MIN (from $TBB_SOURCE).
|
|
||||||
* [FFMpeg $FFMPEG_VERSION_MIN (needs libvorbis, libogg, libtheora, libx264, libmp3lame, libxvidcore, libvpx, ...)] (from $FFMPEG_SOURCE).
|
* [FFMpeg $FFMPEG_VERSION_MIN (needs libvorbis, libogg, libtheora, libx264, libmp3lame, libxvidcore, libvpx, ...)] (from $FFMPEG_SOURCE).
|
||||||
* [OpenColorIO $OCIO_VERSION_MIN] (from $OCIO_SOURCE).
|
* [OpenColorIO $OCIO_VERSION_MIN] (from $OCIO_SOURCE).
|
||||||
* ILMBase $OPENEXR_VERSION_MIN (from $OPENEXR_SOURCE).
|
* ILMBase $OPENEXR_VERSION_MIN (from $OPENEXR_SOURCE).
|
||||||
@@ -1279,10 +1248,8 @@ _update_deps_python() {
|
|||||||
clean_Python() {
|
clean_Python() {
|
||||||
clean_Numpy
|
clean_Numpy
|
||||||
_init_python
|
_init_python
|
||||||
if [ -d $_inst ]; then
|
|
||||||
_update_deps_python
|
|
||||||
fi
|
|
||||||
_clean
|
_clean
|
||||||
|
_update_deps_python
|
||||||
}
|
}
|
||||||
|
|
||||||
compile_Python() {
|
compile_Python() {
|
||||||
@@ -1322,7 +1289,7 @@ compile_Python() {
|
|||||||
|
|
||||||
./configure --prefix=$_inst --libdir=$_inst/lib --enable-ipv6 \
|
./configure --prefix=$_inst --libdir=$_inst/lib --enable-ipv6 \
|
||||||
--enable-loadable-sqlite-extensions --with-dbmliborder=bdb \
|
--enable-loadable-sqlite-extensions --with-dbmliborder=bdb \
|
||||||
--with-computed-gotos --with-pymalloc --enable-shared
|
--with-computed-gotos --with-pymalloc
|
||||||
|
|
||||||
make -j$THREADS && make install
|
make -j$THREADS && make install
|
||||||
make clean
|
make clean
|
||||||
@@ -1343,8 +1310,6 @@ compile_Python() {
|
|||||||
INFO "Own Python-$PYTHON_VERSION is up to date, nothing to do!"
|
INFO "Own Python-$PYTHON_VERSION is up to date, nothing to do!"
|
||||||
INFO "If you want to force rebuild of this lib, use the --force-python option."
|
INFO "If you want to force rebuild of this lib, use the --force-python option."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
run_ldconfig "python-$PYTHON_VERSION_MIN"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# ----------------------------------------------------------------------------
|
# ----------------------------------------------------------------------------
|
||||||
@@ -1365,10 +1330,8 @@ _update_deps_numpy() {
|
|||||||
|
|
||||||
clean_Numpy() {
|
clean_Numpy() {
|
||||||
_init_numpy
|
_init_numpy
|
||||||
if [ -d $_inst ]; then
|
|
||||||
_update_deps_numpy
|
|
||||||
fi
|
|
||||||
_clean
|
_clean
|
||||||
|
_update_deps_numpy
|
||||||
}
|
}
|
||||||
|
|
||||||
compile_Numpy() {
|
compile_Numpy() {
|
||||||
@@ -1453,10 +1416,8 @@ _update_deps_boost() {
|
|||||||
|
|
||||||
clean_Boost() {
|
clean_Boost() {
|
||||||
_init_boost
|
_init_boost
|
||||||
if [ -d $_inst ]; then
|
|
||||||
_update_deps_boost
|
|
||||||
fi
|
|
||||||
_clean
|
_clean
|
||||||
|
_update_deps_boost
|
||||||
}
|
}
|
||||||
|
|
||||||
compile_Boost() {
|
compile_Boost() {
|
||||||
@@ -1521,128 +1482,6 @@ compile_Boost() {
|
|||||||
run_ldconfig "boost"
|
run_ldconfig "boost"
|
||||||
}
|
}
|
||||||
|
|
||||||
# ----------------------------------------------------------------------------
|
|
||||||
# Build TBB
|
|
||||||
|
|
||||||
_init_tbb() {
|
|
||||||
_src=$SRC/TBB-$TBB_VERSION
|
|
||||||
_git=false
|
|
||||||
_inst=$INST/tbb-$TBB_VERSION
|
|
||||||
_inst_shortcut=$INST/tbb
|
|
||||||
}
|
|
||||||
|
|
||||||
_update_deps_tbb() {
|
|
||||||
OSD_FORCE_REBUILD=true
|
|
||||||
OPENVDB_FORCE_REBUILD=true
|
|
||||||
USD_FORCE_REBUILD=true
|
|
||||||
OIDN_FORCE_REBUILD=true
|
|
||||||
if [ "$_is_building" = true ]; then
|
|
||||||
OSD_FORCE_BUILD=true
|
|
||||||
OPENVDB_FORCE_BUILD=true
|
|
||||||
USD_FORCE_BUILD=true
|
|
||||||
OIDN_FORCE_BUILD=true
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
clean_TBB() {
|
|
||||||
_init_tbb
|
|
||||||
if [ -d $_inst ]; then
|
|
||||||
_update_deps_tbb
|
|
||||||
fi
|
|
||||||
_clean
|
|
||||||
}
|
|
||||||
|
|
||||||
compile_TBB() {
|
|
||||||
if [ "$NO_BUILD" = true ]; then
|
|
||||||
WARNING "--no-build enabled, TBB will not be compiled!"
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
|
|
||||||
# To be changed each time we make edits that would modify the compiled result!
|
|
||||||
tbb_magic=0
|
|
||||||
_init_tbb
|
|
||||||
|
|
||||||
# Clean install if needed!
|
|
||||||
magic_compile_check tbb-$TBB_VERSION $tbb_magic
|
|
||||||
if [ $? -eq 1 -o "$TBB_FORCE_REBUILD" = true ]; then
|
|
||||||
clean_TBB
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -d $_inst ]; then
|
|
||||||
INFO "Building TBB-$TBB_VERSION$TBB_VERSION_UPDATE"
|
|
||||||
_is_building=true
|
|
||||||
|
|
||||||
# Rebuild dependencies as well!
|
|
||||||
_update_deps_tbb
|
|
||||||
|
|
||||||
prepare_opt
|
|
||||||
|
|
||||||
if [ ! -d $_src ]; then
|
|
||||||
INFO "Downloading TBB-$TBB_VERSION$TBB_VERSION_UPDATE"
|
|
||||||
mkdir -p $SRC
|
|
||||||
|
|
||||||
download TBB_SOURCE[@] $_src.tar.gz
|
|
||||||
INFO "Unpacking TBB-$TBB_VERSION$TBB_VERSION_UPDATE"
|
|
||||||
tar -C $SRC --transform "s,(.*/?)oneTBB[^/]*(.*),\1TBB-$TBB_VERSION\2,x" \
|
|
||||||
-xf $_src.tar.gz
|
|
||||||
|
|
||||||
INFO
|
|
||||||
|
|
||||||
# Super-hack: Add some cmake builder to tbb... since they don't even have an install target by default, sic.
|
|
||||||
download TBB_SOURCE_CMAKE[@] $_src/CMakeLists.txt
|
|
||||||
cp $_src/build/vs2013/version_string.ver $_src/build/version_string.ver.in
|
|
||||||
fi
|
|
||||||
|
|
||||||
cd $_src
|
|
||||||
|
|
||||||
# Always refresh the whole build!
|
|
||||||
if [ -d cmake_build ]; then
|
|
||||||
rm -rf cmake_build
|
|
||||||
fi
|
|
||||||
mkdir cmake_build
|
|
||||||
cd cmake_build
|
|
||||||
|
|
||||||
cmake_d="-D CMAKE_BUILD_TYPE=Release"
|
|
||||||
cmake_d="$cmake_d -D CMAKE_PREFIX_PATH=$_inst"
|
|
||||||
cmake_d="$cmake_d -D CMAKE_INSTALL_PREFIX=$_inst"
|
|
||||||
cmake_d="$cmake_d -D TBB_BUILD_SHARED=ON"
|
|
||||||
cmake_d="$cmake_d -D TBB_BUILD_STATIC=OFF"
|
|
||||||
cmake_d="$cmake_d -D TBB_BUILD_TBBMALLOC=ON"
|
|
||||||
cmake_d="$cmake_d -D TBB_BUILD_TBBMALLOC_PROXY=OFF"
|
|
||||||
cmake_d="$cmake_d -D TBB_BUILD_TESTS=OFF"
|
|
||||||
|
|
||||||
if file /bin/cp | grep -q '32-bit'; then
|
|
||||||
cflags="-fPIC -m32 -march=i686"
|
|
||||||
else
|
|
||||||
cflags="-fPIC"
|
|
||||||
fi
|
|
||||||
|
|
||||||
cmake $cmake_d -D CMAKE_CXX_FLAGS="$cflags" -D CMAKE_EXE_LINKER_FLAGS="-lgcc_s -lgcc" ..
|
|
||||||
|
|
||||||
make -j$THREADS && make install
|
|
||||||
|
|
||||||
make clean
|
|
||||||
|
|
||||||
if [ -d $_inst ]; then
|
|
||||||
_create_inst_shortcut
|
|
||||||
else
|
|
||||||
ERROR "TBB-$TBB_VERSION$TBB_VERSION_UPDATE failed to compile, exiting"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
magic_compile_set tbb-$TBB_VERSION $tbb_magic
|
|
||||||
|
|
||||||
cd $CWD
|
|
||||||
INFO "Done compiling TBB-$TBB_VERSION$TBB_VERSION_UPDATE!"
|
|
||||||
_is_building=false
|
|
||||||
else
|
|
||||||
INFO "Own TBB-$TBB_VERSION$TBB_VERSION_UPDATE is up to date, nothing to do!"
|
|
||||||
INFO "If you want to force rebuild of this lib, use the --force-tbb option."
|
|
||||||
fi
|
|
||||||
|
|
||||||
run_ldconfig "tbb"
|
|
||||||
}
|
|
||||||
|
|
||||||
# ----------------------------------------------------------------------------
|
# ----------------------------------------------------------------------------
|
||||||
# Build OCIO
|
# Build OCIO
|
||||||
|
|
||||||
@@ -1663,10 +1502,8 @@ _update_deps_ocio() {
|
|||||||
|
|
||||||
clean_OCIO() {
|
clean_OCIO() {
|
||||||
_init_ocio
|
_init_ocio
|
||||||
if [ -d $_inst ]; then
|
|
||||||
_update_deps_ocio
|
|
||||||
fi
|
|
||||||
_clean
|
_clean
|
||||||
|
_update_deps_ocio
|
||||||
}
|
}
|
||||||
|
|
||||||
compile_OCIO() {
|
compile_OCIO() {
|
||||||
@@ -1778,7 +1615,7 @@ compile_OCIO() {
|
|||||||
_init_openexr() {
|
_init_openexr() {
|
||||||
_src=$SRC/OpenEXR-$OPENEXR_VERSION
|
_src=$SRC/OpenEXR-$OPENEXR_VERSION
|
||||||
_git=false
|
_git=false
|
||||||
_inst=$INST/openexr-$OPENEXR_VERSION
|
_inst=$_openexr_inst
|
||||||
_inst_shortcut=$INST/openexr
|
_inst_shortcut=$INST/openexr
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1793,10 +1630,8 @@ _update_deps_openexr() {
|
|||||||
|
|
||||||
clean_OPENEXR() {
|
clean_OPENEXR() {
|
||||||
_init_openexr
|
_init_openexr
|
||||||
if [ -d $_inst ]; then
|
|
||||||
_update_deps_openexr
|
|
||||||
fi
|
|
||||||
_clean
|
_clean
|
||||||
|
_update_deps_openexr
|
||||||
}
|
}
|
||||||
|
|
||||||
compile_OPENEXR() {
|
compile_OPENEXR() {
|
||||||
@@ -1814,6 +1649,7 @@ compile_OPENEXR() {
|
|||||||
clean_OPENEXR
|
clean_OPENEXR
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
_openexr_inst=$INST/openexr-$OPENEXR_VERSION
|
||||||
PRINT ""
|
PRINT ""
|
||||||
_init_openexr
|
_init_openexr
|
||||||
|
|
||||||
@@ -1859,7 +1695,7 @@ compile_OPENEXR() {
|
|||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
|
|
||||||
cmake_d="$cmake_d -D CMAKE_INSTALL_PREFIX=$_inst"
|
cmake_d="$cmake_d -D CMAKE_INSTALL_PREFIX=$_openexr_inst"
|
||||||
cmake_d="$cmake_d -D CMAKE_INSTALL_DOCDIR=/dev/null" # Hack, there is no option to disable that currently...
|
cmake_d="$cmake_d -D CMAKE_INSTALL_DOCDIR=/dev/null" # Hack, there is no option to disable that currently...
|
||||||
cmake_d="$cmake_d -D BUILD_SHARED_LIBS=ON"
|
cmake_d="$cmake_d -D BUILD_SHARED_LIBS=ON"
|
||||||
cmake_d="$cmake_d -D BUILD_TESTING=OFF"
|
cmake_d="$cmake_d -D BUILD_TESTING=OFF"
|
||||||
@@ -1921,10 +1757,8 @@ _update_deps_oiio() {
|
|||||||
|
|
||||||
clean_OIIO() {
|
clean_OIIO() {
|
||||||
_init_oiio
|
_init_oiio
|
||||||
if [ -d $_inst ]; then
|
|
||||||
_update_deps_oiio
|
|
||||||
fi
|
|
||||||
_clean
|
_clean
|
||||||
|
_update_deps_oiio
|
||||||
}
|
}
|
||||||
|
|
||||||
compile_OIIO() {
|
compile_OIIO() {
|
||||||
@@ -2076,10 +1910,8 @@ _update_deps_llvm() {
|
|||||||
|
|
||||||
clean_LLVM() {
|
clean_LLVM() {
|
||||||
_init_llvm
|
_init_llvm
|
||||||
if [ -d $_inst ]; then
|
|
||||||
_update_deps_llvm
|
|
||||||
fi
|
|
||||||
_clean
|
_clean
|
||||||
|
_update_deps_llvm
|
||||||
}
|
}
|
||||||
|
|
||||||
compile_LLVM() {
|
compile_LLVM() {
|
||||||
@@ -2185,10 +2017,8 @@ _update_deps_osl() {
|
|||||||
|
|
||||||
clean_OSL() {
|
clean_OSL() {
|
||||||
_init_osl
|
_init_osl
|
||||||
if [ -d $_inst ]; then
|
|
||||||
_update_deps_osl
|
|
||||||
fi
|
|
||||||
_clean
|
_clean
|
||||||
|
_update_deps_osl
|
||||||
}
|
}
|
||||||
|
|
||||||
compile_OSL() {
|
compile_OSL() {
|
||||||
@@ -2330,10 +2160,8 @@ _update_deps_osd() {
|
|||||||
|
|
||||||
clean_OSD() {
|
clean_OSD() {
|
||||||
_init_osd
|
_init_osd
|
||||||
if [ -d $_inst ]; then
|
|
||||||
_update_deps_osd
|
|
||||||
fi
|
|
||||||
_clean
|
_clean
|
||||||
|
_update_deps_osd
|
||||||
}
|
}
|
||||||
|
|
||||||
compile_OSD() {
|
compile_OSD() {
|
||||||
@@ -2392,9 +2220,6 @@ compile_OSD() {
|
|||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
|
|
||||||
if [ -d $INST/tbb ]; then
|
|
||||||
cmake_d="$cmake_d $cmake_d -D TBB_LOCATION=$INST/tbb"
|
|
||||||
fi
|
|
||||||
cmake_d="-D CMAKE_BUILD_TYPE=Release"
|
cmake_d="-D CMAKE_BUILD_TYPE=Release"
|
||||||
cmake_d="$cmake_d -D CMAKE_INSTALL_PREFIX=$_inst"
|
cmake_d="$cmake_d -D CMAKE_INSTALL_PREFIX=$_inst"
|
||||||
# ptex is only needed when nicholas bishop is ready
|
# ptex is only needed when nicholas bishop is ready
|
||||||
@@ -2447,10 +2272,8 @@ _update_deps_blosc() {
|
|||||||
|
|
||||||
clean_BLOSC() {
|
clean_BLOSC() {
|
||||||
_init_blosc
|
_init_blosc
|
||||||
if [ -d $_inst ]; then
|
|
||||||
_update_deps_blosc
|
|
||||||
fi
|
|
||||||
_clean
|
_clean
|
||||||
|
_update_deps_blosc
|
||||||
}
|
}
|
||||||
|
|
||||||
compile_BLOSC() {
|
compile_BLOSC() {
|
||||||
@@ -2544,10 +2367,8 @@ _update_deps_openvdb() {
|
|||||||
|
|
||||||
clean_OPENVDB() {
|
clean_OPENVDB() {
|
||||||
_init_openvdb
|
_init_openvdb
|
||||||
if [ -d $_inst ]; then
|
|
||||||
_update_deps_openvdb
|
|
||||||
fi
|
|
||||||
_clean
|
_clean
|
||||||
|
_update_deps_openvdb
|
||||||
}
|
}
|
||||||
|
|
||||||
compile_OPENVDB() {
|
compile_OPENVDB() {
|
||||||
@@ -2606,9 +2427,6 @@ compile_OPENVDB() {
|
|||||||
if [ -d $INST/boost ]; then
|
if [ -d $INST/boost ]; then
|
||||||
make_d="$make_d BOOST_INCL_DIR=$INST/boost/include BOOST_LIB_DIR=$INST/boost/lib"
|
make_d="$make_d BOOST_INCL_DIR=$INST/boost/include BOOST_LIB_DIR=$INST/boost/lib"
|
||||||
fi
|
fi
|
||||||
if [ -d $INST/tbb ]; then
|
|
||||||
make_d="$make_d TBB_ROOT=$INST/tbb TBB_USE_STATIC_LIBS=OFF"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$_with_built_openexr" = true ]; then
|
if [ "$_with_built_openexr" = true ]; then
|
||||||
make_d="$make_d ILMBASE_INCL_DIR=$INST/openexr/include ILMBASE_LIB_DIR=$INST/openexr/lib"
|
make_d="$make_d ILMBASE_INCL_DIR=$INST/openexr/include ILMBASE_LIB_DIR=$INST/openexr/lib"
|
||||||
@@ -2662,10 +2480,8 @@ _update_deps_alembic() {
|
|||||||
|
|
||||||
clean_ALEMBIC() {
|
clean_ALEMBIC() {
|
||||||
_init_alembic
|
_init_alembic
|
||||||
if [ -d $_inst ]; then
|
|
||||||
_update_deps_alembic
|
|
||||||
fi
|
|
||||||
_clean
|
_clean
|
||||||
|
_update_deps_alembic
|
||||||
}
|
}
|
||||||
|
|
||||||
compile_ALEMBIC() {
|
compile_ALEMBIC() {
|
||||||
@@ -2767,10 +2583,8 @@ _update_deps_usd() {
|
|||||||
|
|
||||||
clean_USD() {
|
clean_USD() {
|
||||||
_init_usd
|
_init_usd
|
||||||
if [ -d $_inst ]; then
|
|
||||||
_update_deps_usd
|
|
||||||
fi
|
|
||||||
_clean
|
_clean
|
||||||
|
_update_deps_usd
|
||||||
}
|
}
|
||||||
|
|
||||||
compile_USD() {
|
compile_USD() {
|
||||||
@@ -2814,10 +2628,6 @@ compile_USD() {
|
|||||||
if [ -d $INST/boost ]; then
|
if [ -d $INST/boost ]; then
|
||||||
cmake_d="$cmake_d $cmake_d -D BOOST_ROOT=$INST/boost"
|
cmake_d="$cmake_d $cmake_d -D BOOST_ROOT=$INST/boost"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -d $INST/tbb ]; then
|
|
||||||
cmake_d="$cmake_d $cmake_d -D TBB_ROOT_DIR=$INST/tbb"
|
|
||||||
fi
|
|
||||||
cmake_d="$cmake_d -DPXR_SET_INTERNAL_NAMESPACE=usdBlender"
|
cmake_d="$cmake_d -DPXR_SET_INTERNAL_NAMESPACE=usdBlender"
|
||||||
cmake_d="$cmake_d -DPXR_ENABLE_PYTHON_SUPPORT=OFF"
|
cmake_d="$cmake_d -DPXR_ENABLE_PYTHON_SUPPORT=OFF"
|
||||||
cmake_d="$cmake_d -DPXR_BUILD_IMAGING=OFF"
|
cmake_d="$cmake_d -DPXR_BUILD_IMAGING=OFF"
|
||||||
@@ -2842,7 +2652,7 @@ compile_USD() {
|
|||||||
|
|
||||||
cd $CWD
|
cd $CWD
|
||||||
INFO "Done compiling USD-$USD_VERSION!"
|
INFO "Done compiling USD-$USD_VERSION!"
|
||||||
_is_building=false
|
_is_building=true
|
||||||
else
|
else
|
||||||
INFO "Own USD-$USD_VERSION is up to date, nothing to do!"
|
INFO "Own USD-$USD_VERSION is up to date, nothing to do!"
|
||||||
INFO "If you want to force rebuild of this lib, use the --force-usd option."
|
INFO "If you want to force rebuild of this lib, use the --force-usd option."
|
||||||
@@ -2866,10 +2676,8 @@ _update_deps_collada() {
|
|||||||
|
|
||||||
clean_OpenCOLLADA() {
|
clean_OpenCOLLADA() {
|
||||||
_init_opencollada
|
_init_opencollada
|
||||||
if [ -d $_inst ]; then
|
|
||||||
_update_deps_collada
|
|
||||||
fi
|
|
||||||
_clean
|
_clean
|
||||||
|
_update_deps_collada
|
||||||
}
|
}
|
||||||
|
|
||||||
compile_OpenCOLLADA() {
|
compile_OpenCOLLADA() {
|
||||||
@@ -2972,10 +2780,8 @@ _update_deps_embree() {
|
|||||||
|
|
||||||
clean_Embree() {
|
clean_Embree() {
|
||||||
_init_embree
|
_init_embree
|
||||||
if [ -d $_inst ]; then
|
|
||||||
_update_deps_embree
|
|
||||||
fi
|
|
||||||
_clean
|
_clean
|
||||||
|
_update_deps_embree
|
||||||
}
|
}
|
||||||
|
|
||||||
compile_Embree() {
|
compile_Embree() {
|
||||||
@@ -3081,10 +2887,8 @@ _update_deps_oidn() {
|
|||||||
|
|
||||||
clean_oidn() {
|
clean_oidn() {
|
||||||
_init_oidn
|
_init_oidn
|
||||||
if [ -d $_inst ]; then
|
|
||||||
_update_deps_oidn
|
|
||||||
fi
|
|
||||||
_clean
|
_clean
|
||||||
|
_update_deps_oidn
|
||||||
}
|
}
|
||||||
|
|
||||||
compile_OIDN() {
|
compile_OIDN() {
|
||||||
@@ -3146,10 +2950,6 @@ compile_OIDN() {
|
|||||||
cmake_d="$cmake_d -D WITH_TEST=OFF"
|
cmake_d="$cmake_d -D WITH_TEST=OFF"
|
||||||
cmake_d="$cmake_d -D OIDN_STATIC_LIB=ON"
|
cmake_d="$cmake_d -D OIDN_STATIC_LIB=ON"
|
||||||
|
|
||||||
if [ -d $INST/tbb ]; then
|
|
||||||
make_d="$make_d TBB_ROOT=$INST/tbb"
|
|
||||||
fi
|
|
||||||
|
|
||||||
cmake $cmake_d ../
|
cmake $cmake_d ../
|
||||||
|
|
||||||
make -j$THREADS && make install
|
make -j$THREADS && make install
|
||||||
@@ -3190,10 +2990,8 @@ _update_deps_ffmpeg() {
|
|||||||
|
|
||||||
clean_FFmpeg() {
|
clean_FFmpeg() {
|
||||||
_init_ffmpeg
|
_init_ffmpeg
|
||||||
if [ -d $_inst ]; then
|
|
||||||
_update_deps_ffmpeg
|
|
||||||
fi
|
|
||||||
_clean
|
_clean
|
||||||
|
_update_deps_ffmpeg
|
||||||
}
|
}
|
||||||
|
|
||||||
compile_FFmpeg() {
|
compile_FFmpeg() {
|
||||||
@@ -3319,10 +3117,8 @@ _update_deps_xr_openxr_sdk() {
|
|||||||
|
|
||||||
clean_XR_OpenXR_SDK() {
|
clean_XR_OpenXR_SDK() {
|
||||||
_init_xr_openxr_sdk
|
_init_xr_openxr_sdk
|
||||||
if [ -d $_inst ]; then
|
|
||||||
_update_deps_xr_openxr_sdk
|
|
||||||
fi
|
|
||||||
_clean
|
_clean
|
||||||
|
_update_deps_xr_openxr_sdk
|
||||||
}
|
}
|
||||||
|
|
||||||
compile_XR_OpenXR_SDK() {
|
compile_XR_OpenXR_SDK() {
|
||||||
@@ -3332,11 +3128,11 @@ compile_XR_OpenXR_SDK() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# To be changed each time we make edits that would modify the compiled result!
|
# To be changed each time we make edits that would modify the compiled result!
|
||||||
xr_openxr_magic=2
|
xr_openxr_magic=1
|
||||||
_init_xr_openxr_sdk
|
_init_xr_openxr_sdk
|
||||||
|
|
||||||
# Clean install if needed!
|
# Clean install if needed!
|
||||||
magic_compile_check xr-openxr-$XR_OPENXR_VERSION $xr_openxr_magic
|
magic_compile_check xr-openxr-$OPENXR_VERSION $xr_openxr_magic
|
||||||
if [ $? -eq 1 -o "$XR_OPENXR_FORCE_REBUILD" = true ]; then
|
if [ $? -eq 1 -o "$XR_OPENXR_FORCE_REBUILD" = true ]; then
|
||||||
clean_XR_OpenXR_SDK
|
clean_XR_OpenXR_SDK
|
||||||
fi
|
fi
|
||||||
@@ -3389,7 +3185,6 @@ compile_XR_OpenXR_SDK() {
|
|||||||
cmake_d="$cmake_d -D BUILD_WITH_WAYLAND_HEADERS=OFF"
|
cmake_d="$cmake_d -D BUILD_WITH_WAYLAND_HEADERS=OFF"
|
||||||
cmake_d="$cmake_d -D BUILD_WITH_XCB_HEADERS=OFF"
|
cmake_d="$cmake_d -D BUILD_WITH_XCB_HEADERS=OFF"
|
||||||
cmake_d="$cmake_d -D BUILD_WITH_XLIB_HEADERS=ON"
|
cmake_d="$cmake_d -D BUILD_WITH_XLIB_HEADERS=ON"
|
||||||
cmake_d="$cmake_d -D BUILD_WITH_SYSTEM_JSONCPP=OFF"
|
|
||||||
|
|
||||||
cmake $cmake_d "-DCMAKE_CXX_FLAGS=-DDISABLE_STD_FILESYSTEM=1" ..
|
cmake $cmake_d "-DCMAKE_CXX_FLAGS=-DDISABLE_STD_FILESYSTEM=1" ..
|
||||||
|
|
||||||
@@ -3513,7 +3308,7 @@ install_DEB() {
|
|||||||
THEORA_DEV="libtheora-dev"
|
THEORA_DEV="libtheora-dev"
|
||||||
|
|
||||||
_packages="gawk cmake cmake-curses-gui build-essential libjpeg-dev libpng-dev libtiff-dev \
|
_packages="gawk cmake cmake-curses-gui build-essential libjpeg-dev libpng-dev libtiff-dev \
|
||||||
git libfreetype6-dev libx11-dev flex bison libxxf86vm-dev \
|
git libfreetype6-dev libx11-dev flex bison libtbb-dev libxxf86vm-dev \
|
||||||
libxcursor-dev libxi-dev wget libsqlite3-dev libxrandr-dev libxinerama-dev \
|
libxcursor-dev libxi-dev wget libsqlite3-dev libxrandr-dev libxinerama-dev \
|
||||||
libbz2-dev libncurses5-dev libssl-dev liblzma-dev libreadline-dev \
|
libbz2-dev libncurses5-dev libssl-dev liblzma-dev libreadline-dev \
|
||||||
libopenal-dev libglew-dev yasm $THEORA_DEV $VORBIS_DEV $OGG_DEV \
|
libopenal-dev libglew-dev yasm $THEORA_DEV $VORBIS_DEV $OGG_DEV \
|
||||||
@@ -3722,23 +3517,6 @@ install_DEB() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
PRINT ""
|
|
||||||
if [ "$TBB_SKIP" = true ]; then
|
|
||||||
WARNING "Skipping TBB installation, as requested..."
|
|
||||||
elif [ "$TBB_FORCE_BUILD" = true ]; then
|
|
||||||
INFO "Forced TBB building, as requested..."
|
|
||||||
compile_TBB
|
|
||||||
else
|
|
||||||
check_package_version_ge_DEB libtbb-dev $TBB_VERSION_MIN
|
|
||||||
if [ $? -eq 0 ]; then
|
|
||||||
install_packages_DEB libtbb-dev
|
|
||||||
clean_TBB
|
|
||||||
else
|
|
||||||
compile_TBB
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
PRINT ""
|
PRINT ""
|
||||||
if [ "$OCIO_SKIP" = true ]; then
|
if [ "$OCIO_SKIP" = true ]; then
|
||||||
WARNING "Skipping OpenColorIO installation, as requested..."
|
WARNING "Skipping OpenColorIO installation, as requested..."
|
||||||
@@ -4175,7 +3953,7 @@ install_RPM() {
|
|||||||
THEORA_USE=true
|
THEORA_USE=true
|
||||||
|
|
||||||
if [ "$RPM" = "FEDORA" -o "$RPM" = "RHEL" ]; then
|
if [ "$RPM" = "FEDORA" -o "$RPM" = "RHEL" ]; then
|
||||||
_packages="$_packages freetype-devel"
|
_packages="$_packages freetype-devel tbb-devel"
|
||||||
|
|
||||||
if [ "$WITH_JACK" = true ]; then
|
if [ "$WITH_JACK" = true ]; then
|
||||||
_packages="$_packages jack-audio-connection-kit-devel"
|
_packages="$_packages jack-audio-connection-kit-devel"
|
||||||
@@ -4216,6 +3994,17 @@ install_RPM() {
|
|||||||
PRINT ""
|
PRINT ""
|
||||||
install_packages_RPM $_packages
|
install_packages_RPM $_packages
|
||||||
|
|
||||||
|
PRINT ""
|
||||||
|
# Install TBB on openSUSE, from temporary repo
|
||||||
|
check_package_RPM tbb-devel
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
install_packages_RPM tbb-devel
|
||||||
|
else
|
||||||
|
$SUDO zypper ar -f http://download.opensuse.org/repositories/devel:/libraries:/c_c++/openSUSE_$_suse_rel/devel:libraries:c_c++.repo
|
||||||
|
$SUDO zypper -n --gpg-auto-import-keys install tbb-devel
|
||||||
|
$SUDO zypper rr devel_libraries_c_c++
|
||||||
|
fi
|
||||||
|
|
||||||
PRINT ""
|
PRINT ""
|
||||||
X264_DEV="libx264-devel"
|
X264_DEV="libx264-devel"
|
||||||
check_package_version_ge_RPM $X264_DEV $X264_VERSION_MIN
|
check_package_version_ge_RPM $X264_DEV $X264_VERSION_MIN
|
||||||
@@ -4351,23 +4140,6 @@ install_RPM() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
PRINT ""
|
|
||||||
if [ "$TBB_SKIP" = true ]; then
|
|
||||||
WARNING "Skipping TBB installation, as requested..."
|
|
||||||
elif [ "$TBB_FORCE_BUILD" = true ]; then
|
|
||||||
INFO "Forced TBB building, as requested..."
|
|
||||||
compile_TBB
|
|
||||||
else
|
|
||||||
check_package_version_ge_RPM tbb-devel $TBB_VERSION_MIN
|
|
||||||
if [ $? -eq 0 ]; then
|
|
||||||
install_packages_RPM tbb-devel
|
|
||||||
clean_TBB
|
|
||||||
else
|
|
||||||
compile_TBB
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
PRINT ""
|
PRINT ""
|
||||||
if [ "$OCIO_SKIP" = true ]; then
|
if [ "$OCIO_SKIP" = true ]; then
|
||||||
WARNING "Skipping OpenColorIO installation, as requested..."
|
WARNING "Skipping OpenColorIO installation, as requested..."
|
||||||
@@ -4724,7 +4496,7 @@ install_ARCH() {
|
|||||||
|
|
||||||
_packages="$BASE_DEVEL git cmake \
|
_packages="$BASE_DEVEL git cmake \
|
||||||
libxi libxcursor libxrandr libxinerama glew libpng libtiff wget openal \
|
libxi libxcursor libxrandr libxinerama glew libpng libtiff wget openal \
|
||||||
$OPENJPEG_DEV $VORBIS_DEV $OGG_DEV $THEORA_DEV yasm sdl fftw \
|
$OPENJPEG_DEV $VORBIS_DEV $OGG_DEV $THEORA_DEV yasm sdl fftw intel-tbb \
|
||||||
libxml2 yaml-cpp tinyxml python-requests jemalloc"
|
libxml2 yaml-cpp tinyxml python-requests jemalloc"
|
||||||
|
|
||||||
OPENJPEG_USE=true
|
OPENJPEG_USE=true
|
||||||
@@ -4863,23 +4635,6 @@ install_ARCH() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
PRINT ""
|
|
||||||
if [ "$TBB_SKIP" = true ]; then
|
|
||||||
WARNING "Skipping TBB installation, as requested..."
|
|
||||||
elif [ "$TBB_FORCE_BUILD" = true ]; then
|
|
||||||
INFO "Forced TBB building, as requested..."
|
|
||||||
compile_TBB
|
|
||||||
else
|
|
||||||
check_package_version_ge_ARCH intel-tbb $TBB_VERSION_MIN
|
|
||||||
if [ $? -eq 0 ]; then
|
|
||||||
install_packages_ARCH intel-tbb
|
|
||||||
clean_TBB
|
|
||||||
else
|
|
||||||
compile_TBB
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
PRINT ""
|
PRINT ""
|
||||||
if [ "$OCIO_SKIP" = true ]; then
|
if [ "$OCIO_SKIP" = true ]; then
|
||||||
WARNING "Skipping OpenColorIO installation, as requested..."
|
WARNING "Skipping OpenColorIO installation, as requested..."
|
||||||
@@ -5174,10 +4929,15 @@ install_OTHER() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
PRINT ""
|
PRINT ""
|
||||||
|
_do_compile_python=false
|
||||||
if [ "$PYTHON_SKIP" = true ]; then
|
if [ "$PYTHON_SKIP" = true ]; then
|
||||||
WARNING "Skipping Python/NumPy installation, as requested..."
|
WARNING "Skipping Python/NumPy installation, as requested..."
|
||||||
elif [ "$PYTHON_FORCE_BUILD" = true ]; then
|
elif [ "$PYTHON_FORCE_BUILD" = true ]; then
|
||||||
INFO "Forced Python/NumPy building, as requested..."
|
INFO "Forced Python/NumPy building, as requested..."
|
||||||
|
_do_compile_python=true
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$_do_compile_python" = true ]; then
|
||||||
compile_Python
|
compile_Python
|
||||||
PRINT ""
|
PRINT ""
|
||||||
if [ "$NUMPY_SKIP" = true ]; then
|
if [ "$NUMPY_SKIP" = true ]; then
|
||||||
@@ -5197,15 +4957,6 @@ install_OTHER() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
PRINT ""
|
|
||||||
if [ "$TBB_SKIP" = true ]; then
|
|
||||||
WARNING "Skipping TBB installation, as requested..."
|
|
||||||
elif [ "$TBB_FORCE_BUILD" = true ]; then
|
|
||||||
INFO "Forced TBB building, as requested..."
|
|
||||||
compile_TBB
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
PRINT ""
|
PRINT ""
|
||||||
if [ "$OCIO_SKIP" = true ]; then
|
if [ "$OCIO_SKIP" = true ]; then
|
||||||
WARNING "Skipping OpenColorIO installation, as requested..."
|
WARNING "Skipping OpenColorIO installation, as requested..."
|
||||||
@@ -5235,10 +4986,16 @@ install_OTHER() {
|
|||||||
|
|
||||||
PRINT ""
|
PRINT ""
|
||||||
have_llvm=false
|
have_llvm=false
|
||||||
|
_do_compile_llvm=false
|
||||||
if [ "$LLVM_SKIP" = true ]; then
|
if [ "$LLVM_SKIP" = true ]; then
|
||||||
WARNING "Skipping LLVM installation, as requested (this also implies skipping OSL!)..."
|
WARNING "Skipping LLVM installation, as requested (this also implies skipping OSL!)..."
|
||||||
elif [ "$LLVM_FORCE_BUILD" = true ]; then
|
elif [ "$LLVM_FORCE_BUILD" = true ]; then
|
||||||
INFO "Forced LLVM building, as requested..."
|
INFO "Forced LLVM building, as requested..."
|
||||||
|
_do_compile_llvm=true
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$_do_compile_llvm" = true ]; then
|
||||||
|
PRINT ""
|
||||||
compile_LLVM
|
compile_LLVM
|
||||||
have_llvm=true
|
have_llvm=true
|
||||||
LLVM_VERSION_FOUND=$LLVM_VERSION
|
LLVM_VERSION_FOUND=$LLVM_VERSION
|
||||||
@@ -5246,10 +5003,15 @@ install_OTHER() {
|
|||||||
|
|
||||||
|
|
||||||
PRINT ""
|
PRINT ""
|
||||||
|
_do_compile_osl=false
|
||||||
if [ "$OSL_SKIP" = true ]; then
|
if [ "$OSL_SKIP" = true ]; then
|
||||||
WARNING "Skipping OpenShadingLanguage installation, as requested..."
|
WARNING "Skipping OpenShadingLanguage installation, as requested..."
|
||||||
elif [ "$OSL_FORCE_BUILD" = true ]; then
|
elif [ "$OSL_FORCE_BUILD" = true ]; then
|
||||||
INFO "Forced OpenShadingLanguage building, as requested..."
|
INFO "Forced OpenShadingLanguage building, as requested..."
|
||||||
|
_do_compile_osl=true
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$_do_compile_osl" = true ]; then
|
||||||
if [ "$have_llvm" = true ]; then
|
if [ "$have_llvm" = true ]; then
|
||||||
PRINT ""
|
PRINT ""
|
||||||
compile_OSL
|
compile_OSL
|
||||||
@@ -5260,40 +5022,66 @@ install_OTHER() {
|
|||||||
|
|
||||||
|
|
||||||
PRINT ""
|
PRINT ""
|
||||||
|
_do_compile_osd=false
|
||||||
if [ "$OSD_SKIP" = true ]; then
|
if [ "$OSD_SKIP" = true ]; then
|
||||||
WARNING "Skipping OpenSubdiv installation, as requested..."
|
WARNING "Skipping OpenSubdiv installation, as requested..."
|
||||||
elif [ "$OSD_FORCE_BUILD" = true ]; then
|
elif [ "$OSD_FORCE_BUILD" = true ]; then
|
||||||
INFO "Forced OpenSubdiv building, as requested..."
|
INFO "Forced OpenSubdiv building, as requested..."
|
||||||
|
_do_compile_osd=true
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$_do_compile_osd" = true ]; then
|
||||||
|
PRINT ""
|
||||||
compile_OSD
|
compile_OSD
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
if [ "$WITH_OPENCOLLADA" = true ]; then
|
if [ "$WITH_OPENCOLLADA" = true ]; then
|
||||||
|
_do_compile_collada=false
|
||||||
PRINT ""
|
PRINT ""
|
||||||
if [ "$OPENCOLLADA_SKIP" = true ]; then
|
if [ "$OPENCOLLADA_SKIP" = true ]; then
|
||||||
WARNING "Skipping OpenCOLLADA installation, as requested..."
|
WARNING "Skipping OpenCOLLADA installation, as requested..."
|
||||||
elif [ "$OPENCOLLADA_FORCE_BUILD" = true ]; then
|
elif [ "$OPENCOLLADA_FORCE_BUILD" = true ]; then
|
||||||
INFO "Forced OpenCollada building, as requested..."
|
INFO "Forced OpenCollada building, as requested..."
|
||||||
|
_do_compile_collada=true
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$_do_compile_collada" = true ]; then
|
||||||
|
PRINT ""
|
||||||
compile_OpenCOLLADA
|
compile_OpenCOLLADA
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$WITH_EMBREE" = true ]; then
|
if [ "$WITH_EMBREE" = true ]; then
|
||||||
|
_do_compile_embree=false
|
||||||
PRINT ""
|
PRINT ""
|
||||||
if [ "$EMBREE_SKIP" = true ]; then
|
if [ "$EMBREE_SKIP" = true ]; then
|
||||||
WARNING "Skipping Embree installation, as requested..."
|
WARNING "Skipping Embree installation, as requested..."
|
||||||
elif [ "$EMBREE_FORCE_BUILD" = true ]; then
|
elif [ "$EMBREE_FORCE_BUILD" = true ]; then
|
||||||
INFO "Forced Embree building, as requested..."
|
INFO "Forced Embree building, as requested..."
|
||||||
|
_do_compile_embree=true
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$_do_compile_embree" = true ]; then
|
||||||
|
PRINT ""
|
||||||
compile_Embree
|
compile_Embree
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$WITH_OIDN" = true ]; then
|
if [ "$WITH_OIDN" = true ]; then
|
||||||
|
_do_compile_oidn=false
|
||||||
PRINT ""
|
PRINT ""
|
||||||
if [ "$OIDN_SKIP" = true ]; then
|
if [ "$OIDN_SKIP" = true ]; then
|
||||||
WARNING "Skipping OpenImgeDenoise installation, as requested..."
|
WARNING "Skipping OpenImgeDenoise installation, as requested..."
|
||||||
elif [ "$OIDN_FORCE_BUILD" = true ]; then
|
elif [ "$OIDN_FORCE_BUILD" = true ]; then
|
||||||
INFO "Forced OpenImageDenoise building, as requested..."
|
INFO "Forced OpenImageDenoise building, as requested..."
|
||||||
|
_do_compile_oidn=true
|
||||||
|
else
|
||||||
|
# No package currently!
|
||||||
|
_do_compile_oidn=true
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$_do_compile_oidn" = true ]; then
|
||||||
compile_OIDN
|
compile_OIDN
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@@ -5312,6 +5100,9 @@ install_OTHER() {
|
|||||||
elif [ "$XR_OPENXR_FORCE_BUILD" = true ]; then
|
elif [ "$XR_OPENXR_FORCE_BUILD" = true ]; then
|
||||||
INFO "Forced OpenXR-SDK building, as requested..."
|
INFO "Forced OpenXR-SDK building, as requested..."
|
||||||
compile_XR_OpenXR_SDK
|
compile_XR_OpenXR_SDK
|
||||||
|
else
|
||||||
|
# No package currently!
|
||||||
|
compile_XR_OpenXR_SDK
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5397,7 +5188,7 @@ print_info() {
|
|||||||
PRINT ""
|
PRINT ""
|
||||||
PRINT "If you're using CMake add this to your configuration flags:"
|
PRINT "If you're using CMake add this to your configuration flags:"
|
||||||
|
|
||||||
_buildargs="-U *SNDFILE* -U PYTHON* -U *BOOST* -U *Boost* -U *TBB*"
|
_buildargs="-U *SNDFILE* -U *PYTHON* -U *BOOST* -U *Boost*"
|
||||||
_buildargs="$_buildargs -U *OPENCOLORIO* -U *OPENEXR* -U *OPENIMAGEIO* -U *LLVM* -U *CYCLES*"
|
_buildargs="$_buildargs -U *OPENCOLORIO* -U *OPENEXR* -U *OPENIMAGEIO* -U *LLVM* -U *CYCLES*"
|
||||||
_buildargs="$_buildargs -U *OPENSUBDIV* -U *OPENVDB* -U *COLLADA* -U *FFMPEG* -U *ALEMBIC* -U *USD*"
|
_buildargs="$_buildargs -U *OPENSUBDIV* -U *OPENVDB* -U *COLLADA* -U *FFMPEG* -U *ALEMBIC* -U *USD*"
|
||||||
|
|
||||||
@@ -5422,12 +5213,6 @@ print_info() {
|
|||||||
_buildargs="$_buildargs $_1 $_2"
|
_buildargs="$_buildargs $_1 $_2"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -d $INST/tbb ]; then
|
|
||||||
_1="-D TBB_ROOT_DIR=$INST/tbb"
|
|
||||||
PRINT " $_1"
|
|
||||||
_buildargs="$_buildargs $_1"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$OCIO_SKIP" = false ]; then
|
if [ "$OCIO_SKIP" = false ]; then
|
||||||
_1="-D WITH_OPENCOLORIO=ON"
|
_1="-D WITH_OPENCOLORIO=ON"
|
||||||
PRINT " $_1"
|
PRINT " $_1"
|
||||||
@@ -5566,11 +5351,6 @@ print_info() {
|
|||||||
_1="-D WITH_USD=ON"
|
_1="-D WITH_USD=ON"
|
||||||
PRINT " $_1"
|
PRINT " $_1"
|
||||||
_buildargs="$_buildargs $_1"
|
_buildargs="$_buildargs $_1"
|
||||||
if [ -d $INST/usd ]; then
|
|
||||||
_1="-D USD_ROOT_DIR=$INST/usd"
|
|
||||||
PRINT " $_1"
|
|
||||||
_buildargs="$_buildargs $_1"
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$NO_SYSTEM_GLEW" = true ]; then
|
if [ "$NO_SYSTEM_GLEW" = true ]; then
|
||||||
|
@@ -109,9 +109,6 @@ if (WIN32)
|
|||||||
MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/src/tbbmalloc/${ARCH_PREFIX}-tbbmalloc-export.def
|
MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/src/tbbmalloc/${ARCH_PREFIX}-tbbmalloc-export.def
|
||||||
COMMENT "Preprocessing tbbmalloc.def"
|
COMMENT "Preprocessing tbbmalloc.def"
|
||||||
)
|
)
|
||||||
list(APPEND tbb_src ${CMAKE_CURRENT_SOURCE_DIR}/src/tbb/tbb_resource.rc)
|
|
||||||
list(APPEND tbbmalloc_src ${CMAKE_CURRENT_SOURCE_DIR}/src/tbbmalloc/tbbmalloc.rc)
|
|
||||||
list(APPEND tbbmalloc_proxy_src ${CMAKE_CURRENT_SOURCE_DIR}/src/tbbmalloc/tbbmalloc.rc)
|
|
||||||
else()
|
else()
|
||||||
add_custom_command(OUTPUT tbb.def
|
add_custom_command(OUTPUT tbb.def
|
||||||
COMMAND ${CMAKE_CXX_COMPILER} -xc++ -E ${CMAKE_CURRENT_SOURCE_DIR}/src/tbb/${ARCH_PREFIX}-tbb-export.def -I ${CMAKE_CURRENT_SOURCE_DIR}/include -o tbb.def
|
COMMAND ${CMAKE_CXX_COMPILER} -xc++ -E ${CMAKE_CURRENT_SOURCE_DIR}/src/tbb/${ARCH_PREFIX}-tbb-export.def -I ${CMAKE_CURRENT_SOURCE_DIR}/include -o tbb.def
|
||||||
@@ -148,12 +145,8 @@ if (TBB_BUILD_SHARED)
|
|||||||
set_property(TARGET tbb APPEND PROPERTY LINK_FLAGS "-Wl,-version-script,${CMAKE_CURRENT_BINARY_DIR}/tbb.def")
|
set_property(TARGET tbb APPEND PROPERTY LINK_FLAGS "-Wl,-version-script,${CMAKE_CURRENT_BINARY_DIR}/tbb.def")
|
||||||
elseif(WIN32)
|
elseif(WIN32)
|
||||||
set_property(TARGET tbb APPEND PROPERTY LINK_FLAGS "/DEF:${CMAKE_CURRENT_BINARY_DIR}/tbb.def")
|
set_property(TARGET tbb APPEND PROPERTY LINK_FLAGS "/DEF:${CMAKE_CURRENT_BINARY_DIR}/tbb.def")
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
install(TARGETS tbb DESTINATION lib)
|
install(TARGETS tbb DESTINATION lib)
|
||||||
if(WIN32)
|
|
||||||
set_target_properties(tbb PROPERTIES OUTPUT_NAME "tbb$<$<CONFIG:Debug>:_debug>")
|
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(CMAKE_COMPILER_IS_GNUCC)
|
if(CMAKE_COMPILER_IS_GNUCC)
|
||||||
@@ -203,7 +196,7 @@ if(TBB_BUILD_TBBMALLOC_PROXY)
|
|||||||
add_library(tbbmalloc_proxy SHARED ${tbbmalloc_proxy_src})
|
add_library(tbbmalloc_proxy SHARED ${tbbmalloc_proxy_src})
|
||||||
set_property(TARGET tbbmalloc_proxy APPEND PROPERTY COMPILE_DEFINITIONS "__TBBMALLOC_BUILD=1")
|
set_property(TARGET tbbmalloc_proxy APPEND PROPERTY COMPILE_DEFINITIONS "__TBBMALLOC_BUILD=1")
|
||||||
set_property(TARGET tbbmalloc_proxy APPEND_STRING PROPERTY COMPILE_FLAGS ${DISABLE_RTTI})
|
set_property(TARGET tbbmalloc_proxy APPEND_STRING PROPERTY COMPILE_FLAGS ${DISABLE_RTTI})
|
||||||
target_link_libraries(tbbmalloc_proxy tbbmalloc)
|
link_libraries(tbbmalloc_proxy tbbmalloc)
|
||||||
install(TARGETS tbbmalloc_proxy DESTINATION lib)
|
install(TARGETS tbbmalloc_proxy DESTINATION lib)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
@@ -18,6 +18,17 @@ diff --git a/mkl-dnn/cmake/TBB.cmake b/mkl-dnn/cmake/TBB.cmake
|
|||||||
index 0711e699..c14210b6 100644
|
index 0711e699..c14210b6 100644
|
||||||
--- a/mkl-dnn/cmake/TBB.cmake
|
--- a/mkl-dnn/cmake/TBB.cmake
|
||||||
+++ b/mkl-dnn/cmake/TBB.cmake
|
+++ b/mkl-dnn/cmake/TBB.cmake
|
||||||
|
@@ -90,8 +90,8 @@ if(WIN32)
|
||||||
|
NO_DEFAULT_PATH
|
||||||
|
)
|
||||||
|
set(TBB_LIB_DIR ${TBB_ROOT}/lib/${TBB_ARCH}/${TBB_VCVER})
|
||||||
|
- find_library(TBB_LIBRARY tbb PATHS ${TBB_LIB_DIR} ${TBB_ROOT}/lib NO_DEFAULT_PATH)
|
||||||
|
- find_library(TBB_LIBRARY_MALLOC tbbmalloc PATHS ${TBB_LIB_DIR} ${TBB_ROOT}/lib NO_DEFAULT_PATH)
|
||||||
|
+ find_library(TBB_LIBRARY tbb_static PATHS ${TBB_LIB_DIR} ${TBB_ROOT}/lib NO_DEFAULT_PATH)
|
||||||
|
+ find_library(TBB_LIBRARY_MALLOC tbbmalloc_static PATHS ${TBB_LIB_DIR} ${TBB_ROOT}/lib NO_DEFAULT_PATH)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
else()
|
||||||
@@ -138,13 +138,13 @@ else()
|
@@ -138,13 +138,13 @@ else()
|
||||||
set(TBB_LIBRARY_MALLOC TBB_LIBRARY_MALLOC-NOTFOUND)
|
set(TBB_LIBRARY_MALLOC TBB_LIBRARY_MALLOC-NOTFOUND)
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
|
@@ -1,12 +1,13 @@
|
|||||||
diff -Naur orig/Makefile external_pthreads/Makefile
|
--- pthread.h.orig 2012-05-26 22:16:45 -0600
|
||||||
--- orig/Makefile 2018-08-08 04:47:40 -0600
|
+++ pthread.h 2016-04-01 09:20:36 -0600
|
||||||
+++ external_pthreads/Makefile 2020-05-09 11:20:28 -0600
|
@@ -109,6 +109,10 @@
|
||||||
@@ -185,7 +185,7 @@
|
/* Include everything */
|
||||||
@ $(MAKE) /E /nologo XCFLAGS="/MTd" EHFLAGS="$(VSEFLAGSD) /D__PTW32_STATIC_LIB /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_SEH pthreadVSE$(PTW32_VER_DEBUG).inlined_static_stamp
|
#endif
|
||||||
|
|
||||||
VC-static:
|
+#if _MSC_VER >= 1900
|
||||||
- @ $(MAKE) /E /nologo XCFLAGS="/MT" EHFLAGS="$(VCFLAGS) /D__PTW32_STATIC_LIB /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_C pthreadVC$(PTW32_VER).inlined_static_stamp
|
+# define HAVE_STRUCT_TIMESPEC 1
|
||||||
+ @ $(MAKE) /E /nologo XCFLAGS="/MD" EHFLAGS="$(VCFLAGS) /D__PTW32_STATIC_LIB /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_C pthreadVC$(PTW32_VER).inlined_static_stamp
|
+#endif
|
||||||
|
+
|
||||||
VC-static-debug:
|
#if defined(_UWIN)
|
||||||
@ $(MAKE) /E /nologo XCFLAGS="/MTd" EHFLAGS="$(VCFLAGSD) /D__PTW32_STATIC_LIB /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_C pthreadVC$(PTW32_VER_DEBUG).inlined_static_stamp
|
# define HAVE_STRUCT_TIMESPEC 1
|
||||||
|
# define HAVE_SIGNAL_H 1
|
||||||
|
@@ -7,6 +7,9 @@ message(STATUS "Building in CentOS 7 64bit environment")
|
|||||||
set(LIBDIR_NAME "linux_centos7_x86_64")
|
set(LIBDIR_NAME "linux_centos7_x86_64")
|
||||||
set(WITH_CXX11_ABI OFF CACHE BOOL "" FORCE)
|
set(WITH_CXX11_ABI OFF CACHE BOOL "" FORCE)
|
||||||
|
|
||||||
|
# Default to only build Blender
|
||||||
|
set(WITH_BLENDER ON CACHE BOOL "" FORCE)
|
||||||
|
|
||||||
# ######## Linux-specific build options ########
|
# ######## Linux-specific build options ########
|
||||||
# Options which are specific to Linux-only platforms
|
# Options which are specific to Linux-only platforms
|
||||||
|
|
||||||
@@ -17,6 +20,12 @@ set(WITH_DOC_MANPAGE OFF CACHE BOOL "" FORCE)
|
|||||||
|
|
||||||
set(WITH_JACK_DYNLOAD ON CACHE BOOL "" FORCE)
|
set(WITH_JACK_DYNLOAD ON CACHE BOOL "" FORCE)
|
||||||
set(WITH_SDL_DYNLOAD ON CACHE BOOL "" FORCE)
|
set(WITH_SDL_DYNLOAD ON CACHE BOOL "" FORCE)
|
||||||
|
set(WITH_SYSTEM_GLEW OFF CACHE BOOL "" FORCE)
|
||||||
|
|
||||||
|
set(WITH_OPENMP_STATIC ON CACHE BOOL "" FORCE)
|
||||||
|
|
||||||
|
set(WITH_PYTHON_INSTALL_NUMPY ON CACHE BOOL "" FORCE)
|
||||||
|
set(WITH_PYTHON_INSTALL_REQUESTS ON CACHE BOOL "" FORCE)
|
||||||
|
|
||||||
# ######## Release environment specific settings ########
|
# ######## Release environment specific settings ########
|
||||||
|
|
||||||
@@ -24,5 +33,13 @@ set(LIBDIR "${CMAKE_CURRENT_LIST_DIR}/../../../../lib/${LIBDIR_NAME}" CACHE STRI
|
|||||||
|
|
||||||
# Platform specific configuration, to ensure static linking against everything.
|
# Platform specific configuration, to ensure static linking against everything.
|
||||||
|
|
||||||
|
set(Boost_USE_STATIC_LIBS ON CACHE BOOL "" FORCE)
|
||||||
|
|
||||||
|
# We need to link OpenCOLLADA against PCRE library. Even though it is not installed
|
||||||
|
# on /usr, we do not really care -- all we care is PCRE_FOUND be TRUE and its
|
||||||
|
# library pointing to a valid one.
|
||||||
|
set(PCRE_INCLUDE_DIR "/usr/include" CACHE STRING "" FORCE)
|
||||||
|
set(PCRE_LIBRARY "${LIBDIR}/opencollada/lib/libpcre.a" CACHE STRING "" FORCE)
|
||||||
|
|
||||||
# Additional linking libraries
|
# Additional linking libraries
|
||||||
set(CMAKE_EXE_LINKER_FLAGS "-lrt -static-libstdc++ -no-pie" CACHE STRING "" FORCE)
|
set(CMAKE_EXE_LINKER_FLAGS "-lrt -static-libstdc++ -no-pie" CACHE STRING "" FORCE)
|
||||||
|
@@ -104,7 +104,6 @@ FOREACH(COMPONENT ${_openexr_FIND_COMPONENTS})
|
|||||||
FIND_LIBRARY(OPENEXR_${UPPERCOMPONENT}_LIBRARY
|
FIND_LIBRARY(OPENEXR_${UPPERCOMPONENT}_LIBRARY
|
||||||
NAMES
|
NAMES
|
||||||
${COMPONENT}-${_openexr_libs_ver} ${COMPONENT}
|
${COMPONENT}-${_openexr_libs_ver} ${COMPONENT}
|
||||||
NAMES_PER_DIR
|
|
||||||
HINTS
|
HINTS
|
||||||
${_openexr_SEARCH_DIRS}
|
${_openexr_SEARCH_DIRS}
|
||||||
PATH_SUFFIXES
|
PATH_SUFFIXES
|
||||||
|
@@ -95,7 +95,7 @@ FIND_LIBRARY(OPENIMAGEDENOISE_LIBRARY
|
|||||||
# handle the QUIETLY and REQUIRED arguments and set OPENIMAGEDENOISE_FOUND to TRUE if
|
# handle the QUIETLY and REQUIRED arguments and set OPENIMAGEDENOISE_FOUND to TRUE if
|
||||||
# all listed variables are TRUE
|
# all listed variables are TRUE
|
||||||
INCLUDE(FindPackageHandleStandardArgs)
|
INCLUDE(FindPackageHandleStandardArgs)
|
||||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenImageDenoise DEFAULT_MSG
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OPENIMAGEDENOISE DEFAULT_MSG
|
||||||
OPENIMAGEDENOISE_LIBRARY OPENIMAGEDENOISE_INCLUDE_DIR)
|
OPENIMAGEDENOISE_LIBRARY OPENIMAGEDENOISE_INCLUDE_DIR)
|
||||||
|
|
||||||
IF(OPENIMAGEDENOISE_FOUND)
|
IF(OPENIMAGEDENOISE_FOUND)
|
||||||
|
@@ -43,7 +43,6 @@ FIND_PATH(USD_INCLUDE_DIR
|
|||||||
FIND_LIBRARY(USD_LIBRARY
|
FIND_LIBRARY(USD_LIBRARY
|
||||||
NAMES
|
NAMES
|
||||||
usd_m usd_ms
|
usd_m usd_ms
|
||||||
NAMES_PER_DIR
|
|
||||||
HINTS
|
HINTS
|
||||||
${_usd_SEARCH_DIRS}
|
${_usd_SEARCH_DIRS}
|
||||||
PATH_SUFFIXES
|
PATH_SUFFIXES
|
||||||
|
@@ -66,9 +66,6 @@ macro(BLENDER_SRC_GTEST_EX)
|
|||||||
if(UNIX AND NOT APPLE)
|
if(UNIX AND NOT APPLE)
|
||||||
target_link_libraries(${TARGET_NAME} bf_intern_libc_compat)
|
target_link_libraries(${TARGET_NAME} bf_intern_libc_compat)
|
||||||
endif()
|
endif()
|
||||||
if(WITH_TBB)
|
|
||||||
target_link_libraries(${TARGET_NAME} ${TBB_LIBRARIES})
|
|
||||||
endif()
|
|
||||||
|
|
||||||
get_property(GENERATOR_IS_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
|
get_property(GENERATOR_IS_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
|
||||||
if(GENERATOR_IS_MULTI_CONFIG)
|
if(GENERATOR_IS_MULTI_CONFIG)
|
||||||
|
@@ -440,14 +440,6 @@ function(SETUP_LIBDIRS)
|
|||||||
link_directories(${HDF5_LIBPATH})
|
link_directories(${HDF5_LIBPATH})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(WITH_GHOST_WAYLAND)
|
|
||||||
link_directories(
|
|
||||||
${wayland-client_LIBRARY_DIRS}
|
|
||||||
${wayland-egl_LIBRARY_DIRS}
|
|
||||||
${xkbcommon_LIBRARY_DIRS}
|
|
||||||
${wayland-cursor_LIBRARY_DIRS})
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(WIN32 AND NOT UNIX)
|
if(WIN32 AND NOT UNIX)
|
||||||
link_directories(${PTHREADS_LIBPATH})
|
link_directories(${PTHREADS_LIBPATH})
|
||||||
endif()
|
endif()
|
||||||
|
@@ -222,10 +222,12 @@ if(WITH_OPENCOLLADA)
|
|||||||
-lMathMLSolver
|
-lMathMLSolver
|
||||||
-lGeneratedSaxParser
|
-lGeneratedSaxParser
|
||||||
-lbuffer -lftoa -lUTF
|
-lbuffer -lftoa -lUTF
|
||||||
|
${OPENCOLLADA_LIBPATH}/libxml2.a
|
||||||
)
|
)
|
||||||
# PCRE and XML2 are bundled with OpenCollada.
|
# PCRE is bundled with openCollada
|
||||||
|
# set(PCRE ${LIBDIR}/pcre)
|
||||||
|
# set(PCRE_LIBPATH ${PCRE}/lib)
|
||||||
set(PCRE_LIBRARIES pcre)
|
set(PCRE_LIBRARIES pcre)
|
||||||
set(XML2_LIBRARIES xml2)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(WITH_SDL)
|
if(WITH_SDL)
|
||||||
@@ -447,9 +449,7 @@ if(${XCODE_VERSION} VERSION_EQUAL 5 OR ${XCODE_VERSION} VERSION_GREATER 5)
|
|||||||
# Xcode 5 is always using CLANG, which has too low template depth of 128 for libmv
|
# Xcode 5 is always using CLANG, which has too low template depth of 128 for libmv
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftemplate-depth=1024")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftemplate-depth=1024")
|
||||||
endif()
|
endif()
|
||||||
|
# Get rid of eventually clashes, we export some symbols explicitly as local
|
||||||
# Avoid conflicts with Luxrender, and other plug-ins that may use the same
|
|
||||||
# libraries as Blender with a different version or build options.
|
|
||||||
set(PLATFORM_LINKFLAGS
|
set(PLATFORM_LINKFLAGS
|
||||||
"${PLATFORM_LINKFLAGS} -Xlinker -unexported_symbols_list -Xlinker '${CMAKE_SOURCE_DIR}/source/creator/osx_locals.map'"
|
"${PLATFORM_LINKFLAGS} -Xlinker -unexported_symbols_list -Xlinker '${CMAKE_SOURCE_DIR}/source/creator/osx_locals.map'"
|
||||||
)
|
)
|
||||||
|
@@ -20,6 +20,10 @@
|
|||||||
|
|
||||||
# Xcode and system configuration for Apple.
|
# Xcode and system configuration for Apple.
|
||||||
|
|
||||||
|
# require newer cmake on osx because of version handling,
|
||||||
|
# older cmake cannot handle 2 digit subversion!
|
||||||
|
cmake_minimum_required(VERSION 3.0.0)
|
||||||
|
|
||||||
if(NOT CMAKE_OSX_ARCHITECTURES)
|
if(NOT CMAKE_OSX_ARCHITECTURES)
|
||||||
set(CMAKE_OSX_ARCHITECTURES x86_64 CACHE STRING
|
set(CMAKE_OSX_ARCHITECTURES x86_64 CACHE STRING
|
||||||
"Choose the architecture you want to build Blender for: i386, x86_64 or ppc"
|
"Choose the architecture you want to build Blender for: i386, x86_64 or ppc"
|
||||||
@@ -41,98 +45,54 @@ execute_process(
|
|||||||
OUTPUT_VARIABLE XCODE_CHECK OUTPUT_STRIP_TRAILING_WHITESPACE)
|
OUTPUT_VARIABLE XCODE_CHECK OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
string(REPLACE "/Contents/Developer" "" XCODE_BUNDLE ${XCODE_CHECK}) # truncate to bundlepath in any case
|
string(REPLACE "/Contents/Developer" "" XCODE_BUNDLE ${XCODE_CHECK}) # truncate to bundlepath in any case
|
||||||
|
|
||||||
if(NOT ${CMAKE_GENERATOR} MATCHES "Xcode")
|
if(${CMAKE_GENERATOR} MATCHES "Xcode")
|
||||||
# Unix makefile generator does not fill XCODE_VERSION var, so we get it with a command.
|
|
||||||
# Note that `xcodebuild -version` gives output in two lines: first line will include
|
|
||||||
# Xcode version, second one will include build number. We are only interested in the
|
|
||||||
# former one. Here is an example of the output:
|
|
||||||
# Xcode 11.4
|
|
||||||
# Build version 11E146
|
|
||||||
# The expected XCODE_VERSION in this case is 11.4.
|
|
||||||
|
|
||||||
|
# earlier xcode has no bundled developer dir, no sense in getting xcode path from
|
||||||
|
if(${XCODE_VERSION} VERSION_GREATER 4.2)
|
||||||
|
# reduce to XCode name without dp extension
|
||||||
|
string(SUBSTRING "${XCODE_CHECK}" 14 6 DP_NAME)
|
||||||
|
if(${DP_NAME} MATCHES Xcode5)
|
||||||
|
set(XCODE_VERSION 5)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
##### cmake incompatibility with xcode 4.3 and higher #####
|
||||||
|
if(${XCODE_VERSION} MATCHES '') # cmake fails due looking for xcode in the wrong path, thus will be empty var
|
||||||
|
message(FATAL_ERROR "Xcode 4.3 and higher must be used with cmake 2.8-8 or higher")
|
||||||
|
endif()
|
||||||
|
### end cmake incompatibility with xcode 4.3 and higher ###
|
||||||
|
|
||||||
|
if(${XCODE_VERSION} VERSION_EQUAL 4 OR ${XCODE_VERSION} VERSION_GREATER 4 AND ${XCODE_VERSION} VERSION_LESS 4.3)
|
||||||
|
# Xcode 4 defaults to the Apple LLVM Compiler.
|
||||||
|
# Override the default compiler selection because Blender only compiles with gcc up to xcode 4.2
|
||||||
|
set(CMAKE_XCODE_ATTRIBUTE_GCC_VERSION "com.apple.compilers.llvmgcc42")
|
||||||
|
message(STATUS "Setting compiler to: " ${CMAKE_XCODE_ATTRIBUTE_GCC_VERSION})
|
||||||
|
endif()
|
||||||
|
else() # unix makefile generator does not fill XCODE_VERSION var, so we get it with a command
|
||||||
execute_process(COMMAND xcodebuild -version OUTPUT_VARIABLE XCODE_VERS_BUILD_NR)
|
execute_process(COMMAND xcodebuild -version OUTPUT_VARIABLE XCODE_VERS_BUILD_NR)
|
||||||
|
string(SUBSTRING "${XCODE_VERS_BUILD_NR}" 6 3 XCODE_VERSION) # truncate away build-nr
|
||||||
# Convert output to a single line by replacling newlines with spaces.
|
|
||||||
# This is needed because regex replace can not operate through the newline character
|
|
||||||
# and applies substitutions for each individual lines.
|
|
||||||
string(REPLACE "\n" " " XCODE_VERS_BUILD_NR_SINGLE_LINE "${XCODE_VERS_BUILD_NR}")
|
|
||||||
|
|
||||||
string(REGEX REPLACE "(.*)Xcode ([0-9\\.]+).*" "\\2" XCODE_VERSION "${XCODE_VERS_BUILD_NR_SINGLE_LINE}")
|
|
||||||
|
|
||||||
unset(XCODE_VERS_BUILD_NR)
|
unset(XCODE_VERS_BUILD_NR)
|
||||||
unset(XCODE_VERS_BUILD_NR_SINGLE_LINE)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
message(STATUS "Detected OS X ${OSX_SYSTEM} and Xcode ${XCODE_VERSION} at ${XCODE_BUNDLE}")
|
message(STATUS "Detected OS X ${OSX_SYSTEM} and Xcode ${XCODE_VERSION} at ${XCODE_BUNDLE}")
|
||||||
|
|
||||||
# Older Xcode versions had different approach to the directory hiearchy.
|
if(${XCODE_VERSION} VERSION_LESS 4.3)
|
||||||
# Require newer Xcode which is also have better chances of being able to compile with the
|
# use guaranteed existing sdk
|
||||||
# required deployment target.
|
set(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX${OSX_SYSTEM}.sdk CACHE PATH "" FORCE)
|
||||||
#
|
else()
|
||||||
# NOTE: Xcode version 8.2 is the latest one which runs on macOS 10.11.
|
# note: xcode-select path could be ambiguous,
|
||||||
if(${XCODE_VERSION} VERSION_LESS 8.2)
|
# cause /Applications/Xcode.app/Contents/Developer or /Applications/Xcode.app would be allowed
|
||||||
message(FATAL_ERROR "Only Xcode version 8.2 and newer is supported")
|
# so i use a selfcomposed bundlepath here
|
||||||
endif()
|
set(OSX_SYSROOT_PREFIX ${XCODE_BUNDLE}/Contents/Developer/Platforms/MacOSX.platform)
|
||||||
|
message(STATUS "OSX_SYSROOT_PREFIX: " ${OSX_SYSROOT_PREFIX})
|
||||||
# note: xcode-select path could be ambiguous,
|
set(OSX_DEVELOPER_PREFIX /Developer/SDKs/MacOSX${OSX_SYSTEM}.sdk) # use guaranteed existing sdk
|
||||||
# cause /Applications/Xcode.app/Contents/Developer or /Applications/Xcode.app would be allowed
|
set(CMAKE_OSX_SYSROOT ${OSX_SYSROOT_PREFIX}/${OSX_DEVELOPER_PREFIX} CACHE PATH "" FORCE)
|
||||||
# so i use a selfcomposed bundlepath here
|
if(${CMAKE_GENERATOR} MATCHES "Xcode")
|
||||||
set(OSX_SYSROOT_PREFIX ${XCODE_BUNDLE}/Contents/Developer/Platforms/MacOSX.platform)
|
# to silence sdk not found warning, just overrides CMAKE_OSX_SYSROOT
|
||||||
message(STATUS "OSX_SYSROOT_PREFIX: " ${OSX_SYSROOT_PREFIX})
|
set(CMAKE_XCODE_ATTRIBUTE_SDKROOT macosx${OSX_SYSTEM})
|
||||||
|
|
||||||
# Collect list of OSX system versions which will be used to detect path to corresponding SDK.
|
|
||||||
# Start with macOS SDK version reported by xcodebuild and include possible extra ones.
|
|
||||||
#
|
|
||||||
# The reason for need of extra ones is because it's possible that xcodebuild will report
|
|
||||||
# SDK version in the full manner (aka major.minor.patch), but the actual path will only
|
|
||||||
# include major.minor.
|
|
||||||
#
|
|
||||||
# This happens, for example, on macOS Catalina 10.15.4 and Xcode 11.4: xcodebuild on this
|
|
||||||
# system outputs "10.15.4", but the actual SDK path is MacOSX10.15.sdk.
|
|
||||||
#
|
|
||||||
# This should be safe from picking wrong SDK version because (a) xcodebuild reports full semantic
|
|
||||||
# SDK version, so such SDK does exist on the system. And if it doesn't exist with full version
|
|
||||||
# in the path, what SDK is in the major.minor folder then.
|
|
||||||
set(OSX_SDK_TEST_VERSIONS ${OSX_SYSTEM})
|
|
||||||
if(OSX_SYSTEM MATCHES "([0-9]+)\\.([0-9]+)\\.([0-9]+)")
|
|
||||||
string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\1.\\2" OSX_SYSTEM_NO_PATCH "${OSX_SYSTEM}")
|
|
||||||
list(APPEND OSX_SDK_TEST_VERSIONS ${OSX_SYSTEM_NO_PATCH})
|
|
||||||
unset(OSX_SYSTEM_NO_PATCH)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Loop through all possible versions and pick the first one which resolves to a valid SDK path.
|
|
||||||
set(OSX_SDK_PATH)
|
|
||||||
set(OSX_SDK_FOUND FALSE)
|
|
||||||
set(OSX_SDK_PREFIX ${OSX_SYSROOT_PREFIX}/Developer/SDKs)
|
|
||||||
set(OSX_SDKROOT)
|
|
||||||
foreach(OSX_SDK_VERSION ${OSX_SDK_TEST_VERSIONS})
|
|
||||||
set(CURRENT_OSX_SDK_PATH "${OSX_SDK_PREFIX}/MacOSX${OSX_SDK_VERSION}.sdk")
|
|
||||||
if(EXISTS ${CURRENT_OSX_SDK_PATH})
|
|
||||||
set(OSX_SDK_PATH "${CURRENT_OSX_SDK_PATH}")
|
|
||||||
set(OSX_SDKROOT macosx${OSX_SDK_VERSION})
|
|
||||||
set(OSX_SDK_FOUND TRUE)
|
|
||||||
break()
|
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
|
||||||
unset(OSX_SDK_PREFIX)
|
|
||||||
unset(OSX_SDK_TEST_VERSIONS)
|
|
||||||
|
|
||||||
if(NOT OSX_SDK_FOUND)
|
|
||||||
message(FATAL_ERROR "Unable to find SDK for macOS version ${OSX_SYSTEM}")
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
message(STATUS "Detected OSX_SYSROOT: ${OSX_SDK_PATH}")
|
|
||||||
|
|
||||||
set(CMAKE_OSX_SYSROOT ${OSX_SDK_PATH} CACHE PATH "" FORCE)
|
|
||||||
unset(OSX_SDK_PATH)
|
|
||||||
unset(OSX_SDK_FOUND)
|
|
||||||
|
|
||||||
if(${CMAKE_GENERATOR} MATCHES "Xcode")
|
|
||||||
# to silence sdk not found warning, just overrides CMAKE_OSX_SYSROOT
|
|
||||||
set(CMAKE_XCODE_ATTRIBUTE_SDKROOT ${OSX_SDKROOT})
|
|
||||||
endif()
|
|
||||||
unset(OSX_SDKROOT)
|
|
||||||
|
|
||||||
# 10.11 is our min. target, if you use higher sdk, weak linking happens
|
# 10.11 is our min. target, if you use higher sdk, weak linking happens
|
||||||
if(CMAKE_OSX_DEPLOYMENT_TARGET)
|
if(CMAKE_OSX_DEPLOYMENT_TARGET)
|
||||||
if(${CMAKE_OSX_DEPLOYMENT_TARGET} VERSION_LESS 10.11)
|
if(${CMAKE_OSX_DEPLOYMENT_TARGET} VERSION_LESS 10.11)
|
||||||
|
@@ -57,7 +57,6 @@ if(EXISTS ${LIBDIR})
|
|||||||
set(BOOST_ROOT ${LIBDIR}/boost)
|
set(BOOST_ROOT ${LIBDIR}/boost)
|
||||||
set(BOOST_LIBRARYDIR ${LIBDIR}/boost/lib)
|
set(BOOST_LIBRARYDIR ${LIBDIR}/boost/lib)
|
||||||
set(Boost_NO_SYSTEM_PATHS ON)
|
set(Boost_NO_SYSTEM_PATHS ON)
|
||||||
set(OPENEXR_ROOT_DIR ${LIBDIR}/openexr)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(WITH_STATIC_LIBS)
|
if(WITH_STATIC_LIBS)
|
||||||
@@ -196,14 +195,8 @@ endif()
|
|||||||
if(WITH_OPENCOLLADA)
|
if(WITH_OPENCOLLADA)
|
||||||
find_package_wrapper(OpenCOLLADA)
|
find_package_wrapper(OpenCOLLADA)
|
||||||
if(OPENCOLLADA_FOUND)
|
if(OPENCOLLADA_FOUND)
|
||||||
if(WITH_STATIC_LIBS)
|
|
||||||
# PCRE is bundled with OpenCollada without headers, so can't use
|
|
||||||
# find_package reliably to detect it.
|
|
||||||
set(PCRE_LIBRARIES ${LIBDIR}/opencollada/lib/libpcre.a)
|
|
||||||
else()
|
|
||||||
find_package_wrapper(PCRE)
|
|
||||||
endif()
|
|
||||||
find_package_wrapper(XML2)
|
find_package_wrapper(XML2)
|
||||||
|
find_package_wrapper(PCRE)
|
||||||
else()
|
else()
|
||||||
set(WITH_OPENCOLLADA OFF)
|
set(WITH_OPENCOLLADA OFF)
|
||||||
endif()
|
endif()
|
||||||
@@ -412,6 +405,13 @@ if(WITH_LLVM)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(WITH_LLVM OR WITH_SDL_DYNLOAD)
|
||||||
|
# Fix for conflict with Mesa llvmpipe
|
||||||
|
set(PLATFORM_LINKFLAGS
|
||||||
|
"${PLATFORM_LINKFLAGS} -Wl,--version-script='${CMAKE_SOURCE_DIR}/source/creator/blender.map'"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(WITH_OPENSUBDIV)
|
if(WITH_OPENSUBDIV)
|
||||||
find_package_wrapper(OpenSubdiv)
|
find_package_wrapper(OpenSubdiv)
|
||||||
|
|
||||||
@@ -505,27 +505,7 @@ if(WITH_SYSTEM_AUDASPACE)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(WITH_GHOST_WAYLAND)
|
if(WITH_X11)
|
||||||
find_package(PkgConfig)
|
|
||||||
pkg_check_modules(wayland-client REQUIRED wayland-client>=1.12)
|
|
||||||
pkg_check_modules(wayland-egl REQUIRED wayland-egl)
|
|
||||||
pkg_check_modules(wayland-scanner REQUIRED wayland-scanner)
|
|
||||||
pkg_check_modules(xkbcommon REQUIRED xkbcommon)
|
|
||||||
pkg_check_modules(wayland-cursor REQUIRED wayland-cursor)
|
|
||||||
|
|
||||||
set(WITH_GL_EGL ON)
|
|
||||||
|
|
||||||
if(WITH_GHOST_WAYLAND)
|
|
||||||
list(APPEND PLATFORM_LINKLIBS
|
|
||||||
${wayland-client_LIBRARIES}
|
|
||||||
${wayland-egl_LIBRARIES}
|
|
||||||
${xkbcommon_LIBRARIES}
|
|
||||||
${wayland-cursor_LIBRARIES}
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(WITH_GHOST_X11)
|
|
||||||
find_package(X11 REQUIRED)
|
find_package(X11 REQUIRED)
|
||||||
|
|
||||||
find_path(X11_XF86keysym_INCLUDE_PATH X11/XF86keysym.h ${X11_INC_SEARCH_PATH})
|
find_path(X11_XF86keysym_INCLUDE_PATH X11/XF86keysym.h ${X11_INC_SEARCH_PATH})
|
||||||
@@ -596,19 +576,6 @@ if(CMAKE_COMPILER_IS_GNUCC)
|
|||||||
unset(LD_VERSION)
|
unset(LD_VERSION)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(WITH_LINKER_LLD)
|
|
||||||
execute_process(
|
|
||||||
COMMAND ${CMAKE_C_COMPILER} -fuse-ld=lld -Wl,--version
|
|
||||||
ERROR_QUIET OUTPUT_VARIABLE LD_VERSION)
|
|
||||||
if("${LD_VERSION}" MATCHES "LLD")
|
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fuse-ld=lld")
|
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fuse-ld=lld")
|
|
||||||
else()
|
|
||||||
message(STATUS "LLD linker isn't available, using the default system linker.")
|
|
||||||
endif()
|
|
||||||
unset(LD_VERSION)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# CLang is the same as GCC for now.
|
# CLang is the same as GCC for now.
|
||||||
elseif(CMAKE_C_COMPILER_ID MATCHES "Clang")
|
elseif(CMAKE_C_COMPILER_ID MATCHES "Clang")
|
||||||
set(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing")
|
set(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing")
|
||||||
@@ -634,16 +601,3 @@ elseif(CMAKE_C_COMPILER_ID MATCHES "Intel")
|
|||||||
set(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing")
|
set(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing")
|
||||||
set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -static-intel")
|
set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -static-intel")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Avoid conflicts with Mesa llvmpipe, Luxrender, and other plug-ins that may
|
|
||||||
# use the same libraries as Blender with a different version or build options.
|
|
||||||
set(PLATFORM_LINKFLAGS
|
|
||||||
"${PLATFORM_LINKFLAGS} -Wl,--version-script='${CMAKE_SOURCE_DIR}/source/creator/blender.map'"
|
|
||||||
)
|
|
||||||
|
|
||||||
# Don't use position independent executable for portable install since file
|
|
||||||
# browsers can't properly detect blender as an executable then. Still enabled
|
|
||||||
# for non-portable installs as typically used by Linux distributions.
|
|
||||||
if(WITH_INSTALL_PORTABLE)
|
|
||||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -no-pie")
|
|
||||||
endif()
|
|
||||||
|
@@ -51,10 +51,6 @@ if(CMAKE_C_COMPILER_ID MATCHES "Clang")
|
|||||||
endif()
|
endif()
|
||||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} \"${CLANG_OPENMP_LIB}\"")
|
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} \"${CLANG_OPENMP_LIB}\"")
|
||||||
endif()
|
endif()
|
||||||
if(WITH_WINDOWS_STRIPPED_PDB)
|
|
||||||
message(WARNING "stripped pdb not supported with clang, disabling..")
|
|
||||||
set(WITH_WINDOWS_STRIPPED_PDB Off)
|
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set_property(GLOBAL PROPERTY USE_FOLDERS ${WINDOWS_USE_VISUAL_STUDIO_PROJECT_FOLDERS})
|
set_property(GLOBAL PROPERTY USE_FOLDERS ${WINDOWS_USE_VISUAL_STUDIO_PROJECT_FOLDERS})
|
||||||
@@ -111,13 +107,12 @@ endif()
|
|||||||
unset(_min_ver)
|
unset(_min_ver)
|
||||||
|
|
||||||
# needed for some MSVC installations
|
# needed for some MSVC installations
|
||||||
# 4099 : PDB 'filename' was not found with 'object/library'
|
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SAFESEH:NO")
|
||||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SAFESEH:NO /ignore:4099")
|
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /SAFESEH:NO")
|
||||||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /SAFESEH:NO /ignore:4099")
|
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} /SAFESEH:NO")
|
||||||
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} /SAFESEH:NO /ignore:4099")
|
|
||||||
|
|
||||||
list(APPEND PLATFORM_LINKLIBS
|
list(APPEND PLATFORM_LINKLIBS
|
||||||
ws2_32 vfw32 winmm kernel32 user32 gdi32 comdlg32 Comctl32 version
|
ws2_32 vfw32 winmm kernel32 user32 gdi32 comdlg32 Comctl32
|
||||||
advapi32 shfolder shell32 ole32 oleaut32 uuid psapi Dbghelp Shlwapi
|
advapi32 shfolder shell32 ole32 oleaut32 uuid psapi Dbghelp Shlwapi
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -139,12 +134,7 @@ add_definitions(-D_ALLOW_KEYWORD_MACROS)
|
|||||||
# We want to support Windows 7 level ABI
|
# We want to support Windows 7 level ABI
|
||||||
add_definitions(-D_WIN32_WINNT=0x601)
|
add_definitions(-D_WIN32_WINNT=0x601)
|
||||||
include(build_files/cmake/platform/platform_win32_bundle_crt.cmake)
|
include(build_files/cmake/platform/platform_win32_bundle_crt.cmake)
|
||||||
remove_cc_flag("/MDd" "/MD" "/Zi")
|
remove_cc_flag("/MDd" "/MD")
|
||||||
|
|
||||||
if(WITH_WINDOWS_PDB)
|
|
||||||
set(PDB_INFO_OVERRIDE_FLAGS "/Z7")
|
|
||||||
set(PDB_INFO_OVERRIDE_LINKER_FLAGS "/DEBUG /OPT:REF /OPT:ICF /INCREMENTAL:NO")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(MSVC_CLANG) # Clangs version of cl doesn't support all flags
|
if(MSVC_CLANG) # Clangs version of cl doesn't support all flags
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_WARN_FLAGS} /nologo /J /Gd /EHsc -Wno-unused-command-line-argument -Wno-microsoft-enum-forward-reference ")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_WARN_FLAGS} /nologo /J /Gd /EHsc -Wno-unused-command-line-argument -Wno-microsoft-enum-forward-reference ")
|
||||||
@@ -161,42 +151,27 @@ if(MSVC_VERSION GREATER 1911 AND NOT MSVC_CLANG)
|
|||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Zc:twoPhase-")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Zc:twoPhase-")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(WITH_WINDOWS_SCCACHE AND CMAKE_VS_MSBUILD_COMMAND)
|
|
||||||
message(WARNING "Disabling sccache, sccache is not supported with msbuild")
|
|
||||||
set(WITH_WINDOWS_SCCACHE Off)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(WITH_WINDOWS_SCCACHE)
|
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MDd /ZI")
|
||||||
set(CMAKE_C_COMPILER_LAUNCHER sccache)
|
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /MDd /ZI")
|
||||||
set(CMAKE_CXX_COMPILER_LAUNCHER sccache)
|
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MD")
|
||||||
set(SYMBOL_FORMAT /Z7)
|
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /MD")
|
||||||
else()
|
set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} /MD")
|
||||||
unset(CMAKE_C_COMPILER_LAUNCHER)
|
set(CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL} /MD")
|
||||||
unset(CMAKE_CXX_COMPILER_LAUNCHER)
|
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /MD")
|
||||||
set(SYMBOL_FORMAT /ZI)
|
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} /MD")
|
||||||
endif()
|
|
||||||
|
|
||||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MDd ${SYMBOL_FORMAT}")
|
|
||||||
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /MDd ${SYMBOL_FORMAT}")
|
|
||||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MD ${PDB_INFO_OVERRIDE_FLAGS}")
|
|
||||||
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /MD ${PDB_INFO_OVERRIDE_FLAGS}")
|
|
||||||
set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} /MD ${PDB_INFO_OVERRIDE_FLAGS}")
|
|
||||||
set(CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL} /MD ${PDB_INFO_OVERRIDE_FLAGS}")
|
|
||||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /MD ${SYMBOL_FORMAT}")
|
|
||||||
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} /MD ${SYMBOL_FORMAT}")
|
|
||||||
unset(SYMBOL_FORMAT)
|
|
||||||
# JMC is available on msvc 15.8 (1915) and up
|
# JMC is available on msvc 15.8 (1915) and up
|
||||||
if(MSVC_VERSION GREATER 1914 AND NOT MSVC_CLANG)
|
if(MSVC_VERSION GREATER 1914 AND NOT MSVC_CLANG)
|
||||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /JMC")
|
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /JMC")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} /SUBSYSTEM:CONSOLE /STACK:2097152 ")
|
set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} /SUBSYSTEM:CONSOLE /STACK:2097152 /INCREMENTAL:NO ")
|
||||||
set(PLATFORM_LINKFLAGS_RELEASE "/NODEFAULTLIB:libcmt.lib /NODEFAULTLIB:libcmtd.lib /NODEFAULTLIB:msvcrtd.lib")
|
set(PLATFORM_LINKFLAGS_RELEASE "/NODEFAULTLIB:libcmt.lib /NODEFAULTLIB:libcmtd.lib /NODEFAULTLIB:msvcrtd.lib")
|
||||||
set(PLATFORM_LINKFLAGS_DEBUG "${PLATFORM_LINKFLAGS_DEBUG} /IGNORE:4099 /NODEFAULTLIB:libcmt.lib /NODEFAULTLIB:msvcrt.lib /NODEFAULTLIB:libcmtd.lib")
|
set(PLATFORM_LINKFLAGS_DEBUG "${PLATFORM_LINKFLAGS_DEBUG} /IGNORE:4099 /NODEFAULTLIB:libcmt.lib /NODEFAULTLIB:msvcrt.lib /NODEFAULTLIB:libcmtd.lib")
|
||||||
|
|
||||||
# Ignore meaningless for us linker warnings.
|
# Ignore meaningless for us linker warnings.
|
||||||
set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} /ignore:4049 /ignore:4217 /ignore:4221")
|
set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} /ignore:4049 /ignore:4217 /ignore:4221")
|
||||||
set(PLATFORM_LINKFLAGS_RELEASE "${PLATFORM_LINKFLAGS} ${PDB_INFO_OVERRIDE_LINKER_FLAGS}")
|
|
||||||
set(CMAKE_STATIC_LINKER_FLAGS "${CMAKE_STATIC_LINKER_FLAGS} /ignore:4221")
|
set(CMAKE_STATIC_LINKER_FLAGS "${CMAKE_STATIC_LINKER_FLAGS} /ignore:4221")
|
||||||
|
|
||||||
if(CMAKE_CL_64)
|
if(CMAKE_CL_64)
|
||||||
@@ -234,7 +209,7 @@ endif()
|
|||||||
|
|
||||||
# Mark libdir as system headers with a lower warn level, to resolve some warnings
|
# Mark libdir as system headers with a lower warn level, to resolve some warnings
|
||||||
# that we have very little control over
|
# that we have very little control over
|
||||||
if(MSVC_VERSION GREATER_EQUAL 1914 AND NOT MSVC_CLANG AND NOT WITH_WINDOWS_SCCACHE)
|
if(MSVC_VERSION GREATER_EQUAL 1914 AND NOT MSVC_CLANG)
|
||||||
add_compile_options(/experimental:external /external:templates- /external:I "${LIBDIR}" /external:W0)
|
add_compile_options(/experimental:external /external:templates- /external:I "${LIBDIR}" /external:W0)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@@ -597,7 +572,7 @@ if(WITH_SYSTEM_AUDASPACE)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(WITH_TBB)
|
if(WITH_TBB)
|
||||||
set(TBB_LIBRARIES optimized ${LIBDIR}/tbb/lib/tbb.lib debug ${LIBDIR}/tbb/lib/debug/tbb_debug.lib)
|
set(TBB_LIBRARIES optimized ${LIBDIR}/tbb/lib/tbb.lib debug ${LIBDIR}/tbb/lib/tbb_debug.lib)
|
||||||
set(TBB_INCLUDE_DIR ${LIBDIR}/tbb/include)
|
set(TBB_INCLUDE_DIR ${LIBDIR}/tbb/include)
|
||||||
set(TBB_INCLUDE_DIRS ${TBB_INCLUDE_DIR})
|
set(TBB_INCLUDE_DIRS ${TBB_INCLUDE_DIR})
|
||||||
if(WITH_TBB_MALLOC_PROXY)
|
if(WITH_TBB_MALLOC_PROXY)
|
||||||
@@ -694,7 +669,7 @@ if(WITH_USD)
|
|||||||
set(USD_INCLUDE_DIRS ${LIBDIR}/usd/include)
|
set(USD_INCLUDE_DIRS ${LIBDIR}/usd/include)
|
||||||
set(USD_RELEASE_LIB ${LIBDIR}/usd/lib/libusd_m.lib)
|
set(USD_RELEASE_LIB ${LIBDIR}/usd/lib/libusd_m.lib)
|
||||||
set(USD_DEBUG_LIB ${LIBDIR}/usd/lib/libusd_m_d.lib)
|
set(USD_DEBUG_LIB ${LIBDIR}/usd/lib/libusd_m_d.lib)
|
||||||
set(USD_LIBRARY_DIR ${LIBDIR}/usd/lib)
|
set(USD_LIBRARY_DIR ${LIBDIR}/usd/lib/usd)
|
||||||
set(USD_LIBRARIES
|
set(USD_LIBRARIES
|
||||||
debug ${USD_DEBUG_LIB}
|
debug ${USD_DEBUG_LIB}
|
||||||
optimized ${USD_RELEASE_LIB}
|
optimized ${USD_RELEASE_LIB}
|
||||||
|
@@ -6,6 +6,9 @@ if %ERRORLEVEL% EQU 0 goto DetectionComplete
|
|||||||
call "%~dp0\detect_msvc2019.cmd"
|
call "%~dp0\detect_msvc2019.cmd"
|
||||||
if %ERRORLEVEL% EQU 0 goto DetectionComplete
|
if %ERRORLEVEL% EQU 0 goto DetectionComplete
|
||||||
|
|
||||||
|
call "%~dp0\detect_msvc2015.cmd"
|
||||||
|
if %ERRORLEVEL% EQU 0 goto DetectionComplete
|
||||||
|
|
||||||
echo Compiler Detection failed. Use verbose switch for more information.
|
echo Compiler Detection failed. Use verbose switch for more information.
|
||||||
exit /b 1
|
exit /b 1
|
||||||
|
|
||||||
|
@@ -2,11 +2,6 @@ set BUILD_GENERATOR_POST=
|
|||||||
set BUILD_PLATFORM_SELECT=
|
set BUILD_PLATFORM_SELECT=
|
||||||
set MSBUILD_PLATFORM=x64
|
set MSBUILD_PLATFORM=x64
|
||||||
|
|
||||||
if "%BUILD_WITH_SCCACHE%"=="1" (
|
|
||||||
echo sccache is only supported with ninja as the build system.
|
|
||||||
exit /b 1
|
|
||||||
)
|
|
||||||
|
|
||||||
if "%WITH_CLANG%"=="1" (
|
if "%WITH_CLANG%"=="1" (
|
||||||
set CLANG_CMAKE_ARGS=-T"llvm"
|
set CLANG_CMAKE_ARGS=-T"llvm"
|
||||||
if "%WITH_ASAN%"=="1" (
|
if "%WITH_ASAN%"=="1" (
|
||||||
|
@@ -6,13 +6,6 @@ if %ERRORLEVEL% NEQ 0 (
|
|||||||
|
|
||||||
set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% -G "Ninja" %TESTS_CMAKE_ARGS% -DCMAKE_BUILD_TYPE=%BUILD_TYPE%
|
set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% -G "Ninja" %TESTS_CMAKE_ARGS% -DCMAKE_BUILD_TYPE=%BUILD_TYPE%
|
||||||
|
|
||||||
if "%BUILD_WITH_SCCACHE%"=="1" (
|
|
||||||
set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% -DWITH_WINDOWS_SCCACHE=On
|
|
||||||
if NOT "%verbose%" == "" (
|
|
||||||
echo Enabling sccache
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
if "%WITH_CLANG%" == "1" (
|
if "%WITH_CLANG%" == "1" (
|
||||||
set LLVM_DIR=
|
set LLVM_DIR=
|
||||||
for /F "usebackq skip=2 tokens=1-2*" %%A IN (`REG QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\LLVM\LLVM" /ve 2^>nul`) DO set LLVM_DIR=%%C
|
for /F "usebackq skip=2 tokens=1-2*" %%A IN (`REG QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\LLVM\LLVM" /ve 2^>nul`) DO set LLVM_DIR=%%C
|
||||||
|
3
build_files/windows/detect_msvc2015.cmd
Normal file
3
build_files/windows/detect_msvc2015.cmd
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
set BUILD_VS_VER=14
|
||||||
|
set BUILD_VS_YEAR=2015
|
||||||
|
call "%~dp0\detect_msvc_classic.cmd"
|
69
build_files/windows/detect_msvc_classic.cmd
Normal file
69
build_files/windows/detect_msvc_classic.cmd
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
if NOT "%verbose%" == "" (
|
||||||
|
echo Detecting msvc %BUILD_VS_YEAR%
|
||||||
|
)
|
||||||
|
set KEY_NAME="HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\%BUILD_VS_VER%.0\Setup\VC"
|
||||||
|
for /F "usebackq skip=2 tokens=1-2*" %%A IN (`REG QUERY %KEY_NAME% /v ProductDir 2^>nul`) DO set MSVC_VC_DIR=%%C
|
||||||
|
if DEFINED MSVC_VC_DIR (
|
||||||
|
if NOT "%verbose%" == "" (
|
||||||
|
echo Visual Studio %BUILD_VS_YEAR% on Win64 detected at "%MSVC_VC_DIR%"
|
||||||
|
)
|
||||||
|
goto msvc_detect_finally
|
||||||
|
)
|
||||||
|
|
||||||
|
REM Check 32 bits
|
||||||
|
set KEY_NAME="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\%BUILD_VS_VER%.0\Setup\VC"
|
||||||
|
for /F "usebackq skip=2 tokens=1-2*" %%A IN (`REG QUERY %KEY_NAME% /v ProductDir 2^>nul`) DO set MSVC_VC_DIR=%%C
|
||||||
|
if DEFINED MSVC_VC_DIR (
|
||||||
|
if NOT "%verbose%" == "" (
|
||||||
|
echo Visual Studio %BUILD_VS_YEAR% on Win32 detected at "%MSVC_VC_DIR%"
|
||||||
|
)
|
||||||
|
goto msvc_detect_finally
|
||||||
|
)
|
||||||
|
if NOT "%verbose%" == "" (
|
||||||
|
echo Visual Studio %BUILD_VS_YEAR% not found.
|
||||||
|
)
|
||||||
|
goto FAIL
|
||||||
|
:msvc_detect_finally
|
||||||
|
set VCVARS=%MSVC_VC_DIR%\vcvarsall.bat
|
||||||
|
if not exist "%VCVARS%" (
|
||||||
|
echo "%VCVARS%" not found.
|
||||||
|
goto FAIL
|
||||||
|
)
|
||||||
|
|
||||||
|
call "%vcvars%" %BUILD_ARCH%
|
||||||
|
|
||||||
|
rem try msbuild
|
||||||
|
msbuild /version > NUL
|
||||||
|
if errorlevel 1 (
|
||||||
|
if NOT "%verbose%" == "" (
|
||||||
|
echo Visual Studio %BUILD_VS_YEAR% msbuild not found
|
||||||
|
)
|
||||||
|
goto FAIL
|
||||||
|
)
|
||||||
|
|
||||||
|
if NOT "%verbose%" == "" (
|
||||||
|
echo Visual Studio %BUILD_VS_YEAR% msbuild found
|
||||||
|
)
|
||||||
|
|
||||||
|
REM try the c++ compiler
|
||||||
|
cl 2> NUL 1>&2
|
||||||
|
if errorlevel 1 (
|
||||||
|
if NOT "%verbose%" == "" (
|
||||||
|
echo Visual Studio %BUILD_VS_YEAR% C/C++ Compiler not found
|
||||||
|
)
|
||||||
|
goto FAIL
|
||||||
|
)
|
||||||
|
|
||||||
|
if NOT "%verbose%" == "" (
|
||||||
|
echo Visual Studio %BUILD_VS_YEAR% C/C++ Compiler found
|
||||||
|
)
|
||||||
|
goto DetectionComplete
|
||||||
|
|
||||||
|
:FAIL
|
||||||
|
exit /b 1
|
||||||
|
|
||||||
|
:DetectionComplete
|
||||||
|
if NOT "%verbose%" == "" (
|
||||||
|
echo Visual Studio %BUILD_VS_YEAR% Detected successfully
|
||||||
|
)
|
||||||
|
exit /b 0
|
@@ -27,13 +27,7 @@ if NOT "%verbose%" == "" (
|
|||||||
|
|
||||||
if "%VS_InstallDir%"=="" (
|
if "%VS_InstallDir%"=="" (
|
||||||
if NOT "%verbose%" == "" (
|
if NOT "%verbose%" == "" (
|
||||||
echo.
|
echo Visual Studio is detected but the "Desktop development with C++" workload has not been instlled
|
||||||
echo Visual Studio is detected but no suitable installation was found.
|
|
||||||
echo.
|
|
||||||
echo Check the "Desktop development with C++" workload has been installed.
|
|
||||||
echo.
|
|
||||||
echo If you are attempting to use either Visual Studio Preview version or the Visual C++ Build tools, Please see 'make help' on how to opt in to those toolsets.
|
|
||||||
echo.
|
|
||||||
goto FAIL
|
goto FAIL
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
@@ -66,6 +66,8 @@ if NOT "%1" == "" (
|
|||||||
) else if "%1" == "2019b" (
|
) else if "%1" == "2019b" (
|
||||||
set BUILD_VS_YEAR=2019
|
set BUILD_VS_YEAR=2019
|
||||||
set VSWHERE_ARGS=-products Microsoft.VisualStudio.Product.BuildTools
|
set VSWHERE_ARGS=-products Microsoft.VisualStudio.Product.BuildTools
|
||||||
|
) else if "%1" == "2015" (
|
||||||
|
set BUILD_VS_YEAR=2015
|
||||||
) else if "%1" == "packagename" (
|
) else if "%1" == "packagename" (
|
||||||
set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% -DCPACK_OVERRIDE_PACKAGENAME="%2"
|
set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% -DCPACK_OVERRIDE_PACKAGENAME="%2"
|
||||||
shift /1
|
shift /1
|
||||||
@@ -86,8 +88,6 @@ if NOT "%1" == "" (
|
|||||||
set BUILD_UPDATE_ARGS="--no-libraries"
|
set BUILD_UPDATE_ARGS="--no-libraries"
|
||||||
) else if "%1" == "ninja" (
|
) else if "%1" == "ninja" (
|
||||||
SET BUILD_WITH_NINJA=1
|
SET BUILD_WITH_NINJA=1
|
||||||
) else if "%1" == "sccache" (
|
|
||||||
SET BUILD_WITH_SCCACHE=1
|
|
||||||
) else if "%1" == "clean" (
|
) else if "%1" == "clean" (
|
||||||
set MUST_CLEAN=1
|
set MUST_CLEAN=1
|
||||||
) else if "%1" == "verbose" (
|
) else if "%1" == "verbose" (
|
||||||
|
@@ -30,4 +30,3 @@ set WITH_PYDEBUG=
|
|||||||
set PYDEBUG_CMAKE_ARGS=
|
set PYDEBUG_CMAKE_ARGS=
|
||||||
set FORMAT=
|
set FORMAT=
|
||||||
set TEST=
|
set TEST=
|
||||||
set BUILD_WITH_SCCACHE=
|
|
||||||
|
@@ -27,13 +27,11 @@ echo - builddir [newdir] ^(override default build folder^)
|
|||||||
echo - 2017 ^(build with visual studio 2017^)
|
echo - 2017 ^(build with visual studio 2017^)
|
||||||
echo - 2017pre ^(build with visual studio 2017 pre-release^)
|
echo - 2017pre ^(build with visual studio 2017 pre-release^)
|
||||||
echo - 2017b ^(build with visual studio 2017 Build Tools^)
|
echo - 2017b ^(build with visual studio 2017 Build Tools^)
|
||||||
echo - 2019 ^(build with visual studio 2019^)
|
|
||||||
echo - 2019pre ^(build with visual studio 2019 pre-release^)
|
|
||||||
echo - 2019b ^(build with visual studio 2019 Build Tools^)
|
|
||||||
|
|
||||||
echo.
|
echo.
|
||||||
echo Experimental options
|
echo Experimental options
|
||||||
echo - with_opengl_tests ^(enable both the render and draw opengl test suites^)
|
echo - with_opengl_tests ^(enable both the render and draw opengl test suites^)
|
||||||
|
echo - 2015 ^(build with visual studio 2015^)
|
||||||
echo - clang ^(enable building with clang^)
|
echo - clang ^(enable building with clang^)
|
||||||
echo - asan ^(enable asan when building with clang^)
|
echo - asan ^(enable asan when building with clang^)
|
||||||
echo - ninja ^(enable building with ninja instead of msbuild^)
|
echo - ninja ^(enable building with ninja instead of msbuild^)
|
||||||
|
@@ -38,7 +38,7 @@ PROJECT_NAME = Blender
|
|||||||
# could be handy for archiving the generated documentation or if some version
|
# could be handy for archiving the generated documentation or if some version
|
||||||
# control system is used.
|
# control system is used.
|
||||||
|
|
||||||
PROJECT_NUMBER = "V2.90"
|
PROJECT_NUMBER = "V2.83"
|
||||||
|
|
||||||
# Using the PROJECT_BRIEF tag one can provide an optional one line description
|
# Using the PROJECT_BRIEF tag one can provide an optional one line description
|
||||||
# for a project that appears at the top of each page and should give viewer a
|
# for a project that appears at the top of each page and should give viewer a
|
||||||
@@ -51,7 +51,7 @@ PROJECT_BRIEF =
|
|||||||
# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy
|
# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy
|
||||||
# the logo to the output directory.
|
# the logo to the output directory.
|
||||||
|
|
||||||
PROJECT_LOGO = ../../release/freedesktop/icons/scalable/apps/blender.svg
|
PROJECT_LOGO = ../../release/freedesktop/icons/48x48/apps/blender.png
|
||||||
|
|
||||||
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
|
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
|
||||||
# into which the generated documentation will be written. If a relative path is
|
# into which the generated documentation will be written. If a relative path is
|
||||||
@@ -1720,7 +1720,7 @@ COMPACT_LATEX = NO
|
|||||||
# The default value is: a4.
|
# The default value is: a4.
|
||||||
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
||||||
|
|
||||||
PAPER_TYPE = a4
|
PAPER_TYPE = a4wide
|
||||||
|
|
||||||
# The EXTRA_PACKAGES tag can be used to specify one or more LaTeX package names
|
# The EXTRA_PACKAGES tag can be used to specify one or more LaTeX package names
|
||||||
# that should be included in the LaTeX output. The package can be specified just
|
# that should be included in the LaTeX output. The package can be specified just
|
||||||
|
@@ -2,20 +2,20 @@
|
|||||||
Basic Sound Playback
|
Basic Sound Playback
|
||||||
++++++++++++++++++++
|
++++++++++++++++++++
|
||||||
|
|
||||||
This script shows how to use the classes: :class:`Device`, :class:`Sound` and
|
This script shows how to use the classes: :class:`Device`, :class:`Factory` and
|
||||||
:class:`Handle`.
|
:class:`Handle`.
|
||||||
"""
|
"""
|
||||||
import aud
|
import aud
|
||||||
|
|
||||||
device = aud.Device()
|
device = aud.device()
|
||||||
# load sound file (it can be a video file with audio)
|
# load sound file (it can be a video file with audio)
|
||||||
sound = aud.Sound('music.ogg')
|
factory = aud.Factory('music.ogg')
|
||||||
|
|
||||||
# play the audio, this return a handle to control play/pause
|
# play the audio, this return a handle to control play/pause
|
||||||
handle = device.play(sound)
|
handle = device.play(factory)
|
||||||
# if the audio is not too big and will be used often you can buffer it
|
# if the audio is not too big and will be used often you can buffer it
|
||||||
sound_buffered = aud.Sound.buffer(sound)
|
factory_buffered = aud.Factory.buffer(factory)
|
||||||
handle_buffered = device.play(sound_buffered)
|
handle_buffered = device.play(factory_buffered)
|
||||||
|
|
||||||
# stop the sounds (otherwise they play until their ends)
|
# stop the sounds (otherwise they play until their ends)
|
||||||
handle.stop()
|
handle.stop()
|
||||||
|
@@ -205,15 +205,15 @@ Support Overview
|
|||||||
|
|
||||||
* - Usage
|
* - Usage
|
||||||
- :class:`bpy.types.MeshPolygon`
|
- :class:`bpy.types.MeshPolygon`
|
||||||
- :class:`bpy.types.MeshLoopTriangle`
|
- :class:`bpy.types.MeshTessFace`
|
||||||
- :class:`bmesh.types.BMFace`
|
- :class:`bmesh.types.BMFace`
|
||||||
* - Import/Create
|
* - Import/Create
|
||||||
- Poor *(inflexible)*
|
- Poor *(inflexible)*
|
||||||
- Unusable *(read-only)*.
|
- Good *(supported as upgrade path)*
|
||||||
- Best
|
- Best
|
||||||
* - Manipulate
|
* - Manipulate
|
||||||
- Poor *(inflexible)*
|
- Poor *(inflexible)*
|
||||||
- Unusable *(read-only)*.
|
- Poor *(loses ngons)*
|
||||||
- Best
|
- Best
|
||||||
* - Export/Output
|
* - Export/Output
|
||||||
- Good *(ngon support)*
|
- Good *(ngon support)*
|
||||||
|
@@ -253,13 +253,7 @@ Registering a class with Blender results in the class definition being loaded in
|
|||||||
where it becomes available alongside existing functionality.
|
where it becomes available alongside existing functionality.
|
||||||
|
|
||||||
Once this class is loaded you can access it from :mod:`bpy.types`,
|
Once this class is loaded you can access it from :mod:`bpy.types`,
|
||||||
using the ``bl_idname`` rather than the classes original name.
|
using the bl_idname rather than the classes original name.
|
||||||
|
|
||||||
.. note::
|
|
||||||
|
|
||||||
There are some exceptions to this for class names which aren't guarantee to be unique.
|
|
||||||
In this case use: :func:`bpy.types.Struct.bl_rna_get_subclass`.
|
|
||||||
|
|
||||||
|
|
||||||
When loading a class, Blender performs sanity checks making sure all required properties and functions are found,
|
When loading a class, Blender performs sanity checks making sure all required properties and functions are found,
|
||||||
that properties have the correct type, and that functions have the right number of arguments.
|
that properties have the correct type, and that functions have the right number of arguments.
|
||||||
|
@@ -492,11 +492,6 @@ if _BPY_PROP_COLLECTION_FAKE:
|
|||||||
else:
|
else:
|
||||||
_BPY_PROP_COLLECTION_ID = "collection"
|
_BPY_PROP_COLLECTION_ID = "collection"
|
||||||
|
|
||||||
if _BPY_STRUCT_FAKE:
|
|
||||||
bpy_struct = bpy.types.bpy_struct
|
|
||||||
else:
|
|
||||||
bpy_struct = None
|
|
||||||
|
|
||||||
|
|
||||||
def escape_rst(text):
|
def escape_rst(text):
|
||||||
""" Escape plain text which may contain characters used by RST.
|
""" Escape plain text which may contain characters used by RST.
|
||||||
@@ -517,7 +512,7 @@ def is_struct_seq(value):
|
|||||||
|
|
||||||
|
|
||||||
def undocumented_message(module_name, type_name, identifier):
|
def undocumented_message(module_name, type_name, identifier):
|
||||||
return "Undocumented, consider `contributing <https://developer.blender.org/T51061>`__."
|
return "Undocumented `contribute <https://developer.blender.org/T51061>`"
|
||||||
|
|
||||||
|
|
||||||
def range_str(val):
|
def range_str(val):
|
||||||
@@ -1057,7 +1052,6 @@ context_type_map = {
|
|||||||
"selected_editable_fcurves": ("FCurve", True),
|
"selected_editable_fcurves": ("FCurve", True),
|
||||||
"selected_editable_objects": ("Object", True),
|
"selected_editable_objects": ("Object", True),
|
||||||
"selected_editable_sequences": ("Sequence", True),
|
"selected_editable_sequences": ("Sequence", True),
|
||||||
"selected_nla_strips": ("NlaStrip", True),
|
|
||||||
"selected_nodes": ("Node", True),
|
"selected_nodes": ("Node", True),
|
||||||
"selected_objects": ("Object", True),
|
"selected_objects": ("Object", True),
|
||||||
"selected_pose_bones": ("PoseBone", True),
|
"selected_pose_bones": ("PoseBone", True),
|
||||||
@@ -1079,7 +1073,6 @@ context_type_map = {
|
|||||||
"visible_pose_bones": ("PoseBone", True),
|
"visible_pose_bones": ("PoseBone", True),
|
||||||
"visible_fcurves": ("FCurve", True),
|
"visible_fcurves": ("FCurve", True),
|
||||||
"weight_paint_object": ("Object", False),
|
"weight_paint_object": ("Object", False),
|
||||||
"volume": ("Volume", False),
|
|
||||||
"world": ("World", False),
|
"world": ("World", False),
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1448,7 +1441,7 @@ def pyrna2sphinx(basepath):
|
|||||||
|
|
||||||
if _BPY_STRUCT_FAKE:
|
if _BPY_STRUCT_FAKE:
|
||||||
descr_items = [
|
descr_items = [
|
||||||
(key, descr) for key, descr in sorted(bpy_struct.__dict__.items())
|
(key, descr) for key, descr in sorted(bpy.types.Struct.__bases__[0].__dict__.items())
|
||||||
if not key.startswith("__")
|
if not key.startswith("__")
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -1464,6 +1457,9 @@ def pyrna2sphinx(basepath):
|
|||||||
for identifier, py_prop in base.get_py_properties():
|
for identifier, py_prop in base.get_py_properties():
|
||||||
lines.append(" * :class:`%s.%s`\n" % (base.identifier, identifier))
|
lines.append(" * :class:`%s.%s`\n" % (base.identifier, identifier))
|
||||||
|
|
||||||
|
for identifier, py_prop in base.get_py_properties():
|
||||||
|
lines.append(" * :class:`%s.%s`\n" % (base.identifier, identifier))
|
||||||
|
|
||||||
if lines:
|
if lines:
|
||||||
fw(".. rubric:: Inherited Properties\n\n")
|
fw(".. rubric:: Inherited Properties\n\n")
|
||||||
|
|
||||||
@@ -1487,8 +1483,6 @@ def pyrna2sphinx(basepath):
|
|||||||
lines.append(" * :class:`%s.%s`\n" % (base.identifier, func.identifier))
|
lines.append(" * :class:`%s.%s`\n" % (base.identifier, func.identifier))
|
||||||
for identifier, py_func in base.get_py_functions():
|
for identifier, py_func in base.get_py_functions():
|
||||||
lines.append(" * :class:`%s.%s`\n" % (base.identifier, identifier))
|
lines.append(" * :class:`%s.%s`\n" % (base.identifier, identifier))
|
||||||
for identifier, py_func in base.get_py_c_functions():
|
|
||||||
lines.append(" * :class:`%s.%s`\n" % (base.identifier, identifier))
|
|
||||||
|
|
||||||
if lines:
|
if lines:
|
||||||
fw(".. rubric:: Inherited Functions\n\n")
|
fw(".. rubric:: Inherited Functions\n\n")
|
||||||
@@ -1576,7 +1570,7 @@ def pyrna2sphinx(basepath):
|
|||||||
|
|
||||||
# write fake classes
|
# write fake classes
|
||||||
if _BPY_STRUCT_FAKE:
|
if _BPY_STRUCT_FAKE:
|
||||||
class_value = bpy_struct
|
class_value = bpy.types.Struct.__bases__[0]
|
||||||
fake_bpy_type(
|
fake_bpy_type(
|
||||||
"bpy.types", class_value, _BPY_STRUCT_FAKE,
|
"bpy.types", class_value, _BPY_STRUCT_FAKE,
|
||||||
"built-in base class for all classes in bpy.types.", use_subclasses=True,
|
"built-in base class for all classes in bpy.types.", use_subclasses=True,
|
||||||
@@ -1716,7 +1710,7 @@ class PatchedPythonDomain(PythonDomain):
|
|||||||
|
|
||||||
fw("def setup(app):\n")
|
fw("def setup(app):\n")
|
||||||
fw(" app.add_stylesheet('css/theme_overrides.css')\n")
|
fw(" app.add_stylesheet('css/theme_overrides.css')\n")
|
||||||
fw(" app.add_domain(PatchedPythonDomain, override=True)\n\n")
|
fw(" app.override_domain(PatchedPythonDomain)\n\n")
|
||||||
|
|
||||||
file.close()
|
file.close()
|
||||||
|
|
||||||
|
2
extern/CMakeLists.txt
vendored
2
extern/CMakeLists.txt
vendored
@@ -72,7 +72,7 @@ if(WITH_CYCLES OR WITH_COMPOSITOR OR WITH_OPENSUBDIV)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(WITH_GHOST_X11 AND WITH_GHOST_XDND)
|
if(WITH_X11 AND WITH_GHOST_XDND)
|
||||||
add_subdirectory(xdnd)
|
add_subdirectory(xdnd)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
4
extern/audaspace/bindings/C/AUD_Device.cpp
vendored
4
extern/audaspace/bindings/C/AUD_Device.cpp
vendored
@@ -290,14 +290,14 @@ AUD_API AUD_Device* AUD_Device_getCurrent()
|
|||||||
return new AUD_Device(device);
|
return new AUD_Device(device);
|
||||||
}
|
}
|
||||||
|
|
||||||
AUD_API void AUD_seekSynchronizer(AUD_Handle* handle, double time)
|
AUD_API void AUD_seekSynchronizer(AUD_Handle* handle, float time)
|
||||||
{
|
{
|
||||||
auto synchronizer = DeviceManager::getDevice()->getSynchronizer();
|
auto synchronizer = DeviceManager::getDevice()->getSynchronizer();
|
||||||
if(synchronizer)
|
if(synchronizer)
|
||||||
synchronizer->seek(*reinterpret_cast<std::shared_ptr<IHandle>*>(handle), time);
|
synchronizer->seek(*reinterpret_cast<std::shared_ptr<IHandle>*>(handle), time);
|
||||||
}
|
}
|
||||||
|
|
||||||
AUD_API double AUD_getSynchronizerPosition(AUD_Handle* handle)
|
AUD_API float AUD_getSynchronizerPosition(AUD_Handle* handle)
|
||||||
{
|
{
|
||||||
auto synchronizer = DeviceManager::getDevice()->getSynchronizer();
|
auto synchronizer = DeviceManager::getDevice()->getSynchronizer();
|
||||||
if(synchronizer)
|
if(synchronizer)
|
||||||
|
4
extern/audaspace/bindings/C/AUD_Device.h
vendored
4
extern/audaspace/bindings/C/AUD_Device.h
vendored
@@ -221,14 +221,14 @@ extern AUD_API AUD_Device* AUD_Device_getCurrent();
|
|||||||
* \param handle Playback handle.
|
* \param handle Playback handle.
|
||||||
* \param time Time in seconds to seek to.
|
* \param time Time in seconds to seek to.
|
||||||
*/
|
*/
|
||||||
extern AUD_API void AUD_seekSynchronizer(AUD_Handle* handle, double time);
|
extern AUD_API void AUD_seekSynchronizer(AUD_Handle* handle, float time);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the current sound scene playback time.
|
* Returns the current sound scene playback time.
|
||||||
* \param handle Playback handle.
|
* \param handle Playback handle.
|
||||||
* \return The playback time in seconds.
|
* \return The playback time in seconds.
|
||||||
*/
|
*/
|
||||||
extern AUD_API double AUD_getSynchronizerPosition(AUD_Handle* handle);
|
extern AUD_API float AUD_getSynchronizerPosition(AUD_Handle* handle);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Starts the playback of jack transport if possible.
|
* Starts the playback of jack transport if possible.
|
||||||
|
@@ -101,14 +101,14 @@ AUD_API int AUD_DynamicMusic_pause(AUD_DynamicMusic* player)
|
|||||||
return (*player)->pause();
|
return (*player)->pause();
|
||||||
}
|
}
|
||||||
|
|
||||||
AUD_API int AUD_DynamicMusic_seek(AUD_DynamicMusic* player, double position)
|
AUD_API int AUD_DynamicMusic_seek(AUD_DynamicMusic* player, float position)
|
||||||
{
|
{
|
||||||
assert(player);
|
assert(player);
|
||||||
|
|
||||||
return (*player)->seek(position);
|
return (*player)->seek(position);
|
||||||
}
|
}
|
||||||
|
|
||||||
AUD_API double AUD_DynamicMusic_getPosition(AUD_DynamicMusic* player)
|
AUD_API float AUD_DynamicMusic_getPosition(AUD_DynamicMusic* player)
|
||||||
{
|
{
|
||||||
assert(player);
|
assert(player);
|
||||||
|
|
||||||
|
@@ -103,14 +103,14 @@ extern AUD_API int AUD_DynamicMusic_pause(AUD_DynamicMusic* player);
|
|||||||
* \param position The new position from which to play back, in seconds.
|
* \param position The new position from which to play back, in seconds.
|
||||||
* \return 0 if the seeking wasn't possible.
|
* \return 0 if the seeking wasn't possible.
|
||||||
*/
|
*/
|
||||||
extern AUD_API int AUD_DynamicMusic_seek(AUD_DynamicMusic* player, double position);
|
extern AUD_API int AUD_DynamicMusic_seek(AUD_DynamicMusic* player, float position);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the position of the current scene of a dynamic music player.
|
* Retrieves the position of the current scene of a dynamic music player.
|
||||||
* \param player The DynamicMusic object.
|
* \param player The DynamicMusic object.
|
||||||
* \return The position of the current playing scene.
|
* \return The position of the current playing scene.
|
||||||
*/
|
*/
|
||||||
extern AUD_API double AUD_DynamicMusic_getPosition(AUD_DynamicMusic* player);
|
extern AUD_API float AUD_DynamicMusic_getPosition(AUD_DynamicMusic* player);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the volume of the current scene of a dynamic music player.
|
* Retrieves the volume of the current scene of a dynamic music player.
|
||||||
|
4
extern/audaspace/bindings/C/AUD_Handle.cpp
vendored
4
extern/audaspace/bindings/C/AUD_Handle.cpp
vendored
@@ -259,13 +259,13 @@ AUD_API int AUD_Handle_setPitch(AUD_Handle* handle, float value)
|
|||||||
return (*handle)->setPitch(value);
|
return (*handle)->setPitch(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
AUD_API double AUD_Handle_getPosition(AUD_Handle* handle)
|
AUD_API float AUD_Handle_getPosition(AUD_Handle* handle)
|
||||||
{
|
{
|
||||||
assert(handle);
|
assert(handle);
|
||||||
return (*handle)->getPosition();
|
return (*handle)->getPosition();
|
||||||
}
|
}
|
||||||
|
|
||||||
AUD_API int AUD_Handle_setPosition(AUD_Handle* handle, double value)
|
AUD_API int AUD_Handle_setPosition(AUD_Handle* handle, float value)
|
||||||
{
|
{
|
||||||
assert(handle);
|
assert(handle);
|
||||||
return (*handle)->seek(value);
|
return (*handle)->seek(value);
|
||||||
|
4
extern/audaspace/bindings/C/AUD_Handle.h
vendored
4
extern/audaspace/bindings/C/AUD_Handle.h
vendored
@@ -211,14 +211,14 @@ extern AUD_API int AUD_Handle_setPitch(AUD_Handle* handle, float value);
|
|||||||
* param handle The handle to get the position from.
|
* param handle The handle to get the position from.
|
||||||
* return The position of the handle.
|
* return The position of the handle.
|
||||||
*/
|
*/
|
||||||
extern AUD_API double AUD_Handle_getPosition(AUD_Handle* handle);
|
extern AUD_API float AUD_Handle_getPosition(AUD_Handle* handle);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the position of a handle.
|
* Sets the position of a handle.
|
||||||
* param handle The handle to set the position from.
|
* param handle The handle to set the position from.
|
||||||
* param value The new position to set.
|
* param value The new position to set.
|
||||||
*/
|
*/
|
||||||
extern AUD_API int AUD_Handle_setPosition(AUD_Handle* handle, double value);
|
extern AUD_API int AUD_Handle_setPosition(AUD_Handle* handle, float value);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the relative of a handle.
|
* Retrieves the relative of a handle.
|
||||||
|
4
extern/audaspace/bindings/C/AUD_Sequence.cpp
vendored
4
extern/audaspace/bindings/C/AUD_Sequence.cpp
vendored
@@ -41,7 +41,7 @@ AUD_API void AUD_Sequence_free(AUD_Sound* sequence)
|
|||||||
delete sequence;
|
delete sequence;
|
||||||
}
|
}
|
||||||
|
|
||||||
AUD_API AUD_SequenceEntry* AUD_Sequence_add(AUD_Sound* sequence, AUD_Sound* sound, double begin, double end, double skip)
|
AUD_API AUD_SequenceEntry* AUD_Sequence_add(AUD_Sound* sequence, AUD_Sound* sound, float begin, float end, float skip)
|
||||||
{
|
{
|
||||||
if(!sound)
|
if(!sound)
|
||||||
return new AUD_SequenceEntry(((Sequence *)sequence->get())->add(AUD_Sound(), begin, end, skip));
|
return new AUD_SequenceEntry(((Sequence *)sequence->get())->add(AUD_Sound(), begin, end, skip));
|
||||||
@@ -160,7 +160,7 @@ AUD_API void AUD_Sequence_setSpeedOfSound(AUD_Sound* sequence, float value)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
AUD_API void AUD_SequenceEntry_move(AUD_SequenceEntry* entry, double begin, double end, double skip)
|
AUD_API void AUD_SequenceEntry_move(AUD_SequenceEntry* entry, float begin, float end, float skip)
|
||||||
{
|
{
|
||||||
(*entry)->move(begin, end, skip);
|
(*entry)->move(begin, end, skip);
|
||||||
}
|
}
|
||||||
|
4
extern/audaspace/bindings/C/AUD_Sequence.h
vendored
4
extern/audaspace/bindings/C/AUD_Sequence.h
vendored
@@ -55,7 +55,7 @@ extern AUD_API void AUD_Sequence_free(AUD_Sound* sequence);
|
|||||||
* \param skip How much seconds should be skipped at the beginning.
|
* \param skip How much seconds should be skipped at the beginning.
|
||||||
* \return The entry added.
|
* \return The entry added.
|
||||||
*/
|
*/
|
||||||
extern AUD_API AUD_SequenceEntry* AUD_Sequence_add(AUD_Sound* sequence, AUD_Sound* sound, double begin, double end, double skip);
|
extern AUD_API AUD_SequenceEntry* AUD_Sequence_add(AUD_Sound* sequence, AUD_Sound* sound, float begin, float end, float skip);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Removes an entry from the scene.
|
* Removes an entry from the scene.
|
||||||
@@ -167,7 +167,7 @@ extern AUD_API void AUD_Sequence_setSpeedOfSound(AUD_Sound* sequence, float valu
|
|||||||
* \param end The new end time or a negative value if unknown.
|
* \param end The new end time or a negative value if unknown.
|
||||||
* \param skip How many seconds to skip at the beginning.
|
* \param skip How many seconds to skip at the beginning.
|
||||||
*/
|
*/
|
||||||
extern AUD_API void AUD_SequenceEntry_move(AUD_SequenceEntry* entry, double begin, double end, double skip);
|
extern AUD_API void AUD_SequenceEntry_move(AUD_SequenceEntry* entry, float begin, float end, float skip);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Writes animation data to a sequenced entry.
|
* Writes animation data to a sequenced entry.
|
||||||
|
4
extern/audaspace/bindings/C/AUD_Special.cpp
vendored
4
extern/audaspace/bindings/C/AUD_Special.cpp
vendored
@@ -175,7 +175,7 @@ static void pauseSound(AUD_Handle* handle)
|
|||||||
(*handle)->pause();
|
(*handle)->pause();
|
||||||
}
|
}
|
||||||
|
|
||||||
AUD_API AUD_Handle* AUD_pauseAfter(AUD_Handle* handle, double seconds)
|
AUD_API AUD_Handle* AUD_pauseAfter(AUD_Handle* handle, float seconds)
|
||||||
{
|
{
|
||||||
auto device = DeviceManager::getDevice();
|
auto device = DeviceManager::getDevice();
|
||||||
|
|
||||||
@@ -336,7 +336,7 @@ AUD_API const char* AUD_mixdown_per_channel(AUD_Sound* sound, unsigned int start
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
AUD_API AUD_Device* AUD_openMixdownDevice(AUD_DeviceSpecs specs, AUD_Sound* sequencer, float volume, double start)
|
AUD_API AUD_Device* AUD_openMixdownDevice(AUD_DeviceSpecs specs, AUD_Sound* sequencer, float volume, float start)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
4
extern/audaspace/bindings/C/AUD_Special.h
vendored
4
extern/audaspace/bindings/C/AUD_Special.h
vendored
@@ -45,7 +45,7 @@ extern AUD_API float* AUD_readSoundBuffer(const char* filename, float low, float
|
|||||||
* \param seconds The time in seconds.
|
* \param seconds The time in seconds.
|
||||||
* \return The silence handle.
|
* \return The silence handle.
|
||||||
*/
|
*/
|
||||||
extern AUD_API AUD_Handle* AUD_pauseAfter(AUD_Handle* handle, double seconds);
|
extern AUD_API AUD_Handle* AUD_pauseAfter(AUD_Handle* handle, float seconds);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reads a sound into a buffer for drawing at a specific sampling rate.
|
* Reads a sound into a buffer for drawing at a specific sampling rate.
|
||||||
@@ -101,7 +101,7 @@ extern AUD_API const char* AUD_mixdown_per_channel(AUD_Sound* sound, unsigned in
|
|||||||
* \param start The start time of the mixdown in the sound scene.
|
* \param start The start time of the mixdown in the sound scene.
|
||||||
* \return The read device for the mixdown.
|
* \return The read device for the mixdown.
|
||||||
*/
|
*/
|
||||||
extern AUD_API AUD_Device* AUD_openMixdownDevice(AUD_DeviceSpecs specs, AUD_Sound* sequencer, float volume, double start);
|
extern AUD_API AUD_Device* AUD_openMixdownDevice(AUD_DeviceSpecs specs, AUD_Sound* sequencer, float volume, float start);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initializes audio routines (FFMPEG/JACK if it is enabled).
|
* Initializes audio routines (FFMPEG/JACK if it is enabled).
|
||||||
|
1
extern/audaspace/bindings/doc/device.rst
vendored
1
extern/audaspace/bindings/doc/device.rst
vendored
@@ -4,5 +4,4 @@ Device
|
|||||||
.. currentmodule:: aud
|
.. currentmodule:: aud
|
||||||
.. autoclass:: Device
|
.. autoclass:: Device
|
||||||
:members:
|
:members:
|
||||||
:noindex:
|
|
||||||
|
|
||||||
|
1
extern/audaspace/bindings/doc/handle.rst
vendored
1
extern/audaspace/bindings/doc/handle.rst
vendored
@@ -4,5 +4,4 @@ Handle
|
|||||||
.. currentmodule:: aud
|
.. currentmodule:: aud
|
||||||
.. autoclass:: Handle
|
.. autoclass:: Handle
|
||||||
:members:
|
:members:
|
||||||
:noindex:
|
|
||||||
|
|
||||||
|
3
extern/audaspace/bindings/doc/index.rst
vendored
3
extern/audaspace/bindings/doc/index.rst
vendored
@@ -7,7 +7,6 @@ Welcome to audaspace's documentation!
|
|||||||
=====================================
|
=====================================
|
||||||
|
|
||||||
.. automodule:: aud
|
.. automodule:: aud
|
||||||
:no-members:
|
|
||||||
|
|
||||||
This documentation is valid for both the Python and C bindings of audaspace. If you are looking for installation instructions check the `C++ API documentation <../index.html>`_. As C is not an object oriented language everything is accessible via functions where the first paramter is always the object. For methods these are named as ``AUD_ClassName_method()`` and properties are accessed via ``AUD_ClassName_property_get/set()``. Python users simply ``import aud`` to access the library.
|
This documentation is valid for both the Python and C bindings of audaspace. If you are looking for installation instructions check the `C++ API documentation <../index.html>`_. As C is not an object oriented language everything is accessible via functions where the first paramter is always the object. For methods these are named as ``AUD_ClassName_method()`` and properties are accessed via ``AUD_ClassName_property_get/set()``. Python users simply ``import aud`` to access the library.
|
||||||
|
|
||||||
@@ -19,7 +18,7 @@ This documentation is valid for both the Python and C bindings of audaspace. If
|
|||||||
Classes:
|
Classes:
|
||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
:maxdepth: 1
|
:maxdepth: 2
|
||||||
|
|
||||||
device
|
device
|
||||||
sound
|
sound
|
||||||
|
1
extern/audaspace/bindings/doc/sequence.rst
vendored
1
extern/audaspace/bindings/doc/sequence.rst
vendored
@@ -4,5 +4,4 @@ Sequence
|
|||||||
.. currentmodule:: aud
|
.. currentmodule:: aud
|
||||||
.. autoclass:: Sequence
|
.. autoclass:: Sequence
|
||||||
:members:
|
:members:
|
||||||
:noindex:
|
|
||||||
|
|
||||||
|
@@ -4,5 +4,4 @@ Sequence Entry
|
|||||||
.. currentmodule:: aud
|
.. currentmodule:: aud
|
||||||
.. autoclass:: SequenceEntry
|
.. autoclass:: SequenceEntry
|
||||||
:members:
|
:members:
|
||||||
:noindex:
|
|
||||||
|
|
||||||
|
1
extern/audaspace/bindings/doc/sound.rst
vendored
1
extern/audaspace/bindings/doc/sound.rst
vendored
@@ -4,5 +4,4 @@ Sound
|
|||||||
.. currentmodule:: aud
|
.. currentmodule:: aud
|
||||||
.. autoclass:: Sound
|
.. autoclass:: Sound
|
||||||
:members:
|
:members:
|
||||||
:noindex:
|
|
||||||
|
|
||||||
|
128
extern/audaspace/bindings/doc/tutorials.rst
vendored
128
extern/audaspace/bindings/doc/tutorials.rst
vendored
@@ -4,51 +4,35 @@ Tutorials
|
|||||||
Introduction
|
Introduction
|
||||||
------------
|
------------
|
||||||
|
|
||||||
The C and Python binding for audaspace were designed with simplicity in mind.
|
The C and Python binding for audaspace were designed with simplicity in mind. This means however that to use the full capabilities of audaspace, there is no way around the C++ library.
|
||||||
This means however that to use the full capabilities of audaspace,
|
|
||||||
there is no way around the C++ library.
|
|
||||||
|
|
||||||
Simple Demo
|
Simple Demo
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
The **simple.py** example program contains all the basic
|
The **simple.py** example program contains all the basic building blocks for an application using audaspace. These building blocks are basically the classes :class:`aud.Device`, :class:`aud.Sound` and :class:`aud.Handle`.
|
||||||
building blocks for an application using audaspace.
|
|
||||||
These building blocks are basically the classes :class:`aud.Device`,
|
|
||||||
:class:`aud.Sound` and :class:`aud.Handle`.
|
|
||||||
|
|
||||||
We start with importing :mod:`aud` and :mod:`time`
|
We start with importing :mod:`aud` and :mod:`time` as the modules we need for our simple example.
|
||||||
as the modules we need for our simple example.
|
|
||||||
|
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
import aud, time
|
import aud, time
|
||||||
|
|
||||||
The first step now is to open an output device and this
|
The first step now is to open an output device and this can simply be done by allocating a :class:`aud.Device` object.
|
||||||
can simply be done by allocating a :class:`aud.Device` object.
|
|
||||||
|
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
device = aud.Device()
|
device = aud.Device()
|
||||||
|
|
||||||
To create a sound we can choose to load one from a :func:`aud.Sound.file`,
|
To create a sound we can choose to load one from a :func:`aud.Sound.file`, or we use one of our signal generators. We decide to do the latter and create a :func:`aud.Sound.sine` signal with a frequency of 440 Hz.
|
||||||
or we use one of our signal generators. We decide to do the latter
|
|
||||||
and create a :func:`aud.Sound.sine` signal with a frequency of 440 Hz.
|
|
||||||
|
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
sine = aud.Sound.sine(440)
|
sine = aud.Sound.sine(440)
|
||||||
|
|
||||||
.. note:: At this point nothing is playing back yet,
|
.. note:: At this point nothing is playing back yet, :class:`aud.Sound` objects are just descriptions of sounds.
|
||||||
:class:`aud.Sound` objects are just descriptions of sounds.
|
|
||||||
|
|
||||||
However instead of a sine wave, we would like to have a square wave
|
However instead of a sine wave, we would like to have a square wave to produce a more retro gaming sound. We could of course use the :func:`aud.Sound.square` generator instead of sine, but we want to show how to apply effects, so we apply a :func:`aud.Sound.threshold` which makes a square wave out of our sine too, even if less efficient than directly generating the square wave.
|
||||||
to produce a more retro gaming sound. We could of course use the
|
|
||||||
:func:`aud.Sound.square` generator instead of sine,
|
|
||||||
but we want to show how to apply effects,
|
|
||||||
so we apply a :func:`aud.Sound.threshold`
|
|
||||||
which makes a square wave out of our sine too,
|
|
||||||
even if less efficient than directly generating the square wave.
|
|
||||||
|
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
@@ -56,19 +40,13 @@ even if less efficient than directly generating the square wave.
|
|||||||
|
|
||||||
.. note:: The :class:`aud.Sound` class offers generator and effect functions.
|
.. note:: The :class:`aud.Sound` class offers generator and effect functions.
|
||||||
|
|
||||||
The we can play our sound by calling the
|
The we can play our sound by calling the :func:`aud.Device.play` method of our device. This method returns a :class:`aud.Handle` which is used to control the playback of the sound.
|
||||||
:func:`aud.Device.play` method of our device.
|
|
||||||
This method returns a :class:`aud.Handle`
|
|
||||||
which is used to control the playback of the sound.
|
|
||||||
|
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
handle = device.play(square)
|
handle = device.play(square)
|
||||||
|
|
||||||
Now if we do nothing else anymore the application will quit immediately,
|
Now if we do nothing else anymore the application will quit immediately, so we won't hear much of our square wave, so we decide to wait for three seconds before quitting the application by calling :func:`time.sleep`.
|
||||||
so we won't hear much of our square wave,
|
|
||||||
so we decide to wait for three seconds before
|
|
||||||
quitting the application by calling :func:`time.sleep`.
|
|
||||||
|
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
@@ -77,47 +55,29 @@ quitting the application by calling :func:`time.sleep`.
|
|||||||
Audioplayer
|
Audioplayer
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
Now that we know the basics of audaspace,
|
Now that we know the basics of audaspace, we can build our own music player easily by just slightly changing the previous program. The **player.py** example does exactly that, let's have a short look at the differences:
|
||||||
we can build our own music player easily
|
|
||||||
by just slightly changing the previous program.
|
|
||||||
The **player.py** example does exactly that,
|
|
||||||
let's have a short look at the differences:
|
|
||||||
|
|
||||||
Instead of creating a sine signal and thresholding it,
|
Instead of creating a sine signal and thresholding it, we in fact use the :func:`aud.Sound.file` function to load a sound from a file. The filename we pass is the first command line argument our application got.
|
||||||
we in fact use the :func:`aud.Sound.file` function to load a sound from a file.
|
|
||||||
The filename we pass is the first command line argument our application got.
|
|
||||||
|
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
sound = aud.Sound.file(sys.argv[1])
|
sound = aud.Sound.file(sys.argv[1])
|
||||||
|
|
||||||
When the sound gets played back we now want to wait until
|
When the sound gets played back we now want to wait until the whole file has been played, so we use the :data:`aud.Handle.status` property to determine whether the sound finished playing.
|
||||||
the whole file has been played, so we use the :data:`aud.Handle.status`
|
|
||||||
property to determine whether the sound finished playing.
|
|
||||||
|
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
while handle.status:
|
while handle.status:
|
||||||
time.sleep(0.1)
|
time.sleep(0.1)
|
||||||
|
|
||||||
We don't make any error checks if the user actually added a command
|
We don't make any error checks if the user actually added a command line argument. As an exercise you could extend this program to play any number of command line supplied files in sequence.
|
||||||
line argument. As an exercise you could extend this program to play
|
|
||||||
any number of command line supplied files in sequence.
|
|
||||||
|
|
||||||
Siren
|
Siren
|
||||||
-----
|
-----
|
||||||
|
|
||||||
Let's get a little bit more complex. The **siren.py** example
|
Let's get a little bit more complex. The **siren.py** example plays a generated siren sound that circles around your head. Depending on how many speakers you have and if the output device used supports the speaker setup, you will hear this effect. With stereo speakers you should at least hear some left-right-panning.
|
||||||
plays a generated siren sound that circles around your head.
|
|
||||||
Depending on how many speakers you have and if the output
|
|
||||||
device used supports the speaker setup, you will hear this effect.
|
|
||||||
With stereo speakers you should at least hear some left-right-panning.
|
|
||||||
|
|
||||||
We start off again with importing the modules we need and
|
We start off again with importing the modules we need and we also define some properties of our siren sound. We want it to consist of two sine sounds with different frequencies. We define a length for the sine sounds and how long a fade in/out should take. We also know already how to open a device.
|
||||||
we also define some properties of our siren sound.
|
|
||||||
We want it to consist of two sine sounds with different frequencies.
|
|
||||||
We define a length for the sine sounds and how long a fade in/out should take.
|
|
||||||
We also know already how to open a device.
|
|
||||||
|
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
@@ -128,35 +88,27 @@ We also know already how to open a device.
|
|||||||
|
|
||||||
device = aud.Device()
|
device = aud.Device()
|
||||||
|
|
||||||
The next thing to do is to define our sine waves and apply all the required effects.
|
The next thing to do is to define our sine waves and apply all the required effects. As each of the effect functions returns the corresponding sound, we can easily chain those calls together.
|
||||||
As each of the effect functions returns the corresponding sound,
|
|
||||||
we can easily chain those calls together.
|
|
||||||
|
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
high = aud.Sound.sine(880).limit(0, length).fadein(0, fadelength).fadeout(length - fadelength, length)
|
high = aud.Sound.sine(880).limit(0, length).fadein(0, fadelength).fadeout(length - fadelength, length)
|
||||||
low = aud.Sound.sine(700).limit(0, length).fadein(0, fadelength).fadeout(length - fadelength, length).volume(0.6)
|
low = aud.Sound.sine(700).limit(0, length).fadein(0, fadelength).fadeout(length - fadelength, length).volume(0.6)
|
||||||
|
|
||||||
The next step is to connect the two sines,
|
The next step is to connect the two sines, which we do using the :func:`aud.Sound.join` function.
|
||||||
which we do using the :func:`aud.Sound.join` function.
|
|
||||||
|
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
sound = high.join(low)
|
sound = high.join(low)
|
||||||
|
|
||||||
The generated siren sound can now be played back and what we also do is to loop it.
|
The generated siren sound can now be played back and what we also do is to loop it. Therefore we set the :data:`aud.Handle.loop_count` to a negative value to loop forever.
|
||||||
Therefore we set the :data:`aud.Handle.loop_count` to a negative value to loop forever.
|
|
||||||
|
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
handle = device.play(sound)
|
handle = device.play(sound)
|
||||||
handle.loop_count = -1
|
handle.loop_count = -1
|
||||||
|
|
||||||
Now we use some timing code to make sure our demo runs for 10 seconds,
|
Now we use some timing code to make sure our demo runs for 10 seconds, but we also use the time to update the location of our playing sound, with the :data:`aud.Handle.location` property, which is a three dimensional vector. The trigonometic calculation based on the running time of the program keeps the sound on the XZ plane letting it follow a circle around us.
|
||||||
but we also use the time to update the location of our playing sound,
|
|
||||||
with the :data:`aud.Handle.location` property, which is a three dimensional vector.
|
|
||||||
The trigonometic calculation based on the running time of the program keeps
|
|
||||||
the sound on the XZ plane letting it follow a circle around us.
|
|
||||||
|
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
@@ -167,54 +119,33 @@ the sound on the XZ plane letting it follow a circle around us.
|
|||||||
|
|
||||||
handle.location = [math.sin(angle), 0, -math.cos(angle)]
|
handle.location = [math.sin(angle), 0, -math.cos(angle)]
|
||||||
|
|
||||||
As an exercise you could try to let the sound come from the far left
|
As an exercise you could try to let the sound come from the far left and go to the far right and a little bit in front of you within the 10 second runtime of the program. With this change you should be able to hear the volume of the sound change, depending on how far it is away from you. Updating the :data:`aud.Handle.velocity` property properly also enables the doppler effect. Compare your solution to the **siren2.py** demo.
|
||||||
and go to the far right and a little bit in front of you within the
|
|
||||||
10 second runtime of the program. With this change you should be able
|
|
||||||
to hear the volume of the sound change, depending on how far it is away from you.
|
|
||||||
Updating the :data:`aud.Handle.velocity` property properly also enables the doppler effect.
|
|
||||||
Compare your solution to the **siren2.py** demo.
|
|
||||||
|
|
||||||
Tetris
|
Tetris
|
||||||
------
|
------
|
||||||
|
|
||||||
The **tetris.py** demo application shows an even more
|
The **tetris.py** demo application shows an even more complex application which generates retro tetris music. Looking at the source code there should be nothing new here, again the functions used from audaspace are the same as in the previous examples. In the :func:`parseNote` function all single notes get joined which leads to a very long chain of sounds. If you think of :func:`aud.Sound.join` as a function that creates a binary tree with the two joined sounds as leaves then the :func:`parseNote` function creates a very unbalanced tree.
|
||||||
complex application which generates retro tetris music.
|
|
||||||
Looking at the source code there should be nothing new here,
|
|
||||||
again the functions used from audaspace are the same as in the previous examples.
|
|
||||||
In the :func:`parseNote` function all single notes get joined which leads
|
|
||||||
to a very long chain of sounds. If you think of :func:`aud.Sound.join`
|
|
||||||
as a function that creates a binary tree with the two joined sounds as
|
|
||||||
leaves then the :func:`parseNote` function creates a very unbalanced tree.
|
|
||||||
|
|
||||||
Insted we could rewrite the code to use two other classes:
|
Insted we could rewrite the code to use two other classes: :class:`aud.Sequence` and :class:`aud.SequenceEntry` to sequence the notes. The **tetris2.py** application does exactly that. Before the while loop we add a variable that stores the current position in the score and create a new :class:`aud.Sequence` object.
|
||||||
:class:`aud.Sequence` and :class:`aud.SequenceEntry` to sequence the notes.
|
|
||||||
The **tetris2.py** application does exactly that.
|
|
||||||
Before the while loop we add a variable that stores the current position
|
|
||||||
in the score and create a new :class:`aud.Sequence` object.
|
|
||||||
|
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
position = 0
|
position = 0
|
||||||
sequence = aud.Sequence()
|
sequence = aud.Sequence()
|
||||||
|
|
||||||
Then in the loop we can create the note simply by chaining the
|
Then in the loop we can create the note simply by chaining the :func:`aud.Sound.square` generator and :func:`aud.Sound.fadein` and :func:`aud.Sound.fadeout` effects.
|
||||||
:func:`aud.Sound.square` generator and :func:`aud.Sound.fadein`
|
|
||||||
and :func:`aud.Sound.fadeout` effects.
|
|
||||||
|
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
note = aud.Sound.square(freq, rate).fadein(0, fadelength).fadeout(length - fadelength, fadelength)
|
note = aud.Sound.square(freq, rate).fadein(0, fadelength).fadeout(length - fadelength, fadelength)
|
||||||
|
|
||||||
Now instead of using :func:`aud.Sound.limit` and :func:`aud.Sound.join`
|
Now instead of using :func:`aud.Sound.limit` and :func:`aud.Sound.join` we simply add the sound to the sequence.
|
||||||
we simply add the sound to the sequence.
|
|
||||||
|
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
entry = sequence.add(note, position, position + length, 0)
|
entry = sequence.add(note, position, position + length, 0)
|
||||||
|
|
||||||
The entry returned from the :func:`aud.Sequence.add`
|
The entry returned from the :func:`aud.Sequence.add` function is an object of the :class:`aud.SequenceEntry` class. We can use this entry to mute the note in case it's actually a pause.
|
||||||
function is an object of the :class:`aud.SequenceEntry` class.
|
|
||||||
We can use this entry to mute the note in case it's actually a pause.
|
|
||||||
|
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
@@ -227,14 +158,9 @@ Lastly we have to update our position variable.
|
|||||||
|
|
||||||
position += length
|
position += length
|
||||||
|
|
||||||
Now in **tetris2.py** we used the :data:`aud.SequenceEntry.muted`
|
Now in **tetris2.py** we used the :data:`aud.SequenceEntry.muted` property to show how the :class:`aud.SequenceEntry` class can be used, but it would actually be smarter to not even create a note for pauses and just skip them. You can try to implement this as an exercise and then check out the solution in **tetris3.py**.
|
||||||
property to show how the :class:`aud.SequenceEntry` class can be used,
|
|
||||||
but it would actually be smarter to not even create a note for pauses and just skip them.
|
|
||||||
You can try to implement this as an exercise and then check out the solution in **tetris3.py**.
|
|
||||||
|
|
||||||
Conclusion
|
Conclusion
|
||||||
----------
|
----------
|
||||||
|
|
||||||
We introduced all five currently available classes in the audaspace Python API.
|
We introduced all five currently available classes in the audaspace Python API. Of course all classes offer a lot more functions than have been used in these demo applications, check out the specific class documentation for more details.
|
||||||
Of course all classes offer a lot more functions than have been used in these demo applications,
|
|
||||||
check out the specific class documentation for more details.
|
|
||||||
|
50
extern/audaspace/bindings/python/PyDevice.cpp
vendored
50
extern/audaspace/bindings/python/PyDevice.cpp
vendored
@@ -124,17 +124,15 @@ Device_new(PyTypeObject* type, PyObject* args, PyObject* kwds)
|
|||||||
}
|
}
|
||||||
|
|
||||||
PyDoc_STRVAR(M_aud_Device_lock_doc,
|
PyDoc_STRVAR(M_aud_Device_lock_doc,
|
||||||
".. classmethod:: lock()\n\n"
|
"lock()\n\n"
|
||||||
" Locks the device so that it's guaranteed, that no samples are\n"
|
"Locks the device so that it's guaranteed, that no samples are "
|
||||||
" read from the streams until :meth:`unlock` is called.\n"
|
"read from the streams until :meth:`unlock` is called.\n"
|
||||||
" This is useful if you want to do start/stop/pause/resume some\n"
|
"This is useful if you want to do start/stop/pause/resume some "
|
||||||
" sounds at the same time.\n\n"
|
"sounds at the same time.\n\n"
|
||||||
" .. note::\n\n"
|
".. note:: The device has to be unlocked as often as locked to be "
|
||||||
" The device has to be unlocked as often as locked to be\n"
|
"able to continue playback.\n\n"
|
||||||
" able to continue playback.\n\n"
|
".. warning:: Make sure the time between locking and unlocking is "
|
||||||
" .. warning::\n\n"
|
"as short as possible to avoid clicks.");
|
||||||
" Make sure the time between locking and unlocking is\n"
|
|
||||||
" as short as possible to avoid clicks.");
|
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
Device_lock(Device* self)
|
Device_lock(Device* self)
|
||||||
@@ -152,15 +150,15 @@ Device_lock(Device* self)
|
|||||||
}
|
}
|
||||||
|
|
||||||
PyDoc_STRVAR(M_aud_Device_play_doc,
|
PyDoc_STRVAR(M_aud_Device_play_doc,
|
||||||
".. classmethod:: play(sound, keep=False)\n\n"
|
"play(sound, keep=False)\n\n"
|
||||||
" Plays a sound.\n\n"
|
"Plays a sound.\n\n"
|
||||||
" :arg sound: The sound to play.\n"
|
":arg sound: The sound to play.\n"
|
||||||
" :type sound: :class:`Sound`\n"
|
":type sound: :class:`Sound`\n"
|
||||||
" :arg keep: See :attr:`Handle.keep`.\n"
|
":arg keep: See :attr:`Handle.keep`.\n"
|
||||||
" :type keep: bool\n"
|
":type keep: bool\n"
|
||||||
" :return: The playback handle with which playback can be\n"
|
":return: The playback handle with which playback can be "
|
||||||
" controlled with.\n"
|
"controlled with.\n"
|
||||||
" :rtype: :class:`Handle`");
|
":rtype: :class:`Handle`");
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
Device_play(Device* self, PyObject* args, PyObject* kwds)
|
Device_play(Device* self, PyObject* args, PyObject* kwds)
|
||||||
@@ -212,8 +210,8 @@ Device_play(Device* self, PyObject* args, PyObject* kwds)
|
|||||||
}
|
}
|
||||||
|
|
||||||
PyDoc_STRVAR(M_aud_Device_stopAll_doc,
|
PyDoc_STRVAR(M_aud_Device_stopAll_doc,
|
||||||
".. classmethod:: stopAll()\n\n"
|
"stopAll()\n\n"
|
||||||
" Stops all playing and paused sounds.");
|
"Stops all playing and paused sounds.");
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
Device_stopAll(Device* self)
|
Device_stopAll(Device* self)
|
||||||
@@ -231,9 +229,9 @@ Device_stopAll(Device* self)
|
|||||||
}
|
}
|
||||||
|
|
||||||
PyDoc_STRVAR(M_aud_Device_unlock_doc,
|
PyDoc_STRVAR(M_aud_Device_unlock_doc,
|
||||||
".. classmethod:: unlock()\n\n"
|
"unlock()\n\n"
|
||||||
" Unlocks the device after a lock call, see :meth:`lock` for\n"
|
"Unlocks the device after a lock call, see :meth:`lock` for "
|
||||||
" details.");
|
"details.");
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
Device_unlock(Device* self)
|
Device_unlock(Device* self)
|
||||||
@@ -286,7 +284,7 @@ Device_get_channels(Device* self, void* nothing)
|
|||||||
|
|
||||||
PyDoc_STRVAR(M_aud_Device_distance_model_doc,
|
PyDoc_STRVAR(M_aud_Device_distance_model_doc,
|
||||||
"The distance model of the device.\n\n"
|
"The distance model of the device.\n\n"
|
||||||
".. seealso:: `OpenAL Documentation <https://www.openal.org/documentation/>`__");
|
".. seealso:: http://connect.creativelabs.com/openal/Documentation/OpenAL%201.1%20Specification.htm#_Toc199835864");
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
Device_get_distance_model(Device* self, void* nothing)
|
Device_get_distance_model(Device* self, void* nothing)
|
||||||
|
@@ -60,12 +60,12 @@ DynamicMusic_dealloc(DynamicMusicP* self)
|
|||||||
}
|
}
|
||||||
|
|
||||||
PyDoc_STRVAR(M_aud_DynamicMusic_addScene_doc,
|
PyDoc_STRVAR(M_aud_DynamicMusic_addScene_doc,
|
||||||
".. classmethod:: addScene(scene)\n\n"
|
"addScene(scene)\n\n"
|
||||||
" Adds a new scene.\n\n"
|
"Adds a new scene.\n\n"
|
||||||
" :arg scene: The scene sound.\n"
|
":arg scene: The scene sound.\n"
|
||||||
" :type scene: :class:`Sound`\n"
|
":type scene: :class:`Sound`\n"
|
||||||
" :return: The new scene id.\n"
|
":return: The new scene id.\n"
|
||||||
" :rtype: int");
|
":rtype: int");
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
DynamicMusic_addScene(DynamicMusicP* self, PyObject* args)
|
DynamicMusic_addScene(DynamicMusicP* self, PyObject* args)
|
||||||
@@ -90,16 +90,16 @@ DynamicMusic_addScene(DynamicMusicP* self, PyObject* args)
|
|||||||
}
|
}
|
||||||
|
|
||||||
PyDoc_STRVAR(M_aud_DynamicMusic_addTransition_doc,
|
PyDoc_STRVAR(M_aud_DynamicMusic_addTransition_doc,
|
||||||
".. classmethod:: addTransition(ini, end, transition)\n\n"
|
"addTransition(ini, end, transition)\n\n"
|
||||||
" Adds a new scene.\n\n"
|
"Adds a new scene.\n\n"
|
||||||
" :arg ini: the initial scene foor the transition.\n"
|
":arg ini: the initial scene foor the transition.\n"
|
||||||
" :type ini: int\n"
|
":type ini: int\n"
|
||||||
" :arg end: The final scene for the transition.\n"
|
":arg end: The final scene for the transition.\n"
|
||||||
" :type end: int\n"
|
":type end: int\n"
|
||||||
" :arg transition: The transition sound.\n"
|
":arg transition: The transition sound.\n"
|
||||||
" :type transition: :class:`Sound`\n"
|
":type transition: :class:`Sound`\n"
|
||||||
" :return: false if the ini or end scenes don't exist, true othrwise.\n"
|
":return: false if the ini or end scenes don't exist, true othrwise.\n"
|
||||||
" :rtype: bool");
|
":rtype: bool");
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
DynamicMusic_addTransition(DynamicMusicP* self, PyObject* args)
|
DynamicMusic_addTransition(DynamicMusicP* self, PyObject* args)
|
||||||
@@ -125,10 +125,10 @@ DynamicMusic_addTransition(DynamicMusicP* self, PyObject* args)
|
|||||||
}
|
}
|
||||||
|
|
||||||
PyDoc_STRVAR(M_aud_DynamicMusic_resume_doc,
|
PyDoc_STRVAR(M_aud_DynamicMusic_resume_doc,
|
||||||
".. classmethod:: resume()\n\n"
|
"resume()\n\n"
|
||||||
" Resumes playback of the scene.\n\n"
|
"Resumes playback of the scene.\n\n"
|
||||||
" :return: Whether the action succeeded.\n"
|
":return: Whether the action succeeded.\n"
|
||||||
" :rtype: bool");
|
":rtype: bool");
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
DynamicMusic_resume(DynamicMusicP* self)
|
DynamicMusic_resume(DynamicMusicP* self)
|
||||||
@@ -145,10 +145,10 @@ DynamicMusic_resume(DynamicMusicP* self)
|
|||||||
}
|
}
|
||||||
|
|
||||||
PyDoc_STRVAR(M_aud_DynamicMusic_pause_doc,
|
PyDoc_STRVAR(M_aud_DynamicMusic_pause_doc,
|
||||||
".. classmethod:: pause()\n\n"
|
"pause()\n\n"
|
||||||
" Pauses playback of the scene.\n\n"
|
"Pauses playback of the scene.\n\n"
|
||||||
" :return: Whether the action succeeded.\n"
|
":return: Whether the action succeeded.\n"
|
||||||
" :rtype: bool");
|
":rtype: bool");
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
DynamicMusic_pause(DynamicMusicP* self)
|
DynamicMusic_pause(DynamicMusicP* self)
|
||||||
@@ -165,10 +165,10 @@ DynamicMusic_pause(DynamicMusicP* self)
|
|||||||
}
|
}
|
||||||
|
|
||||||
PyDoc_STRVAR(M_aud_DynamicMusic_stop_doc,
|
PyDoc_STRVAR(M_aud_DynamicMusic_stop_doc,
|
||||||
".. classmethod:: stop()\n\n"
|
"stop()\n\n"
|
||||||
" Stops playback of the scene.\n\n"
|
"Stops playback of the scene.\n\n"
|
||||||
" :return: Whether the action succeeded.\n"
|
":return: Whether the action succeeded.\n"
|
||||||
" :rtype: bool\n\n");
|
":rtype: bool\n\n");
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
DynamicMusic_stop(DynamicMusicP* self)
|
DynamicMusic_stop(DynamicMusicP* self)
|
||||||
@@ -228,9 +228,9 @@ PyDoc_STRVAR(M_aud_DynamicMusic_position_doc,
|
|||||||
static int
|
static int
|
||||||
DynamicMusic_set_position(DynamicMusicP* self, PyObject* args, void* nothing)
|
DynamicMusic_set_position(DynamicMusicP* self, PyObject* args, void* nothing)
|
||||||
{
|
{
|
||||||
double position;
|
float position;
|
||||||
|
|
||||||
if(!PyArg_Parse(args, "d:position", &position))
|
if(!PyArg_Parse(args, "f:position", &position))
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
try
|
try
|
||||||
@@ -252,7 +252,7 @@ DynamicMusic_get_position(DynamicMusicP* self, void* nothing)
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
return Py_BuildValue("d", (*reinterpret_cast<std::shared_ptr<aud::DynamicMusic>*>(self->dynamicMusic))->getPosition());
|
return Py_BuildValue("f", (*reinterpret_cast<std::shared_ptr<aud::DynamicMusic>*>(self->dynamicMusic))->getPosition());
|
||||||
}
|
}
|
||||||
catch(aud::Exception& e)
|
catch(aud::Exception& e)
|
||||||
{
|
{
|
||||||
|
52
extern/audaspace/bindings/python/PyHRTF.cpp
vendored
52
extern/audaspace/bindings/python/PyHRTF.cpp
vendored
@@ -54,16 +54,16 @@ HRTF_dealloc(HRTFP* self)
|
|||||||
}
|
}
|
||||||
|
|
||||||
PyDoc_STRVAR(M_aud_HRTF_addImpulseResponse_doc,
|
PyDoc_STRVAR(M_aud_HRTF_addImpulseResponse_doc,
|
||||||
".. classmethod:: addImpulseResponseFromSound(sound, azimuth, elevation)\n\n"
|
"addImpulseResponseFromSound(sound, azimuth, elevation)\n\n"
|
||||||
" Adds a new hrtf to the HRTF object\n\n"
|
"Adds a new hrtf to the HRTF object\n\n"
|
||||||
" :arg sound: The sound that contains the hrtf.\n"
|
":arg sound: The sound that contains the hrtf.\n"
|
||||||
" :type sound: :class:`Sound`\n"
|
":type sound: :class:`Sound`\n"
|
||||||
" :arg azimuth: The azimuth angle of the hrtf.\n"
|
":arg azimuth: The azimuth angle of the hrtf.\n"
|
||||||
" :type azimuth: float\n"
|
":type azimuth: float\n"
|
||||||
" :arg elevation: The elevation angle of the hrtf.\n"
|
":arg elevation: The elevation angle of the hrtf.\n"
|
||||||
" :type elevation: float\n"
|
":type elevation: float\n"
|
||||||
" :return: Whether the action succeeded.\n"
|
":return: Whether the action succeeded.\n"
|
||||||
" :rtype: bool");
|
":rtype: bool");
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
HRTF_addImpulseResponseFromSound(HRTFP* self, PyObject* args)
|
HRTF_addImpulseResponseFromSound(HRTFP* self, PyObject* args)
|
||||||
@@ -90,14 +90,14 @@ HRTF_addImpulseResponseFromSound(HRTFP* self, PyObject* args)
|
|||||||
}
|
}
|
||||||
|
|
||||||
PyDoc_STRVAR(M_aud_HRTF_loadLeftHrtfSet_doc,
|
PyDoc_STRVAR(M_aud_HRTF_loadLeftHrtfSet_doc,
|
||||||
".. classmethod:: loadLeftHrtfSet(extension, directory)\n\n"
|
"loadLeftHrtfSet(extension, directory)\n\n"
|
||||||
" Loads all HRTFs from a directory.\n\n"
|
"Loads all HRTFs from a directory.\n\n"
|
||||||
" :arg extension: The file extension of the hrtfs.\n"
|
":arg extension: The file extension of the hrtfs.\n"
|
||||||
" :type extension: string\n"
|
":type extension: string\n"
|
||||||
" :arg directory: The path to where the HRTF files are located.\n"
|
":arg directory: The path to where the HRTF files are located.\n"
|
||||||
" :type extension: string\n"
|
":type extension: string\n"
|
||||||
" :return: The loaded :class:`HRTF` object.\n"
|
":return: The loaded :class:`HRTF` object.\n"
|
||||||
" :rtype: :class:`HRTF`\n\n");
|
":rtype: :class:`HRTF`\n\n");
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
HRTF_loadLeftHrtfSet(PyTypeObject* type, PyObject* args)
|
HRTF_loadLeftHrtfSet(PyTypeObject* type, PyObject* args)
|
||||||
@@ -125,14 +125,14 @@ HRTF_loadLeftHrtfSet(PyTypeObject* type, PyObject* args)
|
|||||||
}
|
}
|
||||||
|
|
||||||
PyDoc_STRVAR(M_aud_HRTF_loadRightHrtfSet_doc,
|
PyDoc_STRVAR(M_aud_HRTF_loadRightHrtfSet_doc,
|
||||||
".. classmethod:: loadLeftHrtfSet(extension, directory)\n\n"
|
"loadLeftHrtfSet(extension, directory)\n\n"
|
||||||
" Loads all HRTFs from a directory.\n\n"
|
"Loads all HRTFs from a directory.\n\n"
|
||||||
" :arg extension: The file extension of the hrtfs.\n"
|
":arg extension: The file extension of the hrtfs.\n"
|
||||||
" :type extension: string\n"
|
":type extension: string\n"
|
||||||
" :arg directory: The path to where the HRTF files are located.\n"
|
":arg directory: The path to where the HRTF files are located.\n"
|
||||||
" :type extension: string\n"
|
":type extension: string\n"
|
||||||
" :return: The loaded :class:`HRTF` object.\n"
|
":return: The loaded :class:`HRTF` object.\n"
|
||||||
" :rtype: :class:`HRTF`\n\n");
|
":rtype: :class:`HRTF`\n\n");
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
HRTF_loadRightHrtfSet(PyTypeObject* type, PyObject* args)
|
HRTF_loadRightHrtfSet(PyTypeObject* type, PyObject* args)
|
||||||
|
34
extern/audaspace/bindings/python/PyHandle.cpp
vendored
34
extern/audaspace/bindings/python/PyHandle.cpp
vendored
@@ -38,10 +38,10 @@ Handle_dealloc(Handle* self)
|
|||||||
}
|
}
|
||||||
|
|
||||||
PyDoc_STRVAR(M_aud_Handle_pause_doc,
|
PyDoc_STRVAR(M_aud_Handle_pause_doc,
|
||||||
".. classmethod:: pause()\n\n"
|
"pause()\n\n"
|
||||||
" Pauses playback.\n\n"
|
"Pauses playback.\n\n"
|
||||||
" :return: Whether the action succeeded.\n"
|
":return: Whether the action succeeded.\n"
|
||||||
" :rtype: bool");
|
":rtype: bool");
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
Handle_pause(Handle* self)
|
Handle_pause(Handle* self)
|
||||||
@@ -58,10 +58,10 @@ Handle_pause(Handle* self)
|
|||||||
}
|
}
|
||||||
|
|
||||||
PyDoc_STRVAR(M_aud_Handle_resume_doc,
|
PyDoc_STRVAR(M_aud_Handle_resume_doc,
|
||||||
".. classmethod:: resume()\n\n"
|
"resume()\n\n"
|
||||||
" Resumes playback.\n\n"
|
"Resumes playback.\n\n"
|
||||||
" :return: Whether the action succeeded.\n"
|
":return: Whether the action succeeded.\n"
|
||||||
" :rtype: bool");
|
":rtype: bool");
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
Handle_resume(Handle* self)
|
Handle_resume(Handle* self)
|
||||||
@@ -78,11 +78,11 @@ Handle_resume(Handle* self)
|
|||||||
}
|
}
|
||||||
|
|
||||||
PyDoc_STRVAR(M_aud_Handle_stop_doc,
|
PyDoc_STRVAR(M_aud_Handle_stop_doc,
|
||||||
".. classmethod:: stop()\n\n"
|
"stop()\n\n"
|
||||||
" Stops playback.\n\n"
|
"Stops playback.\n\n"
|
||||||
" :return: Whether the action succeeded.\n"
|
":return: Whether the action succeeded.\n"
|
||||||
" :rtype: bool\n\n"
|
":rtype: bool\n\n"
|
||||||
" .. note:: This makes the handle invalid.");
|
".. note:: This makes the handle invalid.");
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
Handle_stop(Handle* self)
|
Handle_stop(Handle* self)
|
||||||
@@ -696,7 +696,7 @@ Handle_get_position(Handle* self, void* nothing)
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
return Py_BuildValue("d", (*reinterpret_cast<std::shared_ptr<IHandle>*>(self->handle))->getPosition());
|
return Py_BuildValue("f", (*reinterpret_cast<std::shared_ptr<IHandle>*>(self->handle))->getPosition());
|
||||||
}
|
}
|
||||||
catch(Exception& e)
|
catch(Exception& e)
|
||||||
{
|
{
|
||||||
@@ -708,9 +708,9 @@ Handle_get_position(Handle* self, void* nothing)
|
|||||||
static int
|
static int
|
||||||
Handle_set_position(Handle* self, PyObject* args, void* nothing)
|
Handle_set_position(Handle* self, PyObject* args, void* nothing)
|
||||||
{
|
{
|
||||||
double position;
|
float position;
|
||||||
|
|
||||||
if(!PyArg_Parse(args, "d:position", &position))
|
if(!PyArg_Parse(args, "f:position", &position))
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
try
|
try
|
||||||
@@ -1122,3 +1122,5 @@ void addHandleToModule(PyObject* module)
|
|||||||
Py_INCREF(&HandleType);
|
Py_INCREF(&HandleType);
|
||||||
PyModule_AddObject(module, "Handle", (PyObject *)&HandleType);
|
PyModule_AddObject(module, "Handle", (PyObject *)&HandleType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -60,15 +60,14 @@ PlaybackManager_dealloc(PlaybackManagerP* self)
|
|||||||
}
|
}
|
||||||
|
|
||||||
PyDoc_STRVAR(M_aud_PlaybackManager_play_doc,
|
PyDoc_STRVAR(M_aud_PlaybackManager_play_doc,
|
||||||
".. classmethod:: setVolume(sound, catKey)\n\n"
|
"setVolume(sound, catKey)\n\n"
|
||||||
" Plays a sound through the playback manager and assigns it to a category.\n\n"
|
"Plays a sound through the playback manager and assigns it to a category.\n\n"
|
||||||
" :arg sound: The sound to play.\n"
|
":arg sound: The sound to play.\n"
|
||||||
" :type sound: :class:`Sound`\n"
|
":type sound: :class:`Sound`\n"
|
||||||
" :arg catKey: the key of the category in which the sound will be added,\n"
|
":arg catKey: the key of the category in which the sound will be added, if it doesn't exist, a new one will be created.\n"
|
||||||
" if it doesn't exist, a new one will be created.\n"
|
":type catKey: int\n"
|
||||||
" :type catKey: int\n"
|
":return: The playback handle with which playback can be controlled with.\n"
|
||||||
" :return: The playback handle with which playback can be controlled with.\n"
|
":rtype: :class:`Handle`");
|
||||||
" :rtype: :class:`Handle`");
|
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
PlaybackManager_play(PlaybackManagerP* self, PyObject* args)
|
PlaybackManager_play(PlaybackManagerP* self, PyObject* args)
|
||||||
@@ -104,12 +103,12 @@ PlaybackManager_play(PlaybackManagerP* self, PyObject* args)
|
|||||||
}
|
}
|
||||||
|
|
||||||
PyDoc_STRVAR(M_aud_PlaybackManager_resume_doc,
|
PyDoc_STRVAR(M_aud_PlaybackManager_resume_doc,
|
||||||
".. classmethod:: resume(catKey)\n\n"
|
"resume(catKey)\n\n"
|
||||||
" Resumes playback of the catgory.\n\n"
|
"Resumes playback of the catgory.\n\n"
|
||||||
" :arg catKey: the key of the category.\n"
|
":arg catKey: the key of the category.\n"
|
||||||
" :type catKey: int\n"
|
":type catKey: int\n"
|
||||||
" :return: Whether the action succeeded.\n"
|
":return: Whether the action succeeded.\n"
|
||||||
" :rtype: bool");
|
":rtype: bool");
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
PlaybackManager_resume(PlaybackManagerP* self, PyObject* args)
|
PlaybackManager_resume(PlaybackManagerP* self, PyObject* args)
|
||||||
@@ -131,12 +130,12 @@ PlaybackManager_resume(PlaybackManagerP* self, PyObject* args)
|
|||||||
}
|
}
|
||||||
|
|
||||||
PyDoc_STRVAR(M_aud_PlaybackManager_pause_doc,
|
PyDoc_STRVAR(M_aud_PlaybackManager_pause_doc,
|
||||||
".. classmethod:: pause(catKey)\n\n"
|
"pause(catKey)\n\n"
|
||||||
" Pauses playback of the category.\n\n"
|
"Pauses playback of the category.\n\n"
|
||||||
" :arg catKey: the key of the category.\n"
|
":arg catKey: the key of the category.\n"
|
||||||
" :type catKey: int\n"
|
":type catKey: int\n"
|
||||||
" :return: Whether the action succeeded.\n"
|
":return: Whether the action succeeded.\n"
|
||||||
" :rtype: bool");
|
":rtype: bool");
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
PlaybackManager_pause(PlaybackManagerP* self, PyObject* args)
|
PlaybackManager_pause(PlaybackManagerP* self, PyObject* args)
|
||||||
@@ -158,12 +157,12 @@ PlaybackManager_pause(PlaybackManagerP* self, PyObject* args)
|
|||||||
}
|
}
|
||||||
|
|
||||||
PyDoc_STRVAR(M_aud_PlaybackManager_add_category_doc,
|
PyDoc_STRVAR(M_aud_PlaybackManager_add_category_doc,
|
||||||
".. classmethod:: addCategory(volume)\n\n"
|
"addCategory(volume)\n\n"
|
||||||
" Adds a category with a custom volume.\n\n"
|
"Adds a category with a custom volume.\n\n"
|
||||||
" :arg volume: The volume for ther new category.\n"
|
":arg volume: The volume for ther new category.\n"
|
||||||
" :type volume: float\n"
|
":type volume: float\n"
|
||||||
" :return: The key of the new category.\n"
|
":return: The key of the new category.\n"
|
||||||
" :rtype: int\n\n");
|
":rtype: int\n\n");
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
PlaybackManager_add_category(PlaybackManagerP* self, PyObject* args)
|
PlaybackManager_add_category(PlaybackManagerP* self, PyObject* args)
|
||||||
@@ -185,12 +184,12 @@ PlaybackManager_add_category(PlaybackManagerP* self, PyObject* args)
|
|||||||
}
|
}
|
||||||
|
|
||||||
PyDoc_STRVAR(M_aud_PlaybackManager_get_volume_doc,
|
PyDoc_STRVAR(M_aud_PlaybackManager_get_volume_doc,
|
||||||
".. classmethod:: getVolume(catKey)\n\n"
|
"getVolume(catKey)\n\n"
|
||||||
" Retrieves the volume of a category.\n\n"
|
"Retrieves the volume of a category.\n\n"
|
||||||
" :arg catKey: the key of the category.\n"
|
":arg catKey: the key of the category.\n"
|
||||||
" :type catKey: int\n"
|
":type catKey: int\n"
|
||||||
" :return: The volume of the cateogry.\n"
|
":return: The volume of the cateogry.\n"
|
||||||
" :rtype: float\n\n");
|
":rtype: float\n\n");
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
PlaybackManager_get_volume(PlaybackManagerP* self, PyObject* args)
|
PlaybackManager_get_volume(PlaybackManagerP* self, PyObject* args)
|
||||||
@@ -212,14 +211,14 @@ PlaybackManager_get_volume(PlaybackManagerP* self, PyObject* args)
|
|||||||
}
|
}
|
||||||
|
|
||||||
PyDoc_STRVAR(M_aud_PlaybackManager_set_volume_doc,
|
PyDoc_STRVAR(M_aud_PlaybackManager_set_volume_doc,
|
||||||
".. classmethod:: setVolume(volume, catKey)\n\n"
|
"setVolume(volume, catKey)\n\n"
|
||||||
" Changes the volume of a category.\n\n"
|
"Changes the volume of a category.\n\n"
|
||||||
" :arg volume: the new volume value.\n"
|
":arg volume: the new volume value.\n"
|
||||||
" :type volume: float\n"
|
":type volume: float\n"
|
||||||
" :arg catKey: the key of the category.\n"
|
":arg catKey: the key of the category.\n"
|
||||||
" :type catKey: int\n"
|
":type catKey: int\n"
|
||||||
" :return: Whether the action succeeded.\n"
|
":return: Whether the action succeeded.\n"
|
||||||
" :rtype: int\n\n");
|
":rtype: int\n\n");
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
PlaybackManager_set_volume(PlaybackManagerP* self, PyObject* args)
|
PlaybackManager_set_volume(PlaybackManagerP* self, PyObject* args)
|
||||||
@@ -242,12 +241,12 @@ PlaybackManager_set_volume(PlaybackManagerP* self, PyObject* args)
|
|||||||
}
|
}
|
||||||
|
|
||||||
PyDoc_STRVAR(M_aud_PlaybackManager_stop_doc,
|
PyDoc_STRVAR(M_aud_PlaybackManager_stop_doc,
|
||||||
".. classmethod:: stop(catKey)\n\n"
|
"stop(catKey)\n\n"
|
||||||
" Stops playback of the category.\n\n"
|
"Stops playback of the category.\n\n"
|
||||||
" :arg catKey: the key of the category.\n"
|
":arg catKey: the key of the category.\n"
|
||||||
" :type catKey: int\n"
|
":type catKey: int\n"
|
||||||
" :return: Whether the action succeeded.\n"
|
":return: Whether the action succeeded.\n"
|
||||||
" :rtype: bool\n\n");
|
":rtype: bool\n\n");
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
PlaybackManager_stop(PlaybackManagerP* self, PyObject* args)
|
PlaybackManager_stop(PlaybackManagerP* self, PyObject* args)
|
||||||
@@ -269,8 +268,8 @@ PlaybackManager_stop(PlaybackManagerP* self, PyObject* args)
|
|||||||
}
|
}
|
||||||
|
|
||||||
PyDoc_STRVAR(M_aud_PlaybackManager_clean_doc,
|
PyDoc_STRVAR(M_aud_PlaybackManager_clean_doc,
|
||||||
".. classmethod:: clean()\n\n"
|
"clean()\n\n"
|
||||||
" Cleans all the invalid and finished sound from the playback manager.\n\n");
|
"Cleans all the invalid and finished sound from the playback manager.\n\n");
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
PlaybackManager_clean(PlaybackManagerP* self)
|
PlaybackManager_clean(PlaybackManagerP* self)
|
||||||
|
62
extern/audaspace/bindings/python/PySequence.cpp
vendored
62
extern/audaspace/bindings/python/PySequence.cpp
vendored
@@ -99,30 +99,30 @@ Sequence_new(PyTypeObject* type, PyObject* args, PyObject* kwds)
|
|||||||
}
|
}
|
||||||
|
|
||||||
PyDoc_STRVAR(M_aud_Sequence_add_doc,
|
PyDoc_STRVAR(M_aud_Sequence_add_doc,
|
||||||
".. classmethod:: add()\n\n"
|
"add()\n\n"
|
||||||
" Adds a new entry to the sequence.\n\n"
|
"Adds a new entry to the sequence.\n\n"
|
||||||
" :arg sound: The sound this entry should play.\n"
|
":arg sound: The sound this entry should play.\n"
|
||||||
" :type sound: :class:`Sound`\n"
|
":type sound: :class:`Sound`\n"
|
||||||
" :arg begin: The start time.\n"
|
":arg begin: The start time.\n"
|
||||||
" :type begin: double\n"
|
":type begin: float\n"
|
||||||
" :arg end: The end time or a negative value if determined by the sound.\n"
|
":arg end: The end time or a negative value if determined by the sound.\n"
|
||||||
" :type end: double\n"
|
":type end: float\n"
|
||||||
" :arg skip: How much seconds should be skipped at the beginning.\n"
|
":arg skip: How much seconds should be skipped at the beginning.\n"
|
||||||
" :type skip: double\n"
|
":type skip: float\n"
|
||||||
" :return: The entry added.\n"
|
":return: The entry added.\n"
|
||||||
" :rtype: :class:`SequenceEntry`");
|
":rtype: :class:`SequenceEntry`");
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
Sequence_add(Sequence* self, PyObject* args, PyObject* kwds)
|
Sequence_add(Sequence* self, PyObject* args, PyObject* kwds)
|
||||||
{
|
{
|
||||||
PyObject* object;
|
PyObject* object;
|
||||||
double begin;
|
float begin;
|
||||||
double end = -1.0;
|
float end = -1.0f;
|
||||||
double skip = 0.0;
|
float skip = 0.0f;
|
||||||
|
|
||||||
static const char* kwlist[] = {"sound", "begin", "end", "skip", nullptr};
|
static const char* kwlist[] = {"sound", "begin", "end", "skip", nullptr};
|
||||||
|
|
||||||
if(!PyArg_ParseTupleAndKeywords(args, kwds, "Od|dd:add", const_cast<char**>(kwlist), &object, &begin, &end, &skip))
|
if(!PyArg_ParseTupleAndKeywords(args, kwds, "Of|ff:add", const_cast<char**>(kwlist), &object, &begin, &end, &skip))
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
Sound* sound = checkSound(object);
|
Sound* sound = checkSound(object);
|
||||||
@@ -151,10 +151,10 @@ Sequence_add(Sequence* self, PyObject* args, PyObject* kwds)
|
|||||||
}
|
}
|
||||||
|
|
||||||
PyDoc_STRVAR(M_aud_Sequence_remove_doc,
|
PyDoc_STRVAR(M_aud_Sequence_remove_doc,
|
||||||
".. classmethod:: remove()\n\n"
|
"remove()\n\n"
|
||||||
" Removes an entry from the sequence.\n\n"
|
"Removes an entry from the sequence.\n\n"
|
||||||
" :arg entry: The entry to remove.\n"
|
":arg entry: The entry to remove.\n"
|
||||||
" :type entry: :class:`SequenceEntry`\n");
|
":type entry: :class:`SequenceEntry`\n");
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
Sequence_remove(Sequence* self, PyObject* args)
|
Sequence_remove(Sequence* self, PyObject* args)
|
||||||
@@ -183,16 +183,16 @@ Sequence_remove(Sequence* self, PyObject* args)
|
|||||||
}
|
}
|
||||||
|
|
||||||
PyDoc_STRVAR(M_aud_Sequence_setAnimationData_doc,
|
PyDoc_STRVAR(M_aud_Sequence_setAnimationData_doc,
|
||||||
".. classmethod:: setAnimationData()\n\n"
|
"setAnimationData()\n\n"
|
||||||
" Writes animation data to a sequence.\n\n"
|
"Writes animation data to a sequence.\n\n"
|
||||||
" :arg type: The type of animation data.\n"
|
":arg type: The type of animation data.\n"
|
||||||
" :type type: int\n"
|
":type type: int\n"
|
||||||
" :arg frame: The frame this data is for.\n"
|
":arg frame: The frame this data is for.\n"
|
||||||
" :type frame: int\n"
|
":type frame: int\n"
|
||||||
" :arg data: The data to write.\n"
|
":arg data: The data to write.\n"
|
||||||
" :type data: sequence of float\n"
|
":type data: sequence of float\n"
|
||||||
" :arg animated: Whether the attribute is animated.\n"
|
":arg animated: Whether the attribute is animated.\n"
|
||||||
" :type animated: bool");
|
":type animated: bool");
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
Sequence_setAnimationData(Sequence* self, PyObject* args)
|
Sequence_setAnimationData(Sequence* self, PyObject* args)
|
||||||
@@ -325,7 +325,7 @@ Sequence_set_channels(Sequence* self, PyObject* args, void* nothing)
|
|||||||
|
|
||||||
PyDoc_STRVAR(M_aud_Sequence_distance_model_doc,
|
PyDoc_STRVAR(M_aud_Sequence_distance_model_doc,
|
||||||
"The distance model of the sequence.\n\n"
|
"The distance model of the sequence.\n\n"
|
||||||
".. seealso:: `OpenAL Documentation <https://www.openal.org/documentation/>`__");
|
".. seealso:: http://connect.creativelabs.com/openal/Documentation/OpenAL%201.1%20Specification.htm#_Toc199835864");
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
Sequence_get_distance_model(Sequence* self, void* nothing)
|
Sequence_get_distance_model(Sequence* self, void* nothing)
|
||||||
|
@@ -43,21 +43,21 @@ SequenceEntry_dealloc(SequenceEntry* self)
|
|||||||
}
|
}
|
||||||
|
|
||||||
PyDoc_STRVAR(M_aud_SequenceEntry_move_doc,
|
PyDoc_STRVAR(M_aud_SequenceEntry_move_doc,
|
||||||
".. classmethod:: move()\n\n"
|
"move()\n\n"
|
||||||
" Moves the entry.\n\n"
|
"Moves the entry.\n\n"
|
||||||
" :arg begin: The new start time.\n"
|
":arg begin: The new start time.\n"
|
||||||
" :type begin: double\n"
|
":type begin: float\n"
|
||||||
" :arg end: The new end time or a negative value if unknown.\n"
|
":arg end: The new end time or a negative value if unknown.\n"
|
||||||
" :type end: double\n"
|
":type end: float\n"
|
||||||
" :arg skip: How many seconds to skip at the beginning.\n"
|
":arg skip: How many seconds to skip at the beginning.\n"
|
||||||
" :type skip: double\n");
|
":type skip: float\n");
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
SequenceEntry_move(SequenceEntry* self, PyObject* args)
|
SequenceEntry_move(SequenceEntry* self, PyObject* args)
|
||||||
{
|
{
|
||||||
double begin, end, skip;
|
float begin, end, skip;
|
||||||
|
|
||||||
if(!PyArg_ParseTuple(args, "ddd:move", &begin, &end, &skip))
|
if(!PyArg_ParseTuple(args, "fff:move", &begin, &end, &skip))
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
try
|
try
|
||||||
@@ -73,16 +73,16 @@ SequenceEntry_move(SequenceEntry* self, PyObject* args)
|
|||||||
}
|
}
|
||||||
|
|
||||||
PyDoc_STRVAR(M_aud_SequenceEntry_setAnimationData_doc,
|
PyDoc_STRVAR(M_aud_SequenceEntry_setAnimationData_doc,
|
||||||
".. classmethod:: setAnimationData()\n\n"
|
"setAnimationData()\n\n"
|
||||||
" Writes animation data to a sequenced entry.\n\n"
|
"Writes animation data to a sequenced entry.\n\n"
|
||||||
" :arg type: The type of animation data.\n"
|
":arg type: The type of animation data.\n"
|
||||||
" :type type: int\n"
|
":type type: int\n"
|
||||||
" :arg frame: The frame this data is for.\n"
|
":arg frame: The frame this data is for.\n"
|
||||||
" :type frame: int\n"
|
":type frame: int\n"
|
||||||
" :arg data: The data to write.\n"
|
":arg data: The data to write.\n"
|
||||||
" :type data: sequence of float\n"
|
":type data: sequence of float\n"
|
||||||
" :arg animated: Whether the attribute is animated.\n"
|
":arg animated: Whether the attribute is animated.\n"
|
||||||
" :type animated: bool");
|
":type animated: bool");
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
SequenceEntry_setAnimationData(SequenceEntry* self, PyObject* args)
|
SequenceEntry_setAnimationData(SequenceEntry* self, PyObject* args)
|
||||||
|
658
extern/audaspace/bindings/python/PySound.cpp
vendored
658
extern/audaspace/bindings/python/PySound.cpp
vendored
@@ -114,11 +114,11 @@ Sound_new(PyTypeObject* type, PyObject* args, PyObject* kwds)
|
|||||||
}
|
}
|
||||||
|
|
||||||
PyDoc_STRVAR(M_aud_Sound_data_doc,
|
PyDoc_STRVAR(M_aud_Sound_data_doc,
|
||||||
".. classmethod:: data()\n\n"
|
"data()\n\n"
|
||||||
" Retrieves the data of the sound as numpy array.\n\n"
|
"Retrieves the data of the sound as numpy array.\n\n"
|
||||||
" :return: A two dimensional numpy float array.\n"
|
":return: A two dimensional numpy float array.\n"
|
||||||
" :rtype: :class:`numpy.ndarray`\n\n"
|
":rtype: :class:`numpy.ndarray`\n\n"
|
||||||
" .. note:: Best efficiency with cached sounds.");
|
".. note:: Best efficiency with cached sounds.");
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
Sound_data(Sound* self)
|
Sound_data(Sound* self)
|
||||||
@@ -145,24 +145,24 @@ Sound_data(Sound* self)
|
|||||||
}
|
}
|
||||||
|
|
||||||
PyDoc_STRVAR(M_aud_Sound_write_doc,
|
PyDoc_STRVAR(M_aud_Sound_write_doc,
|
||||||
".. classmethod:: write(filename, rate, channels, format, container, codec, bitrate, buffersize)\n\n"
|
"write(filename, rate, channels, format, container, codec, bitrate, buffersize)\n\n"
|
||||||
" Writes the sound to a file.\n\n"
|
"Writes the sound to a file.\n\n"
|
||||||
" :arg filename: The path to write to.\n"
|
":arg filename: The path to write to.\n"
|
||||||
" :type filename: string\n"
|
":type filename: string\n"
|
||||||
" :arg rate: The sample rate to write with.\n"
|
":arg rate: The sample rate to write with.\n"
|
||||||
" :type rate: int\n"
|
":type rate: int\n"
|
||||||
" :arg channels: The number of channels to write with.\n"
|
":arg channels: The number of channels to write with.\n"
|
||||||
" :type channels: int\n"
|
":type channels: int\n"
|
||||||
" :arg format: The sample format to write with.\n"
|
":arg format: The sample format to write with.\n"
|
||||||
" :type format: int\n"
|
":type format: int\n"
|
||||||
" :arg container: The container format for the file.\n"
|
":arg container: The container format for the file.\n"
|
||||||
" :type container: int\n"
|
":type container: int\n"
|
||||||
" :arg codec: The codec to use in the file.\n"
|
":arg codec: The codec to use in the file.\n"
|
||||||
" :type codec: int\n"
|
":type codec: int\n"
|
||||||
" :arg bitrate: The bitrate to write with.\n"
|
":arg bitrate: The bitrate to write with.\n"
|
||||||
" :type bitrate: int\n"
|
":type bitrate: int\n"
|
||||||
" :arg buffersize: The size of the writing buffer.\n"
|
":arg buffersize: The size of the writing buffer.\n"
|
||||||
" :type buffersize: int");
|
":type buffersize: int\n");
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
Sound_write(Sound* self, PyObject* args, PyObject* kwds)
|
Sound_write(Sound* self, PyObject* args, PyObject* kwds)
|
||||||
@@ -286,14 +286,14 @@ Sound_write(Sound* self, PyObject* args, PyObject* kwds)
|
|||||||
}
|
}
|
||||||
|
|
||||||
PyDoc_STRVAR(M_aud_Sound_buffer_doc,
|
PyDoc_STRVAR(M_aud_Sound_buffer_doc,
|
||||||
".. classmethod:: buffer(data, rate)\n\n"
|
"buffer(data, rate)\n\n"
|
||||||
" Creates a sound from a data buffer.\n\n"
|
"Creates a sound from a data buffer.\n\n"
|
||||||
" :arg data: The data as two dimensional numpy array.\n"
|
":arg data: The data as two dimensional numpy array.\n"
|
||||||
" :type data: numpy.ndarray\n"
|
":type data: numpy.ndarray\n"
|
||||||
" :arg rate: The sample rate.\n"
|
":arg rate: The sample rate.\n"
|
||||||
" :type rate: double\n"
|
":type rate: double\n"
|
||||||
" :return: The created :class:`Sound` object.\n"
|
":return: The created :class:`Sound` object.\n"
|
||||||
" :rtype: :class:`Sound`");
|
":rtype: :class:`Sound`");
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
Sound_buffer(PyTypeObject* type, PyObject* args)
|
Sound_buffer(PyTypeObject* type, PyObject* args)
|
||||||
@@ -356,17 +356,16 @@ Sound_buffer(PyTypeObject* type, PyObject* args)
|
|||||||
}
|
}
|
||||||
|
|
||||||
PyDoc_STRVAR(M_aud_Sound_cache_doc,
|
PyDoc_STRVAR(M_aud_Sound_cache_doc,
|
||||||
".. classmethod:: cache()\n\n"
|
"cache()\n\n"
|
||||||
" Caches a sound into RAM.\n\n"
|
"Caches a sound into RAM.\n"
|
||||||
" This saves CPU usage needed for decoding and file access if the\n"
|
"This saves CPU usage needed for decoding and file access if the "
|
||||||
" underlying sound reads from a file on the harddisk,\n"
|
"underlying sound reads from a file on the harddisk, but it "
|
||||||
" but it consumes a lot of memory.\n\n"
|
"consumes a lot of memory.\n\n"
|
||||||
" :return: The created :class:`Sound` object.\n"
|
":return: The created :class:`Sound` object.\n"
|
||||||
" :rtype: :class:`Sound`\n\n"
|
":rtype: :class:`Sound`\n\n"
|
||||||
" .. note:: Only known-length factories can be buffered.\n\n"
|
".. note:: Only known-length factories can be buffered.\n\n"
|
||||||
" .. warning::\n\n"
|
".. warning:: Raw PCM data needs a lot of space, only buffer "
|
||||||
" Raw PCM data needs a lot of space, only buffer\n"
|
"short factories.");
|
||||||
" short factories.");
|
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
Sound_cache(Sound* self)
|
Sound_cache(Sound* self)
|
||||||
@@ -392,16 +391,15 @@ Sound_cache(Sound* self)
|
|||||||
}
|
}
|
||||||
|
|
||||||
PyDoc_STRVAR(M_aud_Sound_file_doc,
|
PyDoc_STRVAR(M_aud_Sound_file_doc,
|
||||||
".. classmethod:: file(filename)\n\n"
|
"file(filename)\n\n"
|
||||||
" Creates a sound object of a sound file.\n\n"
|
"Creates a sound object of a sound file.\n\n"
|
||||||
" :arg filename: Path of the file.\n"
|
":arg filename: Path of the file.\n"
|
||||||
" :type filename: string\n"
|
":type filename: string\n"
|
||||||
" :return: The created :class:`Sound` object.\n"
|
":return: The created :class:`Sound` object.\n"
|
||||||
" :rtype: :class:`Sound`\n\n"
|
":rtype: :class:`Sound`\n\n"
|
||||||
" .. warning::\n\n"
|
".. warning:: If the file doesn't exist or can't be read you will "
|
||||||
" If the file doesn't exist or can't be read you will\n"
|
"not get an exception immediately, but when you try to start "
|
||||||
" not get an exception immediately, but when you try to start\n"
|
"playback of that sound.");
|
||||||
" playback of that sound.\n");
|
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
Sound_file(PyTypeObject* type, PyObject* args)
|
Sound_file(PyTypeObject* type, PyObject* args)
|
||||||
@@ -432,15 +430,15 @@ Sound_file(PyTypeObject* type, PyObject* args)
|
|||||||
}
|
}
|
||||||
|
|
||||||
PyDoc_STRVAR(M_aud_Sound_sawtooth_doc,
|
PyDoc_STRVAR(M_aud_Sound_sawtooth_doc,
|
||||||
".. classmethod:: sawtooth(frequency, rate=48000)\n\n"
|
"sawtooth(frequency, rate=48000)\n\n"
|
||||||
" Creates a sawtooth sound which plays a sawtooth wave.\n\n"
|
"Creates a sawtooth sound which plays a sawtooth wave.\n\n"
|
||||||
" :arg frequency: The frequency of the sawtooth wave in Hz.\n"
|
":arg frequency: The frequency of the sawtooth wave in Hz.\n"
|
||||||
" :type frequency: float\n"
|
":type frequency: float\n"
|
||||||
" :arg rate: The sampling rate in Hz. It's recommended to set this\n"
|
":arg rate: The sampling rate in Hz. It's recommended to set this "
|
||||||
" value to the playback device's samling rate to avoid resamping.\n"
|
"value to the playback device's samling rate to avoid resamping.\n"
|
||||||
" :type rate: int\n"
|
":type rate: int\n"
|
||||||
" :return: The created :class:`Sound` object.\n"
|
":return: The created :class:`Sound` object.\n"
|
||||||
" :rtype: :class:`Sound`");
|
":rtype: :class:`Sound`");
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
Sound_sawtooth(PyTypeObject* type, PyObject* args)
|
Sound_sawtooth(PyTypeObject* type, PyObject* args)
|
||||||
@@ -472,13 +470,13 @@ Sound_sawtooth(PyTypeObject* type, PyObject* args)
|
|||||||
}
|
}
|
||||||
|
|
||||||
PyDoc_STRVAR(M_aud_Sound_silence_doc,
|
PyDoc_STRVAR(M_aud_Sound_silence_doc,
|
||||||
".. classmethod:: silence(rate=48000)\n\n"
|
"silence(rate=48000)\n\n"
|
||||||
" Creates a silence sound which plays simple silence.\n\n"
|
"Creates a silence sound which plays simple silence.\n\n"
|
||||||
" :arg rate: The sampling rate in Hz. It's recommended to set this\n"
|
":arg rate: The sampling rate in Hz. It's recommended to set this "
|
||||||
" value to the playback device's samling rate to avoid resamping.\n"
|
"value to the playback device's samling rate to avoid resamping.\n"
|
||||||
" :type rate: int\n"
|
":type rate: int\n"
|
||||||
" :return: The created :class:`Sound` object.\n"
|
":return: The created :class:`Sound` object.\n"
|
||||||
" :rtype: :class:`Sound`");
|
":rtype: :class:`Sound`");
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
Sound_silence(PyTypeObject* type, PyObject* args)
|
Sound_silence(PyTypeObject* type, PyObject* args)
|
||||||
@@ -509,15 +507,15 @@ Sound_silence(PyTypeObject* type, PyObject* args)
|
|||||||
}
|
}
|
||||||
|
|
||||||
PyDoc_STRVAR(M_aud_Sound_sine_doc,
|
PyDoc_STRVAR(M_aud_Sound_sine_doc,
|
||||||
".. classmethod:: sine(frequency, rate=48000)\n\n"
|
"sine(frequency, rate=48000)\n\n"
|
||||||
" Creates a sine sound which plays a sine wave.\n\n"
|
"Creates a sine sound which plays a sine wave.\n\n"
|
||||||
" :arg frequency: The frequency of the sine wave in Hz.\n"
|
":arg frequency: The frequency of the sine wave in Hz.\n"
|
||||||
" :type frequency: float\n"
|
":type frequency: float\n"
|
||||||
" :arg rate: The sampling rate in Hz. It's recommended to set this\n"
|
":arg rate: The sampling rate in Hz. It's recommended to set this "
|
||||||
" value to the playback device's samling rate to avoid resamping.\n"
|
"value to the playback device's samling rate to avoid resamping.\n"
|
||||||
" :type rate: int\n"
|
":type rate: int\n"
|
||||||
" :return: The created :class:`Sound` object.\n"
|
":return: The created :class:`Sound` object.\n"
|
||||||
" :rtype: :class:`Sound`");
|
":rtype: :class:`Sound`");
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
Sound_sine(PyTypeObject* type, PyObject* args)
|
Sound_sine(PyTypeObject* type, PyObject* args)
|
||||||
@@ -549,15 +547,15 @@ Sound_sine(PyTypeObject* type, PyObject* args)
|
|||||||
}
|
}
|
||||||
|
|
||||||
PyDoc_STRVAR(M_aud_Sound_square_doc,
|
PyDoc_STRVAR(M_aud_Sound_square_doc,
|
||||||
".. classmethod:: square(frequency, rate=48000)\n\n"
|
"square(frequency, rate=48000)\n\n"
|
||||||
" Creates a square sound which plays a square wave.\n\n"
|
"Creates a square sound which plays a square wave.\n\n"
|
||||||
" :arg frequency: The frequency of the square wave in Hz.\n"
|
":arg frequency: The frequency of the square wave in Hz.\n"
|
||||||
" :type frequency: float\n"
|
":type frequency: float\n"
|
||||||
" :arg rate: The sampling rate in Hz. It's recommended to set this\n"
|
":arg rate: The sampling rate in Hz. It's recommended to set this "
|
||||||
" value to the playback device's samling rate to avoid resamping.\n"
|
"value to the playback device's samling rate to avoid resamping.\n"
|
||||||
" :type rate: int\n"
|
":type rate: int\n"
|
||||||
" :return: The created :class:`Sound` object.\n"
|
":return: The created :class:`Sound` object.\n"
|
||||||
" :rtype: :class:`Sound`");
|
":rtype: :class:`Sound`");
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
Sound_square(PyTypeObject* type, PyObject* args)
|
Sound_square(PyTypeObject* type, PyObject* args)
|
||||||
@@ -589,15 +587,15 @@ Sound_square(PyTypeObject* type, PyObject* args)
|
|||||||
}
|
}
|
||||||
|
|
||||||
PyDoc_STRVAR(M_aud_Sound_triangle_doc,
|
PyDoc_STRVAR(M_aud_Sound_triangle_doc,
|
||||||
".. classmethod:: triangle(frequency, rate=48000)\n\n"
|
"triangle(frequency, rate=48000)\n\n"
|
||||||
" Creates a triangle sound which plays a triangle wave.\n\n"
|
"Creates a triangle sound which plays a triangle wave.\n\n"
|
||||||
" :arg frequency: The frequency of the triangle wave in Hz.\n"
|
":arg frequency: The frequency of the triangle wave in Hz.\n"
|
||||||
" :type frequency: float\n"
|
":type frequency: float\n"
|
||||||
" :arg rate: The sampling rate in Hz. It's recommended to set this\n"
|
":arg rate: The sampling rate in Hz. It's recommended to set this "
|
||||||
" value to the playback device's samling rate to avoid resamping.\n"
|
"value to the playback device's samling rate to avoid resamping.\n"
|
||||||
" :type rate: int\n"
|
":type rate: int\n"
|
||||||
" :return: The created :class:`Sound` object.\n"
|
":return: The created :class:`Sound` object.\n"
|
||||||
" :rtype: :class:`Sound`");
|
":rtype: :class:`Sound`");
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
Sound_triangle(PyTypeObject* type, PyObject* args)
|
Sound_triangle(PyTypeObject* type, PyObject* args)
|
||||||
@@ -629,16 +627,14 @@ Sound_triangle(PyTypeObject* type, PyObject* args)
|
|||||||
}
|
}
|
||||||
|
|
||||||
PyDoc_STRVAR(M_aud_Sound_accumulate_doc,
|
PyDoc_STRVAR(M_aud_Sound_accumulate_doc,
|
||||||
".. classmethod:: accumulate(additive=False)\n\n"
|
"accumulate(additive=False)\n\n"
|
||||||
" Accumulates a sound by summing over positive input\n"
|
"Accumulates a sound by summing over positive input differences thus generating a monotonic sigal. "
|
||||||
" differences thus generating a monotonic sigal.\n"
|
"If additivity is set to true negative input differences get added too, but positive ones with a factor of two. "
|
||||||
" If additivity is set to true negative input differences get added too,\n"
|
"Note that with additivity the signal is not monotonic anymore.\n\n"
|
||||||
" but positive ones with a factor of two.\n\n"
|
":arg additive: Whether the accumulation should be additive or not.\n"
|
||||||
" Note that with additivity the signal is not monotonic anymore.\n\n"
|
":type time: bool\n"
|
||||||
" :arg additive: Whether the accumulation should be additive or not.\n"
|
":return: The created :class:`Sound` object.\n"
|
||||||
" :type time: bool\n"
|
":rtype: :class:`Sound`");
|
||||||
" :return: The created :class:`Sound` object.\n"
|
|
||||||
" :rtype: :class:`Sound`");
|
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
Sound_accumulate(Sound* self, PyObject* args)
|
Sound_accumulate(Sound* self, PyObject* args)
|
||||||
@@ -681,19 +677,19 @@ Sound_accumulate(Sound* self, PyObject* args)
|
|||||||
}
|
}
|
||||||
|
|
||||||
PyDoc_STRVAR(M_aud_Sound_ADSR_doc,
|
PyDoc_STRVAR(M_aud_Sound_ADSR_doc,
|
||||||
".. classmethod:: ADSR(attack, decay, sustain, release)\n\n"
|
"ADSR(attack,decay,sustain,release)\n\n"
|
||||||
" Attack-Decay-Sustain-Release envelopes the volume of a sound.\n"
|
"Attack-Decay-Sustain-Release envelopes the volume of a sound. "
|
||||||
" Note: there is currently no way to trigger the release with this API.\n\n"
|
"Note: there is currently no way to trigger the release with this API.\n\n"
|
||||||
" :arg attack: The attack time in seconds.\n"
|
":arg attack: The attack time in seconds.\n"
|
||||||
" :type attack: float\n"
|
":type attack: float\n"
|
||||||
" :arg decay: The decay time in seconds.\n"
|
":arg decay: The decay time in seconds.\n"
|
||||||
" :type decay: float\n"
|
":type decay: float\n"
|
||||||
" :arg sustain: The sustain level.\n"
|
":arg sustain: The sustain level.\n"
|
||||||
" :type sustain: float\n"
|
":type sustain: float\n"
|
||||||
" :arg release: The release level.\n"
|
":arg release: The release level.\n"
|
||||||
" :type release: float\n"
|
":type release: float\n"
|
||||||
" :return: The created :class:`Sound` object.\n"
|
":return: The created :class:`Sound` object.\n"
|
||||||
" :rtype: :class:`Sound`");
|
":rtype: :class:`Sound`");
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
Sound_ADSR(Sound* self, PyObject* args)
|
Sound_ADSR(Sound* self, PyObject* args)
|
||||||
@@ -724,12 +720,14 @@ Sound_ADSR(Sound* self, PyObject* args)
|
|||||||
}
|
}
|
||||||
|
|
||||||
PyDoc_STRVAR(M_aud_Sound_delay_doc,
|
PyDoc_STRVAR(M_aud_Sound_delay_doc,
|
||||||
".. classmethod:: delay(time)\n\n"
|
"delay(time)\n\n"
|
||||||
" Delays by playing adding silence in front of the other sound's data.\n\n"
|
"Delays by playing adding silence in front of the other sound's "
|
||||||
" :arg time: How many seconds of silence should be added before the sound.\n"
|
"data.\n\n"
|
||||||
" :type time: float\n"
|
":arg time: How many seconds of silence should be added before "
|
||||||
" :return: The created :class:`Sound` object.\n"
|
"the sound.\n"
|
||||||
" :rtype: :class:`Sound`");
|
":type time: float\n"
|
||||||
|
":return: The created :class:`Sound` object.\n"
|
||||||
|
":rtype: :class:`Sound`");
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
Sound_delay(Sound* self, PyObject* args)
|
Sound_delay(Sound* self, PyObject* args)
|
||||||
@@ -760,18 +758,19 @@ Sound_delay(Sound* self, PyObject* args)
|
|||||||
}
|
}
|
||||||
|
|
||||||
PyDoc_STRVAR(M_aud_Sound_envelope_doc,
|
PyDoc_STRVAR(M_aud_Sound_envelope_doc,
|
||||||
".. classmethod:: envelope(attack, release, threshold, arthreshold)\n\n"
|
"envelope(attack, release, threshold, arthreshold)\n\n"
|
||||||
" Delays by playing adding silence in front of the other sound's data.\n\n"
|
"Delays by playing adding silence in front of the other sound's "
|
||||||
" :arg attack: The attack factor.\n"
|
"data.\n\n"
|
||||||
" :type attack: float\n"
|
":arg attack: The attack factor.\n"
|
||||||
" :arg release: The release factor.\n"
|
":type attack: float\n"
|
||||||
" :type release: float\n"
|
":arg release: The release factor.\n"
|
||||||
" :arg threshold: The general threshold value.\n"
|
":type release: float\n"
|
||||||
" :type threshold: float\n"
|
":arg threshold: The general threshold value.\n"
|
||||||
" :arg arthreshold: The attack/release threshold value.\n"
|
":type threshold: float\n"
|
||||||
" :type arthreshold: float\n"
|
":arg arthreshold: The attack/release threshold value.\n"
|
||||||
" :return: The created :class:`Sound` object.\n"
|
":type arthreshold: float\n"
|
||||||
" :rtype: :class:`Sound`");
|
":return: The created :class:`Sound` object.\n"
|
||||||
|
":rtype: :class:`Sound`");
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
Sound_envelope(Sound* self, PyObject* args)
|
Sound_envelope(Sound* self, PyObject* args)
|
||||||
@@ -802,16 +801,16 @@ Sound_envelope(Sound* self, PyObject* args)
|
|||||||
}
|
}
|
||||||
|
|
||||||
PyDoc_STRVAR(M_aud_Sound_fadein_doc,
|
PyDoc_STRVAR(M_aud_Sound_fadein_doc,
|
||||||
".. classmethod:: fadein(start, length)\n\n"
|
"fadein(start, length)\n\n"
|
||||||
" Fades a sound in by raising the volume linearly in the given\n"
|
"Fades a sound in by raising the volume linearly in the given "
|
||||||
" time interval.\n\n"
|
"time interval.\n\n"
|
||||||
" :arg start: Time in seconds when the fading should start.\n"
|
":arg start: Time in seconds when the fading should start.\n"
|
||||||
" :type start: float\n"
|
":type start: float\n"
|
||||||
" :arg length: Time in seconds how long the fading should last.\n"
|
":arg length: Time in seconds how long the fading should last.\n"
|
||||||
" :type length: float\n"
|
":type length: float\n"
|
||||||
" :return: The created :class:`Sound` object.\n"
|
":return: The created :class:`Sound` object.\n"
|
||||||
" :rtype: :class:`Sound`\n\n"
|
":rtype: :class:`Sound`\n\n"
|
||||||
" .. note:: Before the fade starts it plays silence.");
|
".. note:: Before the fade starts it plays silence.");
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
Sound_fadein(Sound* self, PyObject* args)
|
Sound_fadein(Sound* self, PyObject* args)
|
||||||
@@ -842,18 +841,17 @@ Sound_fadein(Sound* self, PyObject* args)
|
|||||||
}
|
}
|
||||||
|
|
||||||
PyDoc_STRVAR(M_aud_Sound_fadeout_doc,
|
PyDoc_STRVAR(M_aud_Sound_fadeout_doc,
|
||||||
".. classmethod:: fadeout(start, length)\n\n"
|
"fadeout(start, length)\n\n"
|
||||||
" Fades a sound in by lowering the volume linearly in the given\n"
|
"Fades a sound in by lowering the volume linearly in the given "
|
||||||
" time interval.\n\n"
|
"time interval.\n\n"
|
||||||
" :arg start: Time in seconds when the fading should start.\n"
|
":arg start: Time in seconds when the fading should start.\n"
|
||||||
" :type start: float\n"
|
":type start: float\n"
|
||||||
" :arg length: Time in seconds how long the fading should last.\n"
|
":arg length: Time in seconds how long the fading should last.\n"
|
||||||
" :type length: float\n"
|
":type length: float\n"
|
||||||
" :return: The created :class:`Sound` object.\n"
|
":return: The created :class:`Sound` object.\n"
|
||||||
" :rtype: :class:`Sound`\n\n"
|
":rtype: :class:`Sound`\n\n"
|
||||||
" .. note::\n\n"
|
".. note:: After the fade this sound plays silence, so that "
|
||||||
" After the fade this sound plays silence, so that\n"
|
"the length of the sound is not altered.");
|
||||||
" the length of the sound is not altered.");
|
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
Sound_fadeout(Sound* self, PyObject* args)
|
Sound_fadeout(Sound* self, PyObject* args)
|
||||||
@@ -884,20 +882,20 @@ Sound_fadeout(Sound* self, PyObject* args)
|
|||||||
}
|
}
|
||||||
|
|
||||||
PyDoc_STRVAR(M_aud_Sound_filter_doc,
|
PyDoc_STRVAR(M_aud_Sound_filter_doc,
|
||||||
".. classmethod:: filter(b, a = (1))\n\n"
|
"filter(b, a = (1))\n\n"
|
||||||
" Filters a sound with the supplied IIR filter coefficients.\n"
|
"Filters a sound with the supplied IIR filter coefficients.\n"
|
||||||
" Without the second parameter you'll get a FIR filter.\n\n"
|
"Without the second parameter you'll get a FIR filter.\n"
|
||||||
" If the first value of the a sequence is 0,\n"
|
"If the first value of the a sequence is 0 it will be set to 1 "
|
||||||
" it will be set to 1 automatically.\n"
|
"automatically.\n"
|
||||||
" If the first value of the a sequence is neither 0 nor 1, all\n"
|
"If the first value of the a sequence is neither 0 nor 1, all "
|
||||||
" filter coefficients will be scaled by this value so that it is 1\n"
|
"filter coefficients will be scaled by this value so that it is 1 "
|
||||||
" in the end, you don't have to scale yourself.\n\n"
|
"in the end, you don't have to scale yourself.\n\n"
|
||||||
" :arg b: The nominator filter coefficients.\n"
|
":arg b: The nominator filter coefficients.\n"
|
||||||
" :type b: sequence of float\n"
|
":type b: sequence of float\n"
|
||||||
" :arg a: The denominator filter coefficients.\n"
|
":arg a: The denominator filter coefficients.\n"
|
||||||
" :type a: sequence of float\n"
|
":type a: sequence of float\n"
|
||||||
" :return: The created :class:`Sound` object.\n"
|
":return: The created :class:`Sound` object.\n"
|
||||||
" :rtype: :class:`Sound`");
|
":rtype: :class:`Sound`");
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
Sound_filter(Sound* self, PyObject* args)
|
Sound_filter(Sound* self, PyObject* args)
|
||||||
@@ -984,15 +982,15 @@ Sound_filter(Sound* self, PyObject* args)
|
|||||||
}
|
}
|
||||||
|
|
||||||
PyDoc_STRVAR(M_aud_Sound_highpass_doc,
|
PyDoc_STRVAR(M_aud_Sound_highpass_doc,
|
||||||
".. classmethod:: highpass(frequency, Q=0.5)\n\n"
|
"highpass(frequency, Q=0.5)\n\n"
|
||||||
" Creates a second order highpass filter based on the transfer\n"
|
"Creates a second order highpass filter based on the transfer "
|
||||||
" function :math:`H(s) = s^2 / (s^2 + s/Q + 1)`\n\n"
|
"function H(s) = s^2 / (s^2 + s/Q + 1)\n\n"
|
||||||
" :arg frequency: The cut off trequency of the highpass.\n"
|
":arg frequency: The cut off trequency of the highpass.\n"
|
||||||
" :type frequency: float\n"
|
":type frequency: float\n"
|
||||||
" :arg Q: Q factor of the lowpass.\n"
|
":arg Q: Q factor of the lowpass.\n"
|
||||||
" :type Q: float\n"
|
":type Q: float\n"
|
||||||
" :return: The created :class:`Sound` object.\n"
|
":return: The created :class:`Sound` object.\n"
|
||||||
" :rtype: :class:`Sound`");
|
":rtype: :class:`Sound`");
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
Sound_highpass(Sound* self, PyObject* args)
|
Sound_highpass(Sound* self, PyObject* args)
|
||||||
@@ -1024,14 +1022,14 @@ Sound_highpass(Sound* self, PyObject* args)
|
|||||||
}
|
}
|
||||||
|
|
||||||
PyDoc_STRVAR(M_aud_Sound_limit_doc,
|
PyDoc_STRVAR(M_aud_Sound_limit_doc,
|
||||||
".. classmethod:: limit(start, end)\n\n"
|
"limit(start, end)\n\n"
|
||||||
" Limits a sound within a specific start and end time.\n\n"
|
"Limits a sound within a specific start and end time.\n\n"
|
||||||
" :arg start: Start time in seconds.\n"
|
":arg start: Start time in seconds.\n"
|
||||||
" :type start: float\n"
|
":type start: float\n"
|
||||||
" :arg end: End time in seconds.\n"
|
":arg end: End time in seconds.\n"
|
||||||
" :type end: float\n"
|
":type end: float\n"
|
||||||
" :return: The created :class:`Sound` object.\n"
|
":return: The created :class:`Sound` object.\n"
|
||||||
" :rtype: :class:`Sound`");
|
":rtype: :class:`Sound`");
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
Sound_limit(Sound* self, PyObject* args)
|
Sound_limit(Sound* self, PyObject* args)
|
||||||
@@ -1062,16 +1060,15 @@ Sound_limit(Sound* self, PyObject* args)
|
|||||||
}
|
}
|
||||||
|
|
||||||
PyDoc_STRVAR(M_aud_Sound_loop_doc,
|
PyDoc_STRVAR(M_aud_Sound_loop_doc,
|
||||||
".. classmethod:: loop(count)\n\n"
|
"loop(count)\n\n"
|
||||||
" Loops a sound.\n\n"
|
"Loops a sound.\n\n"
|
||||||
" :arg count: How often the sound should be looped.\n"
|
":arg count: How often the sound should be looped. "
|
||||||
" Negative values mean endlessly.\n"
|
"Negative values mean endlessly.\n"
|
||||||
" :type count: integer\n"
|
":type count: integer\n"
|
||||||
" :return: The created :class:`Sound` object.\n"
|
":return: The created :class:`Sound` object.\n"
|
||||||
" :rtype: :class:`Sound`\n\n"
|
":rtype: :class:`Sound`\n\n"
|
||||||
" .. note::\n\n"
|
".. note:: This is a filter function, you might consider using "
|
||||||
" This is a filter function, you might consider using\n"
|
":attr:`Handle.loop_count` instead.");
|
||||||
" :attr:`Handle.loop_count` instead.");
|
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
Sound_loop(Sound* self, PyObject* args)
|
Sound_loop(Sound* self, PyObject* args)
|
||||||
@@ -1102,15 +1099,15 @@ Sound_loop(Sound* self, PyObject* args)
|
|||||||
}
|
}
|
||||||
|
|
||||||
PyDoc_STRVAR(M_aud_Sound_lowpass_doc,
|
PyDoc_STRVAR(M_aud_Sound_lowpass_doc,
|
||||||
".. classmethod:: lowpass(frequency, Q=0.5)\n\n"
|
"lowpass(frequency, Q=0.5)\n\n"
|
||||||
" Creates a second order lowpass filter based on the transfer "
|
"Creates a second order lowpass filter based on the transfer "
|
||||||
" function :math:`H(s) = 1 / (s^2 + s/Q + 1)`\n\n"
|
"function H(s) = 1 / (s^2 + s/Q + 1)\n\n"
|
||||||
" :arg frequency: The cut off trequency of the lowpass.\n"
|
":arg frequency: The cut off trequency of the lowpass.\n"
|
||||||
" :type frequency: float\n"
|
":type frequency: float\n"
|
||||||
" :arg Q: Q factor of the lowpass.\n"
|
":arg Q: Q factor of the lowpass.\n"
|
||||||
" :type Q: float\n"
|
":type Q: float\n"
|
||||||
" :return: The created :class:`Sound` object.\n"
|
":return: The created :class:`Sound` object.\n"
|
||||||
" :rtype: :class:`Sound`");
|
":rtype: :class:`Sound`");
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
Sound_lowpass(Sound* self, PyObject* args)
|
Sound_lowpass(Sound* self, PyObject* args)
|
||||||
@@ -1142,15 +1139,14 @@ Sound_lowpass(Sound* self, PyObject* args)
|
|||||||
}
|
}
|
||||||
|
|
||||||
PyDoc_STRVAR(M_aud_Sound_modulate_doc,
|
PyDoc_STRVAR(M_aud_Sound_modulate_doc,
|
||||||
".. classmethod:: modulate(sound)\n\n"
|
"modulate(sound)\n\n"
|
||||||
" Modulates two factories.\n\n"
|
"Modulates two factories.\n\n"
|
||||||
" :arg sound: The sound to modulate over the other.\n"
|
":arg sound: The sound to modulate over the other.\n"
|
||||||
" :type sound: :class:`Sound`\n"
|
":type sound: :class:`Sound`\n"
|
||||||
" :return: The created :class:`Sound` object.\n"
|
":return: The created :class:`Sound` object.\n"
|
||||||
" :rtype: :class:`Sound`\n\n"
|
":rtype: :class:`Sound`\n\n"
|
||||||
" .. note::\n\n"
|
".. note:: The two factories have to have the same specifications "
|
||||||
" The two factories have to have the same specifications\n"
|
"(channels and samplerate).");
|
||||||
" (channels and samplerate).");
|
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
Sound_modulate(Sound* self, PyObject* object)
|
Sound_modulate(Sound* self, PyObject* object)
|
||||||
@@ -1184,19 +1180,17 @@ Sound_modulate(Sound* self, PyObject* object)
|
|||||||
}
|
}
|
||||||
|
|
||||||
PyDoc_STRVAR(M_aud_Sound_pitch_doc,
|
PyDoc_STRVAR(M_aud_Sound_pitch_doc,
|
||||||
".. classmethod:: pitch(factor)\n\n"
|
"pitch(factor)\n\n"
|
||||||
" Changes the pitch of a sound with a specific factor.\n\n"
|
"Changes the pitch of a sound with a specific factor.\n\n"
|
||||||
" :arg factor: The factor to change the pitch with.\n"
|
":arg factor: The factor to change the pitch with.\n"
|
||||||
" :type factor: float\n"
|
":type factor: float\n"
|
||||||
" :return: The created :class:`Sound` object.\n"
|
":return: The created :class:`Sound` object.\n"
|
||||||
" :rtype: :class:`Sound`\n\n"
|
":rtype: :class:`Sound`\n\n"
|
||||||
" .. note::\n\n"
|
".. note:: This is done by changing the sample rate of the "
|
||||||
" This is done by changing the sample rate of the\n"
|
"underlying sound, which has to be an integer, so the factor "
|
||||||
" underlying sound, which has to be an integer, so the factor\n"
|
"value rounded and the factor may not be 100 % accurate.\n\n"
|
||||||
" value rounded and the factor may not be 100 % accurate.\n\n"
|
".. note:: This is a filter function, you might consider using "
|
||||||
" .. note::\n\n"
|
":attr:`Handle.pitch` instead.");
|
||||||
" This is a filter function, you might consider using\n"
|
|
||||||
" :attr:`Handle.pitch` instead.");
|
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
Sound_pitch(Sound* self, PyObject* args)
|
Sound_pitch(Sound* self, PyObject* args)
|
||||||
@@ -1227,12 +1221,12 @@ Sound_pitch(Sound* self, PyObject* args)
|
|||||||
}
|
}
|
||||||
|
|
||||||
PyDoc_STRVAR(M_aud_Sound_rechannel_doc,
|
PyDoc_STRVAR(M_aud_Sound_rechannel_doc,
|
||||||
".. classmethod:: rechannel(channels)\n\n"
|
"rechannel(channels)\n\n"
|
||||||
" Rechannels the sound.\n\n"
|
"Rechannels the sound.\n\n"
|
||||||
" :arg channels: The new channel configuration.\n"
|
":arg channels: The new channel configuration.\n"
|
||||||
" :type channels: int\n"
|
":type channels: int\n"
|
||||||
" :return: The created :class:`Sound` object.\n"
|
":return: The created :class:`Sound` object.\n"
|
||||||
" :rtype: :class:`Sound`");
|
":rtype: :class:`Sound`");
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
Sound_rechannel(Sound* self, PyObject* args)
|
Sound_rechannel(Sound* self, PyObject* args)
|
||||||
@@ -1267,14 +1261,14 @@ Sound_rechannel(Sound* self, PyObject* args)
|
|||||||
}
|
}
|
||||||
|
|
||||||
PyDoc_STRVAR(M_aud_Sound_resample_doc,
|
PyDoc_STRVAR(M_aud_Sound_resample_doc,
|
||||||
".. classmethod:: resample(rate, high_quality)\n\n"
|
"resample(rate, high_quality)\n\n"
|
||||||
" Resamples the sound.\n\n"
|
"Resamples the sound.\n\n"
|
||||||
" :arg rate: The new sample rate.\n"
|
":arg rate: The new sample rate.\n"
|
||||||
" :type rate: double\n"
|
":type rate: double\n"
|
||||||
" :arg high_quality: When true use a higher quality but slower resampler.\n"
|
":arg high_quality: When true use a higher quality but slower resampler.\n"
|
||||||
" :type high_quality: bool\n"
|
":type high_quality: bool\n"
|
||||||
" :return: The created :class:`Sound` object.\n"
|
":return: The created :class:`Sound` object.\n"
|
||||||
" :rtype: :class:`Sound`");
|
":rtype: :class:`Sound`");
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
Sound_resample(Sound* self, PyObject* args)
|
Sound_resample(Sound* self, PyObject* args)
|
||||||
@@ -1322,19 +1316,17 @@ Sound_resample(Sound* self, PyObject* args)
|
|||||||
}
|
}
|
||||||
|
|
||||||
PyDoc_STRVAR(M_aud_Sound_reverse_doc,
|
PyDoc_STRVAR(M_aud_Sound_reverse_doc,
|
||||||
".. classmethod:: reverse()\n\n"
|
"reverse()\n\n"
|
||||||
" Plays a sound reversed.\n\n"
|
"Plays a sound reversed.\n\n"
|
||||||
" :return: The created :class:`Sound` object.\n"
|
":return: The created :class:`Sound` object.\n"
|
||||||
" :rtype: :class:`Sound`\n\n"
|
":rtype: :class:`Sound`\n\n"
|
||||||
" .. note::\n\n"
|
".. note:: The sound has to have a finite length and has to be "
|
||||||
" The sound has to have a finite length and has to be seekable.\n"
|
"seekable. It's recommended to use this only with factories with "
|
||||||
" It's recommended to use this only with factories with\n"
|
"fast and accurate seeking, which is not true for encoded audio "
|
||||||
" fast and accurate seeking, which is not true for encoded audio\n"
|
"files, such ones should be buffered using :meth:`cache` before "
|
||||||
" files, such ones should be buffered using :meth:`cache` before\n"
|
"being played reversed.\n\n"
|
||||||
" being played reversed.\n\n"
|
".. warning:: If seeking is not accurate in the underlying sound "
|
||||||
" .. warning::\n\n"
|
"you'll likely hear skips/jumps/cracks.");
|
||||||
" If seeking is not accurate in the underlying sound\n"
|
|
||||||
" you'll likely hear skips/jumps/cracks.");
|
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
Sound_reverse(Sound* self)
|
Sound_reverse(Sound* self)
|
||||||
@@ -1360,10 +1352,10 @@ Sound_reverse(Sound* self)
|
|||||||
}
|
}
|
||||||
|
|
||||||
PyDoc_STRVAR(M_aud_Sound_sum_doc,
|
PyDoc_STRVAR(M_aud_Sound_sum_doc,
|
||||||
".. classmethod:: sum()\n\n"
|
"sum()\n\n"
|
||||||
" Sums the samples of a sound.\n\n"
|
"Sums the samples of a sound.\n\n"
|
||||||
" :return: The created :class:`Sound` object.\n"
|
":return: The created :class:`Sound` object.\n"
|
||||||
" :rtype: :class:`Sound`");
|
":rtype: :class:`Sound`");
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
Sound_sum(Sound* self)
|
Sound_sum(Sound* self)
|
||||||
@@ -1389,12 +1381,12 @@ Sound_sum(Sound* self)
|
|||||||
}
|
}
|
||||||
|
|
||||||
PyDoc_STRVAR(M_aud_Sound_threshold_doc,
|
PyDoc_STRVAR(M_aud_Sound_threshold_doc,
|
||||||
".. classmethod:: threshold(threshold = 0)\n\n"
|
"threshold(threshold = 0)\n\n"
|
||||||
" Makes a threshold wave out of an audio wave by setting all samples\n"
|
"Makes a threshold wave out of an audio wave by setting all samples "
|
||||||
" with a amplitude >= threshold to 1, all <= -threshold to -1 and\n"
|
"with a amplitude >= threshold to 1, all <= -threshold to -1 and "
|
||||||
" all between to 0.\n\n"
|
"all between to 0.\n\n"
|
||||||
" :arg threshold: Threshold value over which an amplitude counts\n"
|
":arg threshold: Threshold value over which an amplitude counts "
|
||||||
" non-zero.\n\n"
|
"non-zero.\n"
|
||||||
":type threshold: float\n"
|
":type threshold: float\n"
|
||||||
":return: The created :class:`Sound` object.\n"
|
":return: The created :class:`Sound` object.\n"
|
||||||
":rtype: :class:`Sound`");
|
":rtype: :class:`Sound`");
|
||||||
@@ -1428,17 +1420,15 @@ Sound_threshold(Sound* self, PyObject* args)
|
|||||||
}
|
}
|
||||||
|
|
||||||
PyDoc_STRVAR(M_aud_Sound_volume_doc,
|
PyDoc_STRVAR(M_aud_Sound_volume_doc,
|
||||||
".. classmethod:: volume(volume)\n\n"
|
"volume(volume)\n\n"
|
||||||
" Changes the volume of a sound.\n\n"
|
"Changes the volume of a sound.\n\n"
|
||||||
" :arg volume: The new volume..\n"
|
":arg volume: The new volume..\n"
|
||||||
" :type volume: float\n"
|
":type volume: float\n"
|
||||||
" :return: The created :class:`Sound` object.\n"
|
":return: The created :class:`Sound` object.\n"
|
||||||
" :rtype: :class:`Sound`\n\n"
|
":rtype: :class:`Sound`\n\n"
|
||||||
" .. note::\n\n"
|
".. note:: Should be in the range [0, 1] to avoid clipping.\n\n"
|
||||||
" Should be in the range [0, 1] to avoid clipping.\n\n"
|
".. note:: This is a filter function, you might consider using "
|
||||||
" .. note::\n\n"
|
":attr:`Handle.volume` instead.");
|
||||||
" This is a filter function, you might consider using\n"
|
|
||||||
" :attr:`Handle.volume` instead.");
|
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
Sound_volume(Sound* self, PyObject* args)
|
Sound_volume(Sound* self, PyObject* args)
|
||||||
@@ -1469,15 +1459,14 @@ Sound_volume(Sound* self, PyObject* args)
|
|||||||
}
|
}
|
||||||
|
|
||||||
PyDoc_STRVAR(M_aud_Sound_join_doc,
|
PyDoc_STRVAR(M_aud_Sound_join_doc,
|
||||||
".. classmethod:: join(sound)\n\n"
|
"join(sound)\n\n"
|
||||||
" Plays two factories in sequence.\n\n"
|
"Plays two factories in sequence.\n\n"
|
||||||
" :arg sound: The sound to play second.\n"
|
":arg sound: The sound to play second.\n"
|
||||||
" :type sound: :class:`Sound`\n"
|
":type sound: :class:`Sound`\n"
|
||||||
" :return: The created :class:`Sound` object.\n"
|
":return: The created :class:`Sound` object.\n"
|
||||||
" :rtype: :class:`Sound`\n\n"
|
":rtype: :class:`Sound`\n\n"
|
||||||
" .. note::\n\n"
|
".. note:: The two factories have to have the same specifications "
|
||||||
" The two factories have to have the same specifications\n"
|
"(channels and samplerate).");
|
||||||
" (channels and samplerate).");
|
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
Sound_join(Sound* self, PyObject* object)
|
Sound_join(Sound* self, PyObject* object)
|
||||||
@@ -1512,15 +1501,14 @@ Sound_join(Sound* self, PyObject* object)
|
|||||||
}
|
}
|
||||||
|
|
||||||
PyDoc_STRVAR(M_aud_Sound_mix_doc,
|
PyDoc_STRVAR(M_aud_Sound_mix_doc,
|
||||||
".. classmethod:: mix(sound)\n\n"
|
"mix(sound)\n\n"
|
||||||
" Mixes two factories.\n\n"
|
"Mixes two factories.\n\n"
|
||||||
" :arg sound: The sound to mix over the other.\n"
|
":arg sound: The sound to mix over the other.\n"
|
||||||
" :type sound: :class:`Sound`\n"
|
":type sound: :class:`Sound`\n"
|
||||||
" :return: The created :class:`Sound` object.\n"
|
":return: The created :class:`Sound` object.\n"
|
||||||
" :rtype: :class:`Sound`\n\n"
|
":rtype: :class:`Sound`\n\n"
|
||||||
" .. note::\n\n"
|
".. note:: The two factories have to have the same specifications "
|
||||||
" The two factories have to have the same specifications\n"
|
"(channels and samplerate).");
|
||||||
" (channels and samplerate).");
|
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
Sound_mix(Sound* self, PyObject* object)
|
Sound_mix(Sound* self, PyObject* object)
|
||||||
@@ -1554,11 +1542,11 @@ Sound_mix(Sound* self, PyObject* object)
|
|||||||
}
|
}
|
||||||
|
|
||||||
PyDoc_STRVAR(M_aud_Sound_pingpong_doc,
|
PyDoc_STRVAR(M_aud_Sound_pingpong_doc,
|
||||||
".. classmethod:: pingpong()\n\n"
|
"pingpong()\n\n"
|
||||||
" Plays a sound forward and then backward.\n"
|
"Plays a sound forward and then backward.\n"
|
||||||
" This is like joining a sound with its reverse.\n\n"
|
"This is like joining a sound with its reverse.\n\n"
|
||||||
" :return: The created :class:`Sound` object.\n"
|
":return: The created :class:`Sound` object.\n"
|
||||||
" :rtype: :class:`Sound`");
|
":rtype: :class:`Sound`");
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
Sound_pingpong(Sound* self)
|
Sound_pingpong(Sound* self)
|
||||||
@@ -1584,12 +1572,12 @@ Sound_pingpong(Sound* self)
|
|||||||
}
|
}
|
||||||
|
|
||||||
PyDoc_STRVAR(M_aud_Sound_list_doc,
|
PyDoc_STRVAR(M_aud_Sound_list_doc,
|
||||||
".. classmethod:: list()\n\n"
|
"list()\n\n"
|
||||||
" Creates an empty sound list that can contain several sounds.\n\n"
|
"Creates an empty sound list that can contain several sounds.\n\n"
|
||||||
" :arg random: whether the playback will be random or not.\n"
|
":arg random: wether the playback will be random or not.\n"
|
||||||
" :type random: int\n"
|
":type random: int\n"
|
||||||
" :return: The created :class:`Sound` object.\n"
|
":return: The created :class:`Sound` object.\n"
|
||||||
" :rtype: :class:`Sound`");
|
":rtype: :class:`Sound`");
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
Sound_list(PyTypeObject* type, PyObject* args)
|
Sound_list(PyTypeObject* type, PyObject* args)
|
||||||
@@ -1620,11 +1608,11 @@ Sound_list(PyTypeObject* type, PyObject* args)
|
|||||||
}
|
}
|
||||||
|
|
||||||
PyDoc_STRVAR(M_aud_Sound_mutable_doc,
|
PyDoc_STRVAR(M_aud_Sound_mutable_doc,
|
||||||
".. classmethod:: mutable()\n\n"
|
"mutable()\n\n"
|
||||||
" Creates a sound that will be restarted when sought backwards.\n"
|
"Creates a sound that will be restarted when sought backwards.\n"
|
||||||
" If the original sound is a sound list, the playing sound can change.\n\n"
|
"If the original sound is a sound list, the playing sound can change.\n\n"
|
||||||
" :return: The created :class:`Sound` object.\n"
|
":return: The created :class:`Sound` object.\n"
|
||||||
" :rtype: :class:`Sound`");
|
":rtype: :class:`Sound`");
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
Sound_mutable(Sound* self)
|
Sound_mutable(Sound* self)
|
||||||
@@ -1650,11 +1638,11 @@ Sound_mutable(Sound* self)
|
|||||||
}
|
}
|
||||||
|
|
||||||
PyDoc_STRVAR(M_aud_Sound_list_addSound_doc,
|
PyDoc_STRVAR(M_aud_Sound_list_addSound_doc,
|
||||||
".. classmethod:: addSound(sound)\n\n"
|
"addSound(sound)\n\n"
|
||||||
" Adds a new sound to a sound list.\n\n"
|
"Adds a new sound to a sound list.\n\n"
|
||||||
" :arg sound: The sound that will be added to the list.\n"
|
":arg sound: The sound that will be added to the list.\n"
|
||||||
" :type sound: :class:`Sound`\n\n"
|
":type sound: :class:`Sound`\n\n"
|
||||||
" .. note:: You can only add a sound to a sound list.");
|
".. note:: You can only add a sound to a sound list.");
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
Sound_list_addSound(Sound* self, PyObject* object)
|
Sound_list_addSound(Sound* self, PyObject* object)
|
||||||
@@ -1683,14 +1671,14 @@ Sound_list_addSound(Sound* self, PyObject* object)
|
|||||||
#ifdef WITH_CONVOLUTION
|
#ifdef WITH_CONVOLUTION
|
||||||
|
|
||||||
PyDoc_STRVAR(M_aud_Sound_convolver_doc,
|
PyDoc_STRVAR(M_aud_Sound_convolver_doc,
|
||||||
".. classmethod:: convolver()\n\n"
|
"convolver()\n\n"
|
||||||
" Creates a sound that will apply convolution to another sound.\n\n"
|
"Creates a sound that will apply convolution to another sound.\n\n"
|
||||||
" :arg impulseResponse: The filter with which convolve the sound.\n"
|
":arg impulseResponse: The filter with which convolve the sound.\n"
|
||||||
" :type impulseResponse: :class:`ImpulseResponse`\n"
|
":type impulseResponse: :class:`ImpulseResponse`\n"
|
||||||
" :arg threadPool: A thread pool used to parallelize convolution.\n"
|
":arg threadPool: A thread pool used to parallelize convolution.\n"
|
||||||
" :type threadPool: :class:`ThreadPool`\n"
|
":type threadPool: :class:`ThreadPool`\n"
|
||||||
" :return: The created :class:`Sound` object.\n"
|
":return: The created :class:`Sound` object.\n"
|
||||||
" :rtype: :class:`Sound`");
|
":rtype: :class:`Sound`");
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
Sound_convolver(Sound* self, PyObject* args)
|
Sound_convolver(Sound* self, PyObject* args)
|
||||||
@@ -1732,16 +1720,16 @@ Sound_convolver(Sound* self, PyObject* args)
|
|||||||
}
|
}
|
||||||
|
|
||||||
PyDoc_STRVAR(M_aud_Sound_binaural_doc,
|
PyDoc_STRVAR(M_aud_Sound_binaural_doc,
|
||||||
".. classmethod:: convolver()\n\n"
|
"convolver()\n\n"
|
||||||
" Creates a binaural sound using another sound as source. The original sound must be mono\n\n"
|
"Creates a binaural sound using another sound as source. The original sound must be mono\n\n"
|
||||||
" :arg hrtfs: An HRTF set.\n"
|
":arg hrtfs: An HRTF set.\n"
|
||||||
" :type hrtf: :class:`HRTF`\n"
|
":type hrtf: :class:`HRTF`\n"
|
||||||
" :arg source: An object representing the source position of the sound.\n"
|
":arg source: An object representing the source position of the sound.\n"
|
||||||
" :type source: :class:`Source`\n"
|
":type source: :class:`Source`\n"
|
||||||
" :arg threadPool: A thread pool used to parallelize convolution.\n"
|
":arg threadPool: A thread pool used to parallelize convolution.\n"
|
||||||
" :type threadPool: :class:`ThreadPool`\n"
|
":type threadPool: :class:`ThreadPool`\n"
|
||||||
" :return: The created :class:`Sound` object.\n"
|
":return: The created :class:`Sound` object.\n"
|
||||||
" :rtype: :class:`Sound`");
|
":rtype: :class:`Sound`");
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
Sound_binaural(Sound* self, PyObject* args)
|
Sound_binaural(Sound* self, PyObject* args)
|
||||||
|
@@ -33,8 +33,8 @@ AUD_NAMESPACE_BEGIN
|
|||||||
class AUD_API DefaultSynchronizer : public ISynchronizer
|
class AUD_API DefaultSynchronizer : public ISynchronizer
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual void seek(std::shared_ptr<IHandle> handle, double time);
|
virtual void seek(std::shared_ptr<IHandle> handle, float time);
|
||||||
virtual double getPosition(std::shared_ptr<IHandle> handle);
|
virtual float getPosition(std::shared_ptr<IHandle> handle);
|
||||||
virtual void play();
|
virtual void play();
|
||||||
virtual void stop();
|
virtual void stop();
|
||||||
virtual void setSyncCallback(syncFunction function, void* data);
|
virtual void setSyncCallback(syncFunction function, void* data);
|
||||||
|
@@ -35,9 +35,6 @@ AUD_NAMESPACE_BEGIN
|
|||||||
class AUD_API IDeviceFactory
|
class AUD_API IDeviceFactory
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/**
|
|
||||||
* Destroys the device factory.
|
|
||||||
*/
|
|
||||||
virtual ~IDeviceFactory() {}
|
virtual ~IDeviceFactory() {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
4
extern/audaspace/include/devices/IHandle.h
vendored
4
extern/audaspace/include/devices/IHandle.h
vendored
@@ -105,14 +105,14 @@ public:
|
|||||||
* - false if the handle is invalid.
|
* - false if the handle is invalid.
|
||||||
* \warning Whether the seek works or not depends on the sound source.
|
* \warning Whether the seek works or not depends on the sound source.
|
||||||
*/
|
*/
|
||||||
virtual bool seek(double position)=0;
|
virtual bool seek(float position)=0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the current playback position of a sound.
|
* Retrieves the current playback position of a sound.
|
||||||
* \return The playback position in seconds, or 0.0 if the handle is
|
* \return The playback position in seconds, or 0.0 if the handle is
|
||||||
* invalid.
|
* invalid.
|
||||||
*/
|
*/
|
||||||
virtual double getPosition()=0;
|
virtual float getPosition()=0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the status of a played back sound.
|
* Returns the status of a played back sound.
|
||||||
|
@@ -56,14 +56,14 @@ public:
|
|||||||
* @param handle The handle that should be synchronized/seeked.
|
* @param handle The handle that should be synchronized/seeked.
|
||||||
* @param time The absolute time to synchronize to.
|
* @param time The absolute time to synchronize to.
|
||||||
*/
|
*/
|
||||||
virtual void seek(std::shared_ptr<IHandle> handle, double time) = 0;
|
virtual void seek(std::shared_ptr<IHandle> handle, float time) = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the position of the synchronizer.
|
* Retrieves the position of the synchronizer.
|
||||||
* @param handle The handle which is synchronized.
|
* @param handle The handle which is synchronized.
|
||||||
* @return The position in seconds.
|
* @return The position in seconds.
|
||||||
*/
|
*/
|
||||||
virtual double getPosition(std::shared_ptr<IHandle> handle) = 0;
|
virtual float getPosition(std::shared_ptr<IHandle> handle) = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Starts the synchronizer playback.
|
* Starts the synchronizer playback.
|
||||||
|
@@ -53,8 +53,8 @@ private:
|
|||||||
virtual bool stop();
|
virtual bool stop();
|
||||||
virtual bool getKeep();
|
virtual bool getKeep();
|
||||||
virtual bool setKeep(bool keep);
|
virtual bool setKeep(bool keep);
|
||||||
virtual bool seek(double position);
|
virtual bool seek(float position);
|
||||||
virtual double getPosition();
|
virtual float getPosition();
|
||||||
virtual Status getStatus();
|
virtual Status getStatus();
|
||||||
virtual float getVolume();
|
virtual float getVolume();
|
||||||
virtual bool setVolume(float volume);
|
virtual bool setVolume(float volume);
|
||||||
|
@@ -180,8 +180,8 @@ protected:
|
|||||||
virtual bool stop();
|
virtual bool stop();
|
||||||
virtual bool getKeep();
|
virtual bool getKeep();
|
||||||
virtual bool setKeep(bool keep);
|
virtual bool setKeep(bool keep);
|
||||||
virtual bool seek(double position);
|
virtual bool seek(float position);
|
||||||
virtual double getPosition();
|
virtual float getPosition();
|
||||||
virtual Status getStatus();
|
virtual Status getStatus();
|
||||||
virtual float getVolume();
|
virtual float getVolume();
|
||||||
virtual bool setVolume(float volume);
|
virtual bool setVolume(float volume);
|
||||||
|
5
extern/audaspace/include/file/IFileInput.h
vendored
5
extern/audaspace/include/file/IFileInput.h
vendored
@@ -40,10 +40,7 @@ class Buffer;
|
|||||||
class AUD_API IFileInput
|
class AUD_API IFileInput
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/**
|
virtual ~IFileInput() {};
|
||||||
* Destroys the file input.
|
|
||||||
*/
|
|
||||||
virtual ~IFileInput() {}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a reader for a file to be read.
|
* Creates a reader for a file to be read.
|
||||||
|
6
extern/audaspace/include/fx/Delay.h
vendored
6
extern/audaspace/include/fx/Delay.h
vendored
@@ -35,7 +35,7 @@ private:
|
|||||||
/**
|
/**
|
||||||
* The delay in samples.
|
* The delay in samples.
|
||||||
*/
|
*/
|
||||||
const double m_delay;
|
const float m_delay;
|
||||||
|
|
||||||
// delete copy constructor and operator=
|
// delete copy constructor and operator=
|
||||||
Delay(const Delay&) = delete;
|
Delay(const Delay&) = delete;
|
||||||
@@ -47,12 +47,12 @@ public:
|
|||||||
* \param sound The input sound.
|
* \param sound The input sound.
|
||||||
* \param delay The desired delay in seconds.
|
* \param delay The desired delay in seconds.
|
||||||
*/
|
*/
|
||||||
Delay(std::shared_ptr<ISound> sound, double delay = 0);
|
Delay(std::shared_ptr<ISound> sound, float delay = 0);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the delay in seconds.
|
* Returns the delay in seconds.
|
||||||
*/
|
*/
|
||||||
double getDelay() const;
|
float getDelay() const;
|
||||||
|
|
||||||
virtual std::shared_ptr<IReader> createReader();
|
virtual std::shared_ptr<IReader> createReader();
|
||||||
};
|
};
|
||||||
|
2
extern/audaspace/include/fx/DelayReader.h
vendored
2
extern/audaspace/include/fx/DelayReader.h
vendored
@@ -52,7 +52,7 @@ public:
|
|||||||
* \param reader The reader to read from.
|
* \param reader The reader to read from.
|
||||||
* \param delay The delay in seconds.
|
* \param delay The delay in seconds.
|
||||||
*/
|
*/
|
||||||
DelayReader(std::shared_ptr<IReader> reader, double delay);
|
DelayReader(std::shared_ptr<IReader> reader, float delay);
|
||||||
|
|
||||||
virtual void seek(int position);
|
virtual void seek(int position);
|
||||||
virtual int getLength() const;
|
virtual int getLength() const;
|
||||||
|
10
extern/audaspace/include/fx/DynamicMusic.h
vendored
10
extern/audaspace/include/fx/DynamicMusic.h
vendored
@@ -55,7 +55,7 @@ private:
|
|||||||
/**
|
/**
|
||||||
* Length of the crossfade transition in seconds, used when no custom transition has been set.
|
* Length of the crossfade transition in seconds, used when no custom transition has been set.
|
||||||
*/
|
*/
|
||||||
double m_fadeTime;
|
float m_fadeTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handle to the playback of the current scene.
|
* Handle to the playback of the current scene.
|
||||||
@@ -145,13 +145,13 @@ public:
|
|||||||
* Sets the length of the crossfade transition (default 1 second).
|
* Sets the length of the crossfade transition (default 1 second).
|
||||||
* \param seconds The time in seconds.
|
* \param seconds The time in seconds.
|
||||||
*/
|
*/
|
||||||
void setFadeTime(double seconds);
|
void setFadeTime(float seconds);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the length of the crossfade transition (default 1 second).
|
* Gets the length of the crossfade transition (default 1 second).
|
||||||
* \return The length of the cressfade transition in seconds.
|
* \return The length of the cressfade transition in seconds.
|
||||||
*/
|
*/
|
||||||
double getFadeTime();
|
float getFadeTime();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Resumes a paused sound.
|
* Resumes a paused sound.
|
||||||
@@ -177,14 +177,14 @@ public:
|
|||||||
* - false if the handle is invalid.
|
* - false if the handle is invalid.
|
||||||
* \warning Whether the seek works or not depends on the sound source.
|
* \warning Whether the seek works or not depends on the sound source.
|
||||||
*/
|
*/
|
||||||
bool seek(double position);
|
bool seek(float position);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the current playback position of a sound.
|
* Retrieves the current playback position of a sound.
|
||||||
* \return The playback position in seconds, or 0.0 if the handle is
|
* \return The playback position in seconds, or 0.0 if the handle is
|
||||||
* invalid.
|
* invalid.
|
||||||
*/
|
*/
|
||||||
double getPosition();
|
float getPosition();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the volume of the scenes.
|
* Retrieves the volume of the scenes.
|
||||||
|
10
extern/audaspace/include/fx/Fader.h
vendored
10
extern/audaspace/include/fx/Fader.h
vendored
@@ -43,12 +43,12 @@ private:
|
|||||||
/**
|
/**
|
||||||
* The fading start.
|
* The fading start.
|
||||||
*/
|
*/
|
||||||
const double m_start;
|
const float m_start;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The fading length.
|
* The fading length.
|
||||||
*/
|
*/
|
||||||
const double m_length;
|
const float m_length;
|
||||||
|
|
||||||
// delete copy constructor and operator=
|
// delete copy constructor and operator=
|
||||||
Fader(const Fader&) = delete;
|
Fader(const Fader&) = delete;
|
||||||
@@ -64,7 +64,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
Fader(std::shared_ptr<ISound> sound,
|
Fader(std::shared_ptr<ISound> sound,
|
||||||
FadeType type = FADE_IN,
|
FadeType type = FADE_IN,
|
||||||
double start = 0, double length = 1);
|
float start = 0.0f, float length = 1.0f);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the fading type.
|
* Returns the fading type.
|
||||||
@@ -74,12 +74,12 @@ public:
|
|||||||
/**
|
/**
|
||||||
* Returns the fading start.
|
* Returns the fading start.
|
||||||
*/
|
*/
|
||||||
double getStart() const;
|
float getStart() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the fading length.
|
* Returns the fading length.
|
||||||
*/
|
*/
|
||||||
double getLength() const;
|
float getLength() const;
|
||||||
|
|
||||||
virtual std::shared_ptr<IReader> createReader();
|
virtual std::shared_ptr<IReader> createReader();
|
||||||
};
|
};
|
||||||
|
6
extern/audaspace/include/fx/FaderReader.h
vendored
6
extern/audaspace/include/fx/FaderReader.h
vendored
@@ -49,12 +49,12 @@ private:
|
|||||||
/**
|
/**
|
||||||
* The fading start.
|
* The fading start.
|
||||||
*/
|
*/
|
||||||
const double m_start;
|
const float m_start;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The fading length.
|
* The fading length.
|
||||||
*/
|
*/
|
||||||
const double m_length;
|
const float m_length;
|
||||||
|
|
||||||
// delete copy constructor and operator=
|
// delete copy constructor and operator=
|
||||||
FaderReader(const FaderReader&) = delete;
|
FaderReader(const FaderReader&) = delete;
|
||||||
@@ -69,7 +69,7 @@ public:
|
|||||||
* \param length How long fading should last in seconds.
|
* \param length How long fading should last in seconds.
|
||||||
*/
|
*/
|
||||||
FaderReader(std::shared_ptr<IReader> reader, FadeType type,
|
FaderReader(std::shared_ptr<IReader> reader, FadeType type,
|
||||||
double start,double length);
|
float start,float length);
|
||||||
|
|
||||||
virtual void read(int& length, bool& eos, sample_t* buffer);
|
virtual void read(int& length, bool& eos, sample_t* buffer);
|
||||||
};
|
};
|
||||||
|
10
extern/audaspace/include/fx/Limiter.h
vendored
10
extern/audaspace/include/fx/Limiter.h
vendored
@@ -35,12 +35,12 @@ private:
|
|||||||
/**
|
/**
|
||||||
* The start time.
|
* The start time.
|
||||||
*/
|
*/
|
||||||
const double m_start;
|
const float m_start;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The end time.
|
* The end time.
|
||||||
*/
|
*/
|
||||||
const double m_end;
|
const float m_end;
|
||||||
|
|
||||||
// delete copy constructor and operator=
|
// delete copy constructor and operator=
|
||||||
Limiter(const Limiter&) = delete;
|
Limiter(const Limiter&) = delete;
|
||||||
@@ -55,17 +55,17 @@ public:
|
|||||||
* play to the end.
|
* play to the end.
|
||||||
*/
|
*/
|
||||||
Limiter(std::shared_ptr<ISound> sound,
|
Limiter(std::shared_ptr<ISound> sound,
|
||||||
double start = 0, double end = -1);
|
float start = 0, float end = -1);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the start time.
|
* Returns the start time.
|
||||||
*/
|
*/
|
||||||
double getStart() const;
|
float getStart() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the end time.
|
* Returns the end time.
|
||||||
*/
|
*/
|
||||||
double getEnd() const;
|
float getEnd() const;
|
||||||
|
|
||||||
virtual std::shared_ptr<IReader> createReader();
|
virtual std::shared_ptr<IReader> createReader();
|
||||||
};
|
};
|
||||||
|
6
extern/audaspace/include/fx/LimiterReader.h
vendored
6
extern/audaspace/include/fx/LimiterReader.h
vendored
@@ -35,12 +35,12 @@ private:
|
|||||||
/**
|
/**
|
||||||
* The start sample: inclusive.
|
* The start sample: inclusive.
|
||||||
*/
|
*/
|
||||||
const double m_start;
|
const float m_start;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The end sample: exlusive.
|
* The end sample: exlusive.
|
||||||
*/
|
*/
|
||||||
const double m_end;
|
const float m_end;
|
||||||
|
|
||||||
// delete copy constructor and operator=
|
// delete copy constructor and operator=
|
||||||
LimiterReader(const LimiterReader&) = delete;
|
LimiterReader(const LimiterReader&) = delete;
|
||||||
@@ -54,7 +54,7 @@ public:
|
|||||||
* \param end The desired end time (sample exklusive), a negative value
|
* \param end The desired end time (sample exklusive), a negative value
|
||||||
* signals that it should play to the end.
|
* signals that it should play to the end.
|
||||||
*/
|
*/
|
||||||
LimiterReader(std::shared_ptr<IReader> reader, double start = 0, double end = -1);
|
LimiterReader(std::shared_ptr<IReader> reader, float start = 0, float end = -1);
|
||||||
|
|
||||||
virtual void seek(int position);
|
virtual void seek(int position);
|
||||||
virtual int getLength() const;
|
virtual int getLength() const;
|
||||||
|
2
extern/audaspace/include/sequence/Sequence.h
vendored
2
extern/audaspace/include/sequence/Sequence.h
vendored
@@ -151,7 +151,7 @@ public:
|
|||||||
* \param skip How much seconds should be skipped at the beginning.
|
* \param skip How much seconds should be skipped at the beginning.
|
||||||
* \return The entry added.
|
* \return The entry added.
|
||||||
*/
|
*/
|
||||||
std::shared_ptr<SequenceEntry> add(std::shared_ptr<ISound> sound, double begin, double end, double skip);
|
std::shared_ptr<SequenceEntry> add(std::shared_ptr<ISound> sound, float begin, float end, float skip);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Removes an entry from the scene.
|
* Removes an entry from the scene.
|
||||||
|
@@ -203,7 +203,7 @@ public:
|
|||||||
* \param skip How much seconds should be skipped at the beginning.
|
* \param skip How much seconds should be skipped at the beginning.
|
||||||
* \return The entry added.
|
* \return The entry added.
|
||||||
*/
|
*/
|
||||||
std::shared_ptr<SequenceEntry> add(std::shared_ptr<ISound> sound, double begin, double end, double skip);
|
std::shared_ptr<SequenceEntry> add(std::shared_ptr<ISound> sound, float begin, float end, float skip);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Removes an entry from the scene.
|
* Removes an entry from the scene.
|
||||||
|
@@ -55,13 +55,13 @@ private:
|
|||||||
std::shared_ptr<ISound> m_sound;
|
std::shared_ptr<ISound> m_sound;
|
||||||
|
|
||||||
/// The begin time.
|
/// The begin time.
|
||||||
double m_begin;
|
float m_begin;
|
||||||
|
|
||||||
/// The end time.
|
/// The end time.
|
||||||
double m_end;
|
float m_end;
|
||||||
|
|
||||||
/// How many seconds are skipped at the beginning.
|
/// How many seconds are skipped at the beginning.
|
||||||
double m_skip;
|
float m_skip;
|
||||||
|
|
||||||
/// Whether the entry is muted.
|
/// Whether the entry is muted.
|
||||||
bool m_muted;
|
bool m_muted;
|
||||||
@@ -124,7 +124,7 @@ public:
|
|||||||
* \param skip How much seconds should be skipped at the beginning.
|
* \param skip How much seconds should be skipped at the beginning.
|
||||||
* \param id The ID of the entry.
|
* \param id The ID of the entry.
|
||||||
*/
|
*/
|
||||||
SequenceEntry(std::shared_ptr<ISound> sound, double begin, double end, double skip, int id);
|
SequenceEntry(std::shared_ptr<ISound> sound, float begin, float end, float skip, int id);
|
||||||
virtual ~SequenceEntry();
|
virtual ~SequenceEntry();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -155,7 +155,7 @@ public:
|
|||||||
* \param end The new end time or a negative value if unknown.
|
* \param end The new end time or a negative value if unknown.
|
||||||
* \param skip How many seconds to skip at the beginning.
|
* \param skip How many seconds to skip at the beginning.
|
||||||
*/
|
*/
|
||||||
void move(double begin, double end, double skip);
|
void move(float begin, float end, float skip);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the muting state of the entry.
|
* Retrieves the muting state of the entry.
|
||||||
|
6
extern/audaspace/plugins/jack/JackDevice.cpp
vendored
6
extern/audaspace/plugins/jack/JackDevice.cpp
vendored
@@ -292,7 +292,7 @@ void JackDevice::stopPlayback()
|
|||||||
m_nextState = JackTransportStopped;
|
m_nextState = JackTransportStopped;
|
||||||
}
|
}
|
||||||
|
|
||||||
void JackDevice::seekPlayback(double time)
|
void JackDevice::seekPlayback(float time)
|
||||||
{
|
{
|
||||||
if(time >= 0.0f)
|
if(time >= 0.0f)
|
||||||
AUD_jack_transport_locate(m_client, time * m_specs.rate);
|
AUD_jack_transport_locate(m_client, time * m_specs.rate);
|
||||||
@@ -304,11 +304,11 @@ void JackDevice::setSyncCallback(ISynchronizer::syncFunction sync, void* data)
|
|||||||
m_syncFuncData = data;
|
m_syncFuncData = data;
|
||||||
}
|
}
|
||||||
|
|
||||||
double JackDevice::getPlaybackPosition()
|
float JackDevice::getPlaybackPosition()
|
||||||
{
|
{
|
||||||
jack_position_t position;
|
jack_position_t position;
|
||||||
AUD_jack_transport_query(m_client, &position);
|
AUD_jack_transport_query(m_client, &position);
|
||||||
return position.frame / (double) m_specs.rate;
|
return position.frame / (float) m_specs.rate;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool JackDevice::doesPlayback()
|
bool JackDevice::doesPlayback()
|
||||||
|
4
extern/audaspace/plugins/jack/JackDevice.h
vendored
4
extern/audaspace/plugins/jack/JackDevice.h
vendored
@@ -174,7 +174,7 @@ public:
|
|||||||
* Seeks jack transport playback.
|
* Seeks jack transport playback.
|
||||||
* \param time The time to seek to.
|
* \param time The time to seek to.
|
||||||
*/
|
*/
|
||||||
void seekPlayback(double time);
|
void seekPlayback(float time);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the sync callback for jack transport playback.
|
* Sets the sync callback for jack transport playback.
|
||||||
@@ -187,7 +187,7 @@ public:
|
|||||||
* Retrieves the jack transport playback time.
|
* Retrieves the jack transport playback time.
|
||||||
* \return The current time position.
|
* \return The current time position.
|
||||||
*/
|
*/
|
||||||
double getPlaybackPosition();
|
float getPlaybackPosition();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns whether jack transport plays back.
|
* Returns whether jack transport plays back.
|
||||||
|
@@ -25,12 +25,12 @@ JackSynchronizer::JackSynchronizer(JackDevice* device) :
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void JackSynchronizer::seek(std::shared_ptr<IHandle> handle, double time)
|
void JackSynchronizer::seek(std::shared_ptr<IHandle> handle, float time)
|
||||||
{
|
{
|
||||||
m_device->seekPlayback(time);
|
m_device->seekPlayback(time);
|
||||||
}
|
}
|
||||||
|
|
||||||
double JackSynchronizer::getPosition(std::shared_ptr<IHandle> handle)
|
float JackSynchronizer::getPosition(std::shared_ptr<IHandle> handle)
|
||||||
{
|
{
|
||||||
return m_device->getPlaybackPosition();
|
return m_device->getPlaybackPosition();
|
||||||
}
|
}
|
||||||
|
@@ -48,8 +48,8 @@ public:
|
|||||||
*/
|
*/
|
||||||
JackSynchronizer(JackDevice* device);
|
JackSynchronizer(JackDevice* device);
|
||||||
|
|
||||||
virtual void seek(std::shared_ptr<IHandle> handle, double time);
|
virtual void seek(std::shared_ptr<IHandle> handle, float time);
|
||||||
virtual double getPosition(std::shared_ptr<IHandle> handle);
|
virtual float getPosition(std::shared_ptr<IHandle> handle);
|
||||||
virtual void play();
|
virtual void play();
|
||||||
virtual void stop();
|
virtual void stop();
|
||||||
virtual void setSyncCallback(syncFunction function, void* data);
|
virtual void setSyncCallback(syncFunction function, void* data);
|
||||||
|
@@ -269,7 +269,7 @@ bool OpenALDevice::OpenALHandle::setKeep(bool keep)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool OpenALDevice::OpenALHandle::seek(double position)
|
bool OpenALDevice::OpenALHandle::seek(float position)
|
||||||
{
|
{
|
||||||
if(!m_status)
|
if(!m_status)
|
||||||
return false;
|
return false;
|
||||||
@@ -335,7 +335,7 @@ bool OpenALDevice::OpenALHandle::seek(double position)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
double OpenALDevice::OpenALHandle::getPosition()
|
float OpenALDevice::OpenALHandle::getPosition()
|
||||||
{
|
{
|
||||||
if(!m_status)
|
if(!m_status)
|
||||||
return false;
|
return false;
|
||||||
|
@@ -126,8 +126,8 @@ private:
|
|||||||
virtual bool stop();
|
virtual bool stop();
|
||||||
virtual bool getKeep();
|
virtual bool getKeep();
|
||||||
virtual bool setKeep(bool keep);
|
virtual bool setKeep(bool keep);
|
||||||
virtual bool seek(double position);
|
virtual bool seek(float position);
|
||||||
virtual double getPosition();
|
virtual float getPosition();
|
||||||
virtual Status getStatus();
|
virtual Status getStatus();
|
||||||
virtual float getVolume();
|
virtual float getVolume();
|
||||||
virtual bool setVolume(float volume);
|
virtual bool setVolume(float volume);
|
||||||
|
@@ -19,12 +19,12 @@
|
|||||||
|
|
||||||
AUD_NAMESPACE_BEGIN
|
AUD_NAMESPACE_BEGIN
|
||||||
|
|
||||||
void DefaultSynchronizer::seek(std::shared_ptr<IHandle> handle, double time)
|
void DefaultSynchronizer::seek(std::shared_ptr<IHandle> handle, float time)
|
||||||
{
|
{
|
||||||
handle->seek(time);
|
handle->seek(time);
|
||||||
}
|
}
|
||||||
|
|
||||||
double DefaultSynchronizer::getPosition(std::shared_ptr<IHandle> handle)
|
float DefaultSynchronizer::getPosition(std::shared_ptr<IHandle> handle)
|
||||||
{
|
{
|
||||||
return handle->getPosition();
|
return handle->getPosition();
|
||||||
}
|
}
|
||||||
|
4
extern/audaspace/src/devices/NULLDevice.cpp
vendored
4
extern/audaspace/src/devices/NULLDevice.cpp
vendored
@@ -52,12 +52,12 @@ bool NULLDevice::NULLHandle::setKeep(bool keep)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool NULLDevice::NULLHandle::seek(double position)
|
bool NULLDevice::NULLHandle::seek(float position)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
double NULLDevice::NULLHandle::getPosition()
|
float NULLDevice::NULLHandle::getPosition()
|
||||||
{
|
{
|
||||||
return std::numeric_limits<float>::quiet_NaN();
|
return std::numeric_limits<float>::quiet_NaN();
|
||||||
}
|
}
|
||||||
|
@@ -347,7 +347,7 @@ bool SoftwareDevice::SoftwareHandle::setKeep(bool keep)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SoftwareDevice::SoftwareHandle::seek(double position)
|
bool SoftwareDevice::SoftwareHandle::seek(float position)
|
||||||
{
|
{
|
||||||
if(!m_status)
|
if(!m_status)
|
||||||
return false;
|
return false;
|
||||||
@@ -366,7 +366,7 @@ bool SoftwareDevice::SoftwareHandle::seek(double position)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
double SoftwareDevice::SoftwareHandle::getPosition()
|
float SoftwareDevice::SoftwareHandle::getPosition()
|
||||||
{
|
{
|
||||||
if(!m_status)
|
if(!m_status)
|
||||||
return false;
|
return false;
|
||||||
@@ -376,7 +376,7 @@ double SoftwareDevice::SoftwareHandle::getPosition()
|
|||||||
if(!m_status)
|
if(!m_status)
|
||||||
return 0.0f;
|
return 0.0f;
|
||||||
|
|
||||||
double position = m_reader->getPosition() / (double)m_device->m_specs.rate;
|
float position = m_reader->getPosition() / (float)m_device->m_specs.rate;
|
||||||
|
|
||||||
return position;
|
return position;
|
||||||
}
|
}
|
||||||
|
4
extern/audaspace/src/fx/Delay.cpp
vendored
4
extern/audaspace/src/fx/Delay.cpp
vendored
@@ -19,13 +19,13 @@
|
|||||||
|
|
||||||
AUD_NAMESPACE_BEGIN
|
AUD_NAMESPACE_BEGIN
|
||||||
|
|
||||||
Delay::Delay(std::shared_ptr<ISound> sound, double delay) :
|
Delay::Delay(std::shared_ptr<ISound> sound, float delay) :
|
||||||
Effect(sound),
|
Effect(sound),
|
||||||
m_delay(delay)
|
m_delay(delay)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
double Delay::getDelay() const
|
float Delay::getDelay() const
|
||||||
{
|
{
|
||||||
return m_delay;
|
return m_delay;
|
||||||
}
|
}
|
||||||
|
2
extern/audaspace/src/fx/DelayReader.cpp
vendored
2
extern/audaspace/src/fx/DelayReader.cpp
vendored
@@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
AUD_NAMESPACE_BEGIN
|
AUD_NAMESPACE_BEGIN
|
||||||
|
|
||||||
DelayReader::DelayReader(std::shared_ptr<IReader> reader, double delay) :
|
DelayReader::DelayReader(std::shared_ptr<IReader> reader, float delay) :
|
||||||
EffectReader(reader),
|
EffectReader(reader),
|
||||||
m_delay(int((SampleRate)delay * reader->getSpecs().rate)),
|
m_delay(int((SampleRate)delay * reader->getSpecs().rate)),
|
||||||
m_remdelay(int((SampleRate)delay * reader->getSpecs().rate))
|
m_remdelay(int((SampleRate)delay * reader->getSpecs().rate))
|
||||||
|
10
extern/audaspace/src/fx/DynamicMusic.cpp
vendored
10
extern/audaspace/src/fx/DynamicMusic.cpp
vendored
@@ -133,14 +133,14 @@ bool DynamicMusic::addTransition(int init, int end, std::shared_ptr<ISound> soun
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DynamicMusic::setFadeTime(double seconds)
|
void DynamicMusic::setFadeTime(float seconds)
|
||||||
{
|
{
|
||||||
m_device->lock();
|
m_device->lock();
|
||||||
m_fadeTime = seconds;
|
m_fadeTime = seconds;
|
||||||
m_device->unlock();
|
m_device->unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
double DynamicMusic::getFadeTime()
|
float DynamicMusic::getFadeTime()
|
||||||
{
|
{
|
||||||
return m_fadeTime;
|
return m_fadeTime;
|
||||||
}
|
}
|
||||||
@@ -169,7 +169,7 @@ bool DynamicMusic::pause()
|
|||||||
return result || resultTrans;
|
return result || resultTrans;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DynamicMusic::seek(double position)
|
bool DynamicMusic::seek(float position)
|
||||||
{
|
{
|
||||||
bool result = false;
|
bool result = false;
|
||||||
|
|
||||||
@@ -183,9 +183,9 @@ bool DynamicMusic::seek(double position)
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
double DynamicMusic::getPosition()
|
float DynamicMusic::getPosition()
|
||||||
{
|
{
|
||||||
double result = 0.0f;
|
float result = 0.0f;
|
||||||
|
|
||||||
if(m_currentHandle != nullptr)
|
if(m_currentHandle != nullptr)
|
||||||
result = m_currentHandle->getPosition();
|
result = m_currentHandle->getPosition();
|
||||||
|
6
extern/audaspace/src/fx/Fader.cpp
vendored
6
extern/audaspace/src/fx/Fader.cpp
vendored
@@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
AUD_NAMESPACE_BEGIN
|
AUD_NAMESPACE_BEGIN
|
||||||
|
|
||||||
Fader::Fader(std::shared_ptr<ISound> sound, FadeType type, double start, double length) :
|
Fader::Fader(std::shared_ptr<ISound> sound, FadeType type, float start, float length) :
|
||||||
Effect(sound),
|
Effect(sound),
|
||||||
m_type(type),
|
m_type(type),
|
||||||
m_start(start),
|
m_start(start),
|
||||||
@@ -31,12 +31,12 @@ FadeType Fader::getType() const
|
|||||||
return m_type;
|
return m_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
double Fader::getStart() const
|
float Fader::getStart() const
|
||||||
{
|
{
|
||||||
return m_start;
|
return m_start;
|
||||||
}
|
}
|
||||||
|
|
||||||
double Fader::getLength() const
|
float Fader::getLength() const
|
||||||
{
|
{
|
||||||
return m_length;
|
return m_length;
|
||||||
}
|
}
|
||||||
|
8
extern/audaspace/src/fx/FaderReader.cpp
vendored
8
extern/audaspace/src/fx/FaderReader.cpp
vendored
@@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
AUD_NAMESPACE_BEGIN
|
AUD_NAMESPACE_BEGIN
|
||||||
|
|
||||||
FaderReader::FaderReader(std::shared_ptr<IReader> reader, FadeType type, double start, double length) :
|
FaderReader::FaderReader(std::shared_ptr<IReader> reader, FadeType type, float start,float length) :
|
||||||
EffectReader(reader),
|
EffectReader(reader),
|
||||||
m_type(type),
|
m_type(type),
|
||||||
m_start(start),
|
m_start(start),
|
||||||
@@ -36,14 +36,14 @@ void FaderReader::read(int& length, bool& eos, sample_t* buffer)
|
|||||||
|
|
||||||
m_reader->read(length, eos, buffer);
|
m_reader->read(length, eos, buffer);
|
||||||
|
|
||||||
if((position + length) / specs.rate <= m_start)
|
if((position + length) / (float)specs.rate <= m_start)
|
||||||
{
|
{
|
||||||
if(m_type != FADE_OUT)
|
if(m_type != FADE_OUT)
|
||||||
{
|
{
|
||||||
std::memset(buffer, 0, length * samplesize);
|
std::memset(buffer, 0, length * samplesize);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(position / specs.rate >= m_start+m_length)
|
else if(position / (float)specs.rate >= m_start+m_length)
|
||||||
{
|
{
|
||||||
if(m_type == FADE_OUT)
|
if(m_type == FADE_OUT)
|
||||||
{
|
{
|
||||||
@@ -58,7 +58,7 @@ void FaderReader::read(int& length, bool& eos, sample_t* buffer)
|
|||||||
{
|
{
|
||||||
if(i % specs.channels == 0)
|
if(i % specs.channels == 0)
|
||||||
{
|
{
|
||||||
volume = float((((position + i) / specs.rate) - m_start) / m_length);
|
volume = (((position+i)/(float)specs.rate)-m_start) / m_length;
|
||||||
if(volume > 1.0f)
|
if(volume > 1.0f)
|
||||||
volume = 1.0f;
|
volume = 1.0f;
|
||||||
else if(volume < 0.0f)
|
else if(volume < 0.0f)
|
||||||
|
6
extern/audaspace/src/fx/Limiter.cpp
vendored
6
extern/audaspace/src/fx/Limiter.cpp
vendored
@@ -20,19 +20,19 @@
|
|||||||
AUD_NAMESPACE_BEGIN
|
AUD_NAMESPACE_BEGIN
|
||||||
|
|
||||||
Limiter::Limiter(std::shared_ptr<ISound> sound,
|
Limiter::Limiter(std::shared_ptr<ISound> sound,
|
||||||
double start, double end) :
|
float start, float end) :
|
||||||
Effect(sound),
|
Effect(sound),
|
||||||
m_start(start),
|
m_start(start),
|
||||||
m_end(end)
|
m_end(end)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
double Limiter::getStart() const
|
float Limiter::getStart() const
|
||||||
{
|
{
|
||||||
return m_start;
|
return m_start;
|
||||||
}
|
}
|
||||||
|
|
||||||
double Limiter::getEnd() const
|
float Limiter::getEnd() const
|
||||||
{
|
{
|
||||||
return m_end;
|
return m_end;
|
||||||
}
|
}
|
||||||
|
2
extern/audaspace/src/fx/LimiterReader.cpp
vendored
2
extern/audaspace/src/fx/LimiterReader.cpp
vendored
@@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
AUD_NAMESPACE_BEGIN
|
AUD_NAMESPACE_BEGIN
|
||||||
|
|
||||||
LimiterReader::LimiterReader(std::shared_ptr<IReader> reader, double start, double end) :
|
LimiterReader::LimiterReader(std::shared_ptr<IReader> reader, float start, float end) :
|
||||||
EffectReader(reader),
|
EffectReader(reader),
|
||||||
m_start(start),
|
m_start(start),
|
||||||
m_end(end)
|
m_end(end)
|
||||||
|
@@ -16,9 +16,9 @@
|
|||||||
|
|
||||||
#include "respec/ChannelMapperReader.h"
|
#include "respec/ChannelMapperReader.h"
|
||||||
|
|
||||||
#include <algorithm>
|
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <limits>
|
#include <limits>
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
AUD_NAMESPACE_BEGIN
|
AUD_NAMESPACE_BEGIN
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user