qsoundeffect.sip 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. // qsoundeffect.sip generated by MetaSIP
  2. //
  3. // This file is part of the QtMultimedia 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_2_0 -)
  22. class QSoundEffect : public QObject
  23. {
  24. %TypeHeaderCode
  25. #include <qsoundeffect.h>
  26. %End
  27. public:
  28. enum Loop
  29. {
  30. Infinite,
  31. };
  32. enum Status
  33. {
  34. Null,
  35. Loading,
  36. Ready,
  37. Error,
  38. };
  39. QSoundEffect(const QAudioDevice &audioDevice, QObject *parent /TransferThis/ = 0);
  40. explicit QSoundEffect(QObject *parent /TransferThis/ = 0);
  41. virtual ~QSoundEffect();
  42. static QStringList supportedMimeTypes();
  43. QAudioDevice audioDevice();
  44. void setAudioDevice(const QAudioDevice &device);
  45. QUrl source() const;
  46. void setSource(const QUrl &url);
  47. int loopCount() const;
  48. int loopsRemaining() const;
  49. void setLoopCount(int loopCount);
  50. float volume() const;
  51. void setVolume(float volume);
  52. bool isMuted() const;
  53. void setMuted(bool muted);
  54. bool isLoaded() const;
  55. bool isPlaying() const;
  56. QSoundEffect::Status status() const;
  57. public slots:
  58. void play();
  59. void stop();
  60. signals:
  61. void audioDeviceChanged();
  62. void sourceChanged();
  63. void loopCountChanged();
  64. void loopsRemainingChanged();
  65. void volumeChanged();
  66. void mutedChanged();
  67. void loadedChanged();
  68. void playingChanged();
  69. void statusChanged();
  70. };
  71. %End