xlang v4.0 Release
程序设计语言基础库文档
载入中...
搜索中...
未找到
QAudioDeviceInfo.x
浏览该文件的文档.
1//xlang Source, Name:qt5/multimedia/QAudioDeviceInfo.x
2//Date: Sat Mar 02:19:58 2021
3package Qt{
4 @SuppressWarnings public class QAudioDeviceInfo : QCore{
5
6 private QAudioDeviceInfo(long h){
7 super(h);
8 }
9
10 public bool isNull() {
11 return QtXnl.widget_get_bool_value(nativehandle, Constant.QAUDIODEVICEINFO_ISNULL);
12 }
13
14 public String deviceName() {
15 return (String)QtXnl.core_getString(nativehandle, Constant.QAUDIODEVICEINFO_NAME);
16 }
17
18 public bool isFormatSupported(QAudioFormat format) {
19 return QtXnl.core_getintlong(nativehandle, Constant.QAUDIODEVICEINFO_ISFORMATSUPPORTED, format.nativehandle) != 0;
20 }
21
22 public QAudioFormat preferredFormat() {
23 return new QAudioFormat(QtXnl.long_get(nativehandle, Constant.QAUDIODEVICEINFO_PREFERREDFORMAT));
24 }
25
26 public QAudioFormat nearestFormat(QAudioFormat format) {
27 return new QAudioFormat(QtXnl.object_get_long_int(nativehandle, Constant.QAUDIODEVICEINFO_NEARESTFORMAT, format.nativehandle, 0));
28 }
29
31 return (String[])QtXnl.core_getString(nativehandle, Constant.QAUDIODEVICEINFO_SUPPORTEDCODECS);
32 }
33
34 public int[] supportedSampleRates() {
35 return (int[])QtXnl.core_getString(nativehandle, Constant.QAUDIODEVICEINFO_SUPPORTEDSAMPLERATES);
36 }
37
38 public int[] supportedChannelCounts() {
39 return (int[])QtXnl.core_getString(nativehandle, Constant.QAUDIODEVICEINFO_SUPPORTEDCHANNELCOUNTS);
40 }
41
42 public int[] supportedSampleSizes() {
43 return (int[])QtXnl.core_getString(nativehandle, Constant.QAUDIODEVICEINFO_SUPPORTEDSAMPLESIZES);
44 }
45
46 public int supportedByteOrders() {
47 return QtXnl.widget_get_int_value(nativehandle, Constant.QAUDIODEVICEINFO_SUPPORTEDBYTEORDERS);
48 }
49
50 public QAudioFormat.SampleType [] supportedSampleTypes() {
51 return (QAudioFormat.SampleType[])QtXnl.core_getString(nativehandle, Constant.QAUDIODEVICEINFO_SUPPORTEDSAMPLETYPES);
52 }
53
54 public static QAudioDeviceInfo defaultInputDevice(){
55 return new QAudioDeviceInfo(QtXnl.long_get(0, Constant.QAUDIODEVICEINFO_DEFAULTINPUTDEVICE));
56 }
57
58 public static QAudioDeviceInfo defaultOutputDevice(){
59 return new QAudioDeviceInfo(QtXnl.long_get(0, Constant.QAUDIODEVICEINFO_DEFAULTOUTPUTDEVICE));
60 }
61
62 public static QAudioDeviceInfo[] availableDevices(QAudio.Mode mode){
63 long [] ha = (long []) QtXnl.object_get_handle(0l, Constant.QAUDIODEVICEINFO_AVAILABLEDEVICES, mode);
64 if (ha != nilptr){
65 QAudioDeviceInfo[] qai = new QAudioDeviceInfo[ha.length];
66 for (int i = 0; i < ha.length; i++){
67 qai[i] = new QAudioDeviceInfo(ha[i]);
68 }
69 return qai;
70 }
71 return nilptr;
72 }
73
74 public void finalize(){
75 QtXnl.widget_slot(nativehandle, Constant.QAUDIODEVICEINFO_FINALIZE);
76 }
77 };
78};
QAudioFormat.SampleType [] supportedSampleTypes()
static QAudioDeviceInfo defaultInputDevice()
static QAudioDeviceInfo defaultOutputDevice()
bool isFormatSupported(QAudioFormat format)
QAudioFormat preferredFormat()
String [] supportedCodecs()
int [] supportedSampleRates()
int [] supportedChannelCounts()
int [] supportedSampleSizes()
static QAudioDeviceInfo [] availableDevices(QAudio.Mode mode)
QAudioFormat nearestFormat(QAudioFormat format)
字符串类