qspatialsound.sip 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. // qspatialsound.sip generated by MetaSIP
  2. //
  3. // This file is part of the QtSpatialAudio Python extension module.
  4. //
  5. // Copyright (c) 2026 Riverbank Computing Limited <info@riverbankcomputing.com>
  6. //
  7. // This file is part of PyQt6.
  8. //
  9. // This file may be used under the terms of the GNU General Public License
  10. // version 3.0 as published by the Free Software Foundation and appearing in
  11. // the file LICENSE included in the packaging of this file. Please review the
  12. // following information to ensure the GNU General Public License version 3.0
  13. // requirements will be met: http://www.gnu.org/copyleft/gpl.html.
  14. //
  15. // If you do not wish to use this file under the terms of the GPL version 3.0
  16. // then you may purchase a commercial license. For more information contact
  17. // info@riverbankcomputing.com.
  18. //
  19. // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
  20. // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  21. %If (Qt_6_5_0 -)
  22. class QSpatialSound : public QObject
  23. {
  24. %TypeHeaderCode
  25. #include <qspatialsound.h>
  26. %End
  27. public:
  28. enum class DistanceModel
  29. {
  30. Logarithmic,
  31. Linear,
  32. ManualAttenuation,
  33. };
  34. enum Loops
  35. {
  36. Infinite,
  37. Once,
  38. };
  39. explicit QSpatialSound(QAudioEngine *engine);
  40. virtual ~QSpatialSound();
  41. void setSource(const QUrl &url);
  42. QUrl source() const;
  43. int loops() const;
  44. void setLoops(int loops);
  45. bool autoPlay() const;
  46. void setAutoPlay(bool autoPlay);
  47. void setPosition(QVector3D pos);
  48. QVector3D position() const;
  49. void setRotation(const QQuaternion &q);
  50. QQuaternion rotation() const;
  51. void setVolume(float volume);
  52. float volume() const;
  53. void setDistanceModel(QSpatialSound::DistanceModel model);
  54. QSpatialSound::DistanceModel distanceModel() const;
  55. void setSize(float size);
  56. float size() const;
  57. void setDistanceCutoff(float cutoff);
  58. float distanceCutoff() const;
  59. void setManualAttenuation(float attenuation);
  60. float manualAttenuation() const;
  61. void setOcclusionIntensity(float occlusion);
  62. float occlusionIntensity() const;
  63. void setDirectivity(float alpha);
  64. float directivity() const;
  65. void setDirectivityOrder(float alpha);
  66. float directivityOrder() const;
  67. void setNearFieldGain(float gain);
  68. float nearFieldGain() const;
  69. QAudioEngine *engine() const;
  70. signals:
  71. void sourceChanged();
  72. void loopsChanged();
  73. void autoPlayChanged();
  74. void positionChanged();
  75. void rotationChanged();
  76. void volumeChanged();
  77. void distanceModelChanged();
  78. void sizeChanged();
  79. void distanceCutoffChanged();
  80. void manualAttenuationChanged();
  81. void occlusionIntensityChanged();
  82. void directivityChanged();
  83. void directivityOrderChanged();
  84. void nearFieldGainChanged();
  85. public slots:
  86. void play();
  87. void pause();
  88. void stop();
  89. };
  90. %End