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

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'intern/audaspace')
-rw-r--r--intern/audaspace/CMakeLists.txt56
-rw-r--r--intern/audaspace/intern/AUD_PyInit.cpp53
-rw-r--r--intern/audaspace/intern/AUD_PyInit.h13
-rw-r--r--intern/audaspace/intern/AUD_Set.cpp34
-rw-r--r--intern/audaspace/intern/AUD_Set.h4
5 files changed, 80 insertions, 80 deletions
diff --git a/intern/audaspace/CMakeLists.txt b/intern/audaspace/CMakeLists.txt
index 21657d6f3c0..7baaf301f6c 100644
--- a/intern/audaspace/CMakeLists.txt
+++ b/intern/audaspace/CMakeLists.txt
@@ -22,46 +22,46 @@
remove_strict_flags()
if(CMAKE_COMPILER_IS_GNUCC)
- remove_cc_flag("-Wunused-macros")
+ remove_cc_flag("-Wunused-macros")
endif()
- set(INC
- .
- )
+ set(INC
+ .
+ )
- set(INC_SYS
- ${AUDASPACE_C_INCLUDE_DIRS}
- ${AUDASPACE_PY_INCLUDE_DIRS}
- )
+ set(INC_SYS
+ ${AUDASPACE_C_INCLUDE_DIRS}
+ ${AUDASPACE_PY_INCLUDE_DIRS}
+ )
- set(SRC
- intern/AUD_Set.cpp
- intern/AUD_Set.h
- )
+ set(SRC
+ intern/AUD_Set.cpp
+ intern/AUD_Set.h
+ )
set(LIB
)
if(NOT WITH_SYSTEM_AUDASPACE)
- list(APPEND LIB
- audaspace
- )
+ list(APPEND LIB
+ audaspace
+ )
endif()
if(WITH_PYTHON)
- list(APPEND INC_SYS
- ${PYTHON_INCLUDE_DIRS}
- )
- list(APPEND SRC
- intern/AUD_PyInit.cpp
- intern/AUD_PyInit.h
- )
- if(NOT WITH_SYSTEM_AUDASPACE)
- list(APPEND LIB
- audaspace-py
- )
- endif()
+ list(APPEND INC_SYS
+ ${PYTHON_INCLUDE_DIRS}
+ )
+ list(APPEND SRC
+ intern/AUD_PyInit.cpp
+ intern/AUD_PyInit.h
+ )
+ if(NOT WITH_SYSTEM_AUDASPACE)
+ list(APPEND LIB
+ audaspace-py
+ )
+ endif()
- add_definitions(-DWITH_PYTHON)
+ add_definitions(-DWITH_PYTHON)
endif()
blender_add_lib(bf_intern_audaspace "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/intern/audaspace/intern/AUD_PyInit.cpp b/intern/audaspace/intern/AUD_PyInit.cpp
index b40cce34dfb..b65d2740f32 100644
--- a/intern/audaspace/intern/AUD_PyInit.cpp
+++ b/intern/audaspace/intern/AUD_PyInit.cpp
@@ -34,46 +34,47 @@ extern void *BKE_sound_get_factory(void *sound);
static PyObject *AUD_getSoundFromPointer(PyObject *self, PyObject *args)
{
- long int lptr;
+ long int lptr;
- if (PyArg_Parse(args, "l:_sound_from_pointer", &lptr)) {
- if (lptr) {
- AUD_Sound* sound = BKE_sound_get_factory((void *) lptr);
+ if (PyArg_Parse(args, "l:_sound_from_pointer", &lptr)) {
+ if (lptr) {
+ AUD_Sound *sound = BKE_sound_get_factory((void *)lptr);
- if (sound) {
- Sound *obj = (Sound *)Sound_empty();
- if (obj) {
- obj->sound = AUD_Sound_copy(sound);
- return (PyObject *) obj;
- }
- }
- }
- }
+ if (sound) {
+ Sound *obj = (Sound *)Sound_empty();
+ if (obj) {
+ obj->sound = AUD_Sound_copy(sound);
+ return (PyObject *)obj;
+ }
+ }
+ }
+ }
- Py_RETURN_NONE;
+ Py_RETURN_NONE;
}
static PyMethodDef meth_sound_from_pointer[] = {
- {"_sound_from_pointer", (PyCFunction)AUD_getSoundFromPointer, METH_O,
+ {"_sound_from_pointer",
+ (PyCFunction)AUD_getSoundFromPointer,
+ METH_O,
"_sound_from_pointer(pointer)\n\n"
"Returns the corresponding :class:`Factory` object.\n\n"
":arg pointer: The pointer to the bSound object as long.\n"
":type pointer: long\n"
":return: The corresponding :class:`Factory` object.\n"
- ":rtype: :class:`Factory`"}
-};
+ ":rtype: :class:`Factory`"}};
PyObject *AUD_initPython(void)
{
- PyObject *module = PyInit_aud();
- if (module == NULL) {
- printf("Unable to initialise audio\n");
- return NULL;
- }
+ PyObject *module = PyInit_aud();
+ if (module == NULL) {
+ printf("Unable to initialise audio\n");
+ return NULL;
+ }
- PyModule_AddObject(module, "_sound_from_pointer", (PyObject *)PyCFunction_New(meth_sound_from_pointer, NULL));
- PyDict_SetItemString(PyImport_GetModuleDict(), "aud", module);
+ PyModule_AddObject(
+ module, "_sound_from_pointer", (PyObject *)PyCFunction_New(meth_sound_from_pointer, NULL));
+ PyDict_SetItemString(PyImport_GetModuleDict(), "aud", module);
- return module;
+ return module;
}
-
diff --git a/intern/audaspace/intern/AUD_PyInit.h b/intern/audaspace/intern/AUD_PyInit.h
index 0c8cd85623c..e572ea1a27a 100644
--- a/intern/audaspace/intern/AUD_PyInit.h
+++ b/intern/audaspace/intern/AUD_PyInit.h
@@ -22,26 +22,25 @@
* \ingroup audaspaceintern
*/
-
#ifndef __AUD_PYINIT_H__
#define __AUD_PYINIT_H__
#ifdef WITH_PYTHON
-#include "Python.h"
+# include "Python.h"
-#ifdef __cplusplus
+# ifdef __cplusplus
extern "C" {
-#endif
+# endif
/**
* Initializes the Python module.
*/
extern PyObject *AUD_initPython(void);
-#ifdef __cplusplus
+# ifdef __cplusplus
}
-#endif
+# endif
#endif
-#endif //__AUD_PYINIT_H__
+#endif //__AUD_PYINIT_H__
diff --git a/intern/audaspace/intern/AUD_Set.cpp b/intern/audaspace/intern/AUD_Set.cpp
index d65f5e34a5f..2ab576cbd07 100644
--- a/intern/audaspace/intern/AUD_Set.cpp
+++ b/intern/audaspace/intern/AUD_Set.cpp
@@ -28,38 +28,38 @@
void *AUD_createSet()
{
- return new std::set<void *>();
+ return new std::set<void *>();
}
void AUD_destroySet(void *set)
{
- delete reinterpret_cast<std::set<void *>*>(set);
+ delete reinterpret_cast<std::set<void *> *>(set);
}
char AUD_removeSet(void *set, void *entry)
{
- if (set)
- return reinterpret_cast<std::set<void *>*>(set)->erase(entry);
- return 0;
+ if (set)
+ return reinterpret_cast<std::set<void *> *>(set)->erase(entry);
+ return 0;
}
void AUD_addSet(void *set, void *entry)
{
- if (entry)
- reinterpret_cast<std::set<void *>*>(set)->insert(entry);
+ if (entry)
+ reinterpret_cast<std::set<void *> *>(set)->insert(entry);
}
void *AUD_getSet(void *set)
{
- if (set) {
- std::set<void *>* rset = reinterpret_cast<std::set<void *>*>(set);
- if (!rset->empty()) {
- std::set<void *>::iterator it = rset->begin();
- void *result = *it;
- rset->erase(it);
- return result;
- }
- }
+ if (set) {
+ std::set<void *> *rset = reinterpret_cast<std::set<void *> *>(set);
+ if (!rset->empty()) {
+ std::set<void *>::iterator it = rset->begin();
+ void *result = *it;
+ rset->erase(it);
+ return result;
+ }
+ }
- return (void*) 0;
+ return (void *)0;
}
diff --git a/intern/audaspace/intern/AUD_Set.h b/intern/audaspace/intern/AUD_Set.h
index e71383a4817..c2c7b7f40ce 100644
--- a/intern/audaspace/intern/AUD_Set.h
+++ b/intern/audaspace/intern/AUD_Set.h
@@ -21,7 +21,7 @@
/** \file
* \ingroup audaspace
*/
-
+
#ifndef __AUD_SET_H__
#define __AUD_SET_H__
@@ -67,4 +67,4 @@ extern void *AUD_getSet(void *set);
}
#endif
-#endif //__AUD_SET_H__
+#endif //__AUD_SET_H__