Fix tray visibility and message reception issues
Some checks failed
build / build-win64 (push) Waiting to run
build / build-macos (push) Waiting to run
build / build-pip (push) Failing after 16s

- Disable sound initialization to prevent hanging
- Add missing import re in utils.py
- Fix settings loading for QSettings
- Update file paths to use PROJECT_ROOT
- Revert to working API paths and listener from commit efdc63e
This commit is contained in:
kdusek
2025-12-07 22:39:07 +01:00
parent 7b695d7b7f
commit 5138303016
4060 changed files with 579123 additions and 23 deletions

View File

@@ -0,0 +1,6 @@
# Automatically generated configuration for PyQt6.QtSpatialAudio.
sip-version = "6.14.0"
sip-abi-version = "13.8"
module-tags = ["Qt_6_10_0", "Linux"]
module-disabled-features = ["PyQt_OpenGL_ES2"]

View File

@@ -0,0 +1,53 @@
// QtSpatialAudiomod.sip generated by MetaSIP
//
// This file is part of the QtSpatialAudio Python extension module.
//
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt6.
//
// This file may be used under the terms of the GNU General Public License
// version 3.0 as published by the Free Software Foundation and appearing in
// the file LICENSE included in the packaging of this file. Please review the
// following information to ensure the GNU General Public License version 3.0
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
//
// If you do not wish to use this file under the terms of the GPL version 3.0
// then you may purchase a commercial license. For more information contact
// info@riverbankcomputing.com.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
%Module(name=PyQt6.QtSpatialAudio, keyword_arguments="Optional", use_limited_api=True)
%Import QtCore/QtCoremod.sip
%Import QtMultimedia/QtMultimediamod.sip
%Copying
Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
This file is part of PyQt6.
This file may be used under the terms of the GNU General Public License
version 3.0 as published by the Free Software Foundation and appearing in
the file LICENSE included in the packaging of this file. Please review the
following information to ensure the GNU General Public License version 3.0
requirements will be met: http://www.gnu.org/copyleft/gpl.html.
If you do not wish to use this file under the terms of the GPL version 3.0
then you may purchase a commercial license. For more information contact
info@riverbankcomputing.com.
This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
%End
%DefaultSupertype PyQt6.sip.simplewrapper
%Include qambientsound.sip
%Include qaudioengine.sip
%Include qaudiolistener.sip
%Include qaudioroom.sip
%Include qspatialsound.sip

View File

@@ -0,0 +1,62 @@
// qambientsound.sip generated by MetaSIP
//
// This file is part of the QtSpatialAudio Python extension module.
//
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt6.
//
// This file may be used under the terms of the GNU General Public License
// version 3.0 as published by the Free Software Foundation and appearing in
// the file LICENSE included in the packaging of this file. Please review the
// following information to ensure the GNU General Public License version 3.0
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
//
// If you do not wish to use this file under the terms of the GPL version 3.0
// then you may purchase a commercial license. For more information contact
// info@riverbankcomputing.com.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
%If (Qt_6_5_0 -)
class QAmbientSound : public QObject
{
%TypeHeaderCode
#include <qambientsound.h>
%End
public:
enum Loops
{
Infinite,
Once,
};
explicit QAmbientSound(QAudioEngine *engine);
virtual ~QAmbientSound();
void setSource(const QUrl &url);
QUrl source() const;
int loops() const;
void setLoops(int loops);
bool autoPlay() const;
void setAutoPlay(bool autoPlay);
void setVolume(float volume);
float volume() const;
QAudioEngine *engine() const;
signals:
void sourceChanged();
void loopsChanged();
void autoPlayChanged();
void volumeChanged();
public slots:
void play();
void pause();
void stop();
};
%End

View File

