aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2022-06-28 14:28:47 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2022-06-29 08:45:31 +0200
commit5316feb88d9700f3acef3f83ccc30927fdfdfef0 (patch)
tree8a4225e0cf6ee664bf3eddb41032a73be5a2a4dd
parent442b06ae456ec6c3d7eac9826bff43ee36188d07 (diff)
Add QtSpatialAudio
Adapt to qtmultimedia/c403e775f60a5d02e761904342ac243be1f22597. Change-Id: Id078b2a7ca46ff775fbbc543428a3208d5410981 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
-rw-r--r--build_scripts/wheel_files.py8
-rw-r--r--sources/pyside6/PySide6/QtSpatialAudio/CMakeLists.txt41
-rw-r--r--sources/pyside6/PySide6/QtSpatialAudio/typesystem_spatialaudio.xml31
-rw-r--r--sources/pyside6/cmake/PySideHelpers.cmake1
-rw-r--r--sources/pyside6/tests/QtSpatialAudio/CMakeLists.txt1
5 files changed, 82 insertions, 0 deletions
diff --git a/build_scripts/wheel_files.py b/build_scripts/wheel_files.py
index 1c506c5e0..d9f2d0729 100644
--- a/build_scripts/wheel_files.py
+++ b/build_scripts/wheel_files.py
@@ -170,6 +170,7 @@ def wheel_files_pyside_addons() -> List[ModuleData]:
module_QtScxml(),
module_QtSensors(),
module_QtSerialPort(),
+ module_QtSpatialAudio(),
module_QtStateMachine(),
# Not available in 6.3
# module_QtTextToSpeech(),
@@ -780,6 +781,13 @@ def module_QtSerialPort() -> ModuleData:
return data
+def module_QtSpatialAudio() -> ModuleData:
+ data = ModuleData("QtSpatialAudio")
+ data.metatypes.append("qt6spatialaudio_debug_metatypes.json")
+
+ return data
+
+
def module_QtStateMachine() -> ModuleData:
data = ModuleData("StateMachine")
data.qtlib.append("libQt6StateMachineQml")
diff --git a/sources/pyside6/PySide6/QtSpatialAudio/CMakeLists.txt b/sources/pyside6/PySide6/QtSpatialAudio/CMakeLists.txt
new file mode 100644
index 000000000..705df54b4
--- /dev/null
+++ b/sources/pyside6/PySide6/QtSpatialAudio/CMakeLists.txt
@@ -0,0 +1,41 @@
+project(QtSpatialAudio)
+
+set(QtSpatialAudio_SRC
+${QtSpatialAudio_GEN_DIR}/qambientsound_wrapper.cpp
+${QtSpatialAudio_GEN_DIR}/qaudioengine_wrapper.cpp
+${QtSpatialAudio_GEN_DIR}/qaudiolistener_wrapper.cpp
+${QtSpatialAudio_GEN_DIR}/qaudioroom_wrapper.cpp
+${QtSpatialAudio_GEN_DIR}/qspatialsound_wrapper.cpp
+
+# module is always needed
+${QtSpatialAudio_GEN_DIR}/qtspatialaudio_module_wrapper.cpp
+)
+
+set(QtSpatialAudio_include_dirs ${QtSpatialAudio_SOURCE_DIR}
+ ${QtSpatialAudio_BINARY_DIR}
+ ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Gui_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Network_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Multimedia_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}SpatialAudio_INCLUDE_DIRS}
+ ${libpyside_SOURCE_DIR}
+ ${QtCore_GEN_DIR}
+ ${QtGui_GEN_DIR}
+ ${QtNetwork_GEN_DIR}
+ ${QtMultimedia_GEN_DIR})
+
+set(QtSpatialAudio_libraries pyside6
+ ${Qt${QT_MAJOR_VERSION}SpatialAudio_LIBRARIES}
+ ${Qt${QT_MAJOR_VERSION}Core_LIBRARIES}
+ ${Qt${QT_MAJOR_VERSION}Gui_LIBRARIES}
+ ${Qt${QT_MAJOR_VERSION}Network_LIBRARIES}
+ ${Qt${QT_MAJOR_VERSION}Multimedia_LIBRARIES}
+ )
+set(QtSpatialAudio_deps QtCore QtGui QtNetwork QtMultimedia)
+
+create_pyside_module(NAME QtSpatialAudio
+ INCLUDE_DIRS QtSpatialAudio_include_dirs
+ LIBRARIES QtSpatialAudio_libraries
+ DEPS QtSpatialAudio_deps
+ TYPESYSTEM_PATH QtSpatialAudio_SOURCE_DIR
+ SOURCES QtSpatialAudio_SRC)
diff --git a/sources/pyside6/PySide6/QtSpatialAudio/typesystem_spatialaudio.xml b/sources/pyside6/PySide6/QtSpatialAudio/typesystem_spatialaudio.xml
new file mode 100644
index 000000000..71f189b25
--- /dev/null
+++ b/sources/pyside6/PySide6/QtSpatialAudio/typesystem_spatialaudio.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+// Copyright (C) 2022 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+-->
+<typesystem package="PySide6.QtSpatialAudio">
+ <load-typesystem name="QtCore/typesystem_core.xml" generate="no"/>
+ <load-typesystem name="QtGui/typesystem_gui.xml" generate="no"/>
+ <load-typesystem name="QtNetwork/typesystem_network.xml" generate="no"/>
+ <load-typesystem name="QtMultimedia/typesystem_multimedia.xml" generate="no"/>
+
+ <object-type name="QAmbientSound">
+ <enum-type name="Loops"/>
+ </object-type>
+
+ <object-type name="QAudioEngine">
+ <enum-type name="OutputMode"/>
+ </object-type>
+
+ <object-type name="QAudioListener"/>
+
+ <object-type name="QAudioRoom">
+ <enum-type name="Material"/>
+ <enum-type name="Wall"/>
+ </object-type>
+
+ <object-type name="QSpatialSound">
+ <enum-type name="Loops"/>
+ <enum-type name="DistanceModel"/>
+ </object-type>
+</typesystem>
diff --git a/sources/pyside6/cmake/PySideHelpers.cmake b/sources/pyside6/cmake/PySideHelpers.cmake
index d4e7c7959..176623cb2 100644
--- a/sources/pyside6/cmake/PySideHelpers.cmake
+++ b/sources/pyside6/cmake/PySideHelpers.cmake
@@ -105,6 +105,7 @@ macro(collect_optional_modules)
StateMachine
TextToSpeech
Charts
+ SpatialAudio
Svg
SvgWidgets
DataVisualization
diff --git a/sources/pyside6/tests/QtSpatialAudio/CMakeLists.txt b/sources/pyside6/tests/QtSpatialAudio/CMakeLists.txt
new file mode 100644
index 000000000..2f7cb08b9
--- /dev/null
+++ b/sources/pyside6/tests/QtSpatialAudio/CMakeLists.txt
@@ -0,0 +1 @@
+# Please add some tests, here