summaryrefslogtreecommitdiffstats
path: root/tests/QtMultimedia
diff options
context:
space:
mode:
Diffstat (limited to 'tests/QtMultimedia')
-rw-r--r--tests/QtMultimedia/CMakeLists.txt1
-rw-r--r--tests/QtMultimedia/audio_test.py32
2 files changed, 33 insertions, 0 deletions
diff --git a/tests/QtMultimedia/CMakeLists.txt b/tests/QtMultimedia/CMakeLists.txt
new file mode 100644
index 0000000..62150eb
--- /dev/null
+++ b/tests/QtMultimedia/CMakeLists.txt
@@ -0,0 +1 @@
+PYSIDE_TEST(audio_test.py)
diff --git a/tests/QtMultimedia/audio_test.py b/tests/QtMultimedia/audio_test.py
new file mode 100644
index 0000000..04d0a1e
--- /dev/null
+++ b/tests/QtMultimedia/audio_test.py
@@ -0,0 +1,32 @@
+
+'''Test cases for QHttp'''
+
+import unittest
+
+from PySide.QtCore import *
+from PySide.QtMultimedia import *
+
+class testAudioDevices(unittest.TestCase):
+
+ def testListDevices(self):
+ for devInfo in QAudioDeviceInfo.availableDevices(QAudio.AudioOutput):
+ fmt = QAudioFormat()
+ for codec in devInfo.supportedCodecs():
+ fmt.setCodec(codec)
+ for frequency in devInfo.supportedFrequencies():
+ fmt.setFrequency(frequency)
+ for channels in devInfo.supportedChannels():
+ fmt.setChannels(channels)
+ for sampleType in devInfo.supportedSampleTypes():
+ fmt.setSampleType(sampleType)
+ for sampleSize in devInfo.supportedSampleSizes():
+ fmt.setSampleSize(sampleSize)
+ for endian in devInfo.supportedByteOrders():
+ fmt.setByteOrder(endian)
+ if devInfo.isFormatSupported(fmt):
+ return
+ self.assert_(False)
+
+
+if __name__ == '__main__':
+ unittest.main()