@@ -0,0 +1,105 @@
// qaudioengine.sip generated by MetaSIP
//
// This file is part of the QtSpatialAudio Python extension module.
//
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt6.
//
// This file may be used under the terms of the GNU General Public License
// version 3.0 as published by the Free Software Foundation and appearing in
// the file LICENSE included in the packaging of this file. Please review the
// following information to ensure the GNU General Public License version 3.0
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
//
// If you do not wish to use this file under the terms of the GPL version 3.0
// then you may purchase a commercial license. For more information contact
// info@riverbankcomputing.com.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
%If (Qt_6_5_0 -)
class QAudioEngine : public QObject
{
%TypeHeaderCode
#include <qaudioengine.h>
%End
%ConvertToSubClassCode
static struct class_graph {
const char *name;
sipTypeDef **type;
int yes, no;
} graph[] = {
{sipName_QAmbientSound, &sipType_QAmbientSound, -1, 1},
{sipName_QAudioEngine, &sipType_QAudioEngine, -1, 2},
{sipName_QAudioListener, &sipType_QAudioListener, -1, 3},
{sipName_QAudioRoom, &sipType_QAudioRoom, -1, 4},
{sipName_QSpatialSound, &sipType_QSpatialSound, -1, -1},
};
int i = 0;
sipType = NULL;
do
{
struct class_graph *cg = &graph[i];
if (cg->name != NULL && sipCpp->inherits(cg->name))
{
sipType = *cg->type;
i = cg->yes;
}
else
i = cg->no;
}
while (i >= 0);
%End
public:
enum OutputMode
{
Surround,
Stereo,
Headphone,
};
QAudioEngine();
explicit QAudioEngine(QObject *parent /TransferThis/);
QAudioEngine(int sampleRate, QObject *parent /TransferThis/ = 0);
virtual ~QAudioEngine();
void setOutputMode(QAudioEngine::OutputMode mode);
QAudioEngine::OutputMode outputMode() const;
int sampleRate() const;
void setOutputDevice(const QAudioDevice &device);
QAudioDevice outputDevice() const;
void setMasterVolume(float volume);
float masterVolume() const;
void setPaused(bool paused);
bool paused() const;
void setRoomEffectsEnabled(bool enabled);
bool roomEffectsEnabled() const;
static const float DistanceScaleCentimeter;
static const float DistanceScaleMeter;
void setDistanceScale(float scale);
float distanceScale() const;
signals:
void outputModeChanged();
void outputDeviceChanged();
void masterVolumeChanged();
void pausedChanged();
void distanceScaleChanged();
public slots:
void start();
void stop();
void pause();
void resume();
};
%End

View File

@@ -0,0 +1,41 @@
// qaudiolistener.sip generated by MetaSIP
//
// This file is part of the QtSpatialAudio Python extension module.
//
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt6.
//
// This file may be used under the terms of the GNU General Public License
// version 3.0 as published by the Free Software Foundation and appearing in
// the file LICENSE included in the packaging of this file. Please review the
// following information to ensure the GNU General Public License version 3.0
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
//
// If you do not wish to use this file under the terms of the GPL version 3.0
// then you may purchase a commercial license. For more information contact
// info@riverbankcomputing.com.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
%If (Qt_6_5_0 -)
class QAudioListener : public QObject
{
%TypeHeaderCode
#include <qaudiolistener.h>
%End
public:
explicit QAudioListener(QAudioEngine *engine);
virtual ~QAudioListener();
void setPosition(QVector3D pos);
QVector3D position() const;
void setRotation(const QQuaternion &q);
QQuaternion rotation() const;
QAudioEngine *engine() const;
};
%End

View File

