Write your question here.
I am using Qt Creator for my C++ program. I have multiple of usb sound card connected to my system and i want to record one certain signal for each sound card. How will I call the name of my USB sound card to work properly without having a dropdown list box on my gui. Direct assigning of sound card is what i am after. Thanks a lot!
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
QString str1 = ui->lineEdit_8->text();
QString filename = str1 ;
QString Nfile = "N";
QString Nfilename = filename + Nfile;
audioRecorder = new QAudioRecorder(this);
QAudioEncoderSettings audioSettings;
audioSettings.setCodec("wav");
audioSettings.setQuality(QMultimedia::HighQuality);
QString input1 = "USB Pnp Sound Device";
audioRecorder->setAudioInput(input1); // set input device 1(doesn't select USB Pnp Sound)
audioRecorder->setEncodingSettings(audioSettings);
audioRecorder->setOutputLocation(QUrl::fromLocalFile(filename));
audioRecorder->record();
QString input2 = "USB Audio Device";
noiseRecorder = new QAudioRecorder(this);
noiseRecorder->setAudioInput(input2); // same goes with this
noiseRecorder->setEncodingSettings(audioSettings);
noiseRecorder->setOutputLocation(QUrl::fromLocalFile(Nfilename));
noiseRecorder->record(
"//" is the part where i got a wrong syntax to call the device name of the usb sound card.