@@ -0,0 +1,100 @@
// qaudioroom.sip generated by MetaSIP
//
// This file is part of the QtSpatialAudio Python extension module.
//
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt6.
//
// This file may be used under the terms of the GNU General Public License
// version 3.0 as published by the Free Software Foundation and appearing in
// the file LICENSE included in the packaging of this file. Please review the
// following information to ensure the GNU General Public License version 3.0
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
//
// If you do not wish to use this file under the terms of the GPL version 3.0
// then you may purchase a commercial license. For more information contact
// info@riverbankcomputing.com.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
%If (Qt_6_5_0 -)
class QAudioRoom : public QObject
{
%TypeHeaderCode
#include <qaudioroom.h>
%End
public:
enum Material
{
Transparent,
AcousticCeilingTiles,
BrickBare,
BrickPainted,
ConcreteBlockCoarse,
ConcreteBlockPainted,
CurtainHeavy,
FiberGlassInsulation,
GlassThin,
GlassThick,
Grass,
LinoleumOnConcrete,
Marble,
Metal,
ParquetOnConcrete,
PlasterRough,
PlasterSmooth,
PlywoodPanel,
PolishedConcreteOrTile,
Sheetrock,
WaterOrIceSurface,
WoodCeiling,
WoodPanel,
UniformMaterial,
};
enum Wall
{
LeftWall,
RightWall,
Floor,
Ceiling,
FrontWall,
BackWall,
};
explicit QAudioRoom(QAudioEngine *engine);
virtual ~QAudioRoom();
void setPosition(QVector3D pos);
QVector3D position() const;
void setDimensions(QVector3D dim);
QVector3D dimensions() const;
void setRotation(const QQuaternion &q);
QQuaternion rotation() const;
void setWallMaterial(QAudioRoom::Wall wall, QAudioRoom::Material material);
QAudioRoom::Material wallMaterial(QAudioRoom::Wall wall) const;
void setReflectionGain(float factor);
float reflectionGain() const;
void setReverbGain(float factor);
float reverbGain() const;
void setReverbTime(float factor);
float reverbTime() const;
void setReverbBrightness(float factor);
float reverbBrightness() const;
signals:
void positionChanged();
void dimensionsChanged();
void rotationChanged();
void wallsChanged();
void reflectionGainChanged();
void reverbGainChanged();
void reverbTimeChanged();
void reverbBrightnessChanged();
};
%End

View File

@@ -0,0 +1,99 @@
// qspatialsound.sip generated by MetaSIP
//
// This file is part of the QtSpatialAudio Python extension module.
//
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt6.
//
// This file may be used under the terms of the GNU General Public License
// version 3.0 as published by the Free Software Foundation and appearing in
// the file LICENSE included in the packaging of this file. Please review the
// following information to ensure the GNU General Public License version 3.0
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
//
// If you do not wish to use this file under the terms of the GPL version 3.0
// then you may purchase a commercial license. For more information contact
// info@riverbankcomputing.com.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
%If (Qt_6_5_0 -)
class QSpatialSound : public QObject
{
%TypeHeaderCode
#include <qspatialsound.h>
%End
public:
enum class DistanceModel
{
Logarithmic,
Linear,
ManualAttenuation,
};
enum Loops
{
Infinite,
Once,
};
explicit QSpatialSound(QAudioEngine *engine);
virtual ~QSpatialSound();
void setSource(const QUrl &url);
QUrl source() const;
int loops() const;
void setLoops(int loops);
bool autoPlay() const;
void setAutoPlay(bool autoPlay);
void setPosition(QVector3D pos);
QVector3D position() const;
void setRotation(const QQuaternion &q);
QQuaternion rotation() const;
void setVolume(float volume);
float volume() const;
void setDistanceModel(QSpatialSound::DistanceModel model);
QSpatialSound::DistanceModel distanceModel() const;
void setSize(float size);
float size() const;
void setDistanceCutoff(float cutoff);
float distanceCutoff() const;
void setManualAttenuation(float attenuation);
float manualAttenuation() const;
void setOcclusionIntensity(float occlusion);
float occlusionIntensity() const;
void setDirectivity(float alpha);
float directivity() const;
void setDirectivityOrder(float alpha);
float directivityOrder() const;
void setNearFieldGain(float gain);
float nearFieldGain() const;
QAudioEngine *engine() const;
signals:
void sourceChanged();
void loopsChanged();
void autoPlayChanged();
void positionChanged();
void rotationChanged();
void volumeChanged();
void distanceModelChanged();
void sizeChanged();
void distanceCutoffChanged();
void manualAttenuationChanged();
void occlusionIntensityChanged();
void directivityChanged();
void directivityOrderChanged();
void nearFieldGainChanged();
public slots:
void play();
void pause();
void stop();
};
%End