The output displays as follows: device_name: "Microphone (High Definition Aud"Ĭodec: "audio/pcm" sampleRate : 11025 sampleSize: 8 channel Count: 1 sample type: 1 byteOrder: 1ĭefault format not supported, try to use nearest format If(audioInput->error() != QAudio::NoError) Void mikeDemoClass::handleAudioInputState(QAudio::State state) QDebug() device_list = QAudioDeviceInfo::availableDevices(QAudio::AudioInput) QTextDocument *textDoc = new QTextDocument(FileName) īool status = recordFile->open(QIODevice::WriteOnly) QString FileName = QFileDialog::getSaveFileName(this, tr("Browse Files"), "D:/", tr("Media Files (*.raw)")) MikeDemoClass::mikeDemoClass(QWidget *parent, Qt::WFlags flags)Ĭonnect(ui.browseButton,SIGNAL(clicked()),this,SLOT(browseFiles())) Ĭonnect(ui.recordingButton,SIGNAL(clicked()), this,SLOT(startRecording())) Void handleAudioInputState(QAudio::State) MikeDemoClass(QWidget *parent = 0, Qt::WFlags flags = 0) I suspect the QAudioInput is not able to read audio data from microphone.Ĭould you please help me find mistakes in my code? `class mikeDemoClass : public QWidget The output window shows bytesReady as 0 in my case everytime. My code gets perfectly compiled, I also get a file in the specifed location with 80KB size, but the file doesn't play with windows media player even if saved as a. Even if the audio state is QAudio::ActiveState the bytesReady() shows 0 bytes implying that there are no audio bytes to read from the microphone. The issue is that QAudioInput has a method bytesReady() which always returns 0 in my case. Try closing any applications running in the background such as web browsers and streaming apps, then restart Cakewalk by BandLab.I am trying to record audio from the default microphone present in my desktop and store it in QFile.įinally I want to play the recorded file using windows media player. Your audio playback device may also be in use by another program.Make sure only one audio device is in use from this category, then click Apply and OK to save the changes. This can be found in Edit > Preferences > Audio > Devices. If you are using an audio interface but also have your internal sound card enabled, try disabling the drivers for your internal sound card in Cakewalk’s preferences menu.You can also verify the proper bit depth in Edit > Preferences > Audio > Driver Settings You can use the devices software or physical switches (if applicable) to match these settings. The sample rate of your project should be displayed in the Transport module of the Control Bar. If this issue is exclusive to previously recorded projects, it’s likely your projects were recorded in a different sample rate than what your interface or sound card is currently set to. Check if this error only happens with previously created projects or if it also happens with new projects.Here are some troubleshooting tips to help clear this message, and avoid it in the future: If you’re using an audio interface, it may be helpful to ensure you’re using the latest version of Cakewalk by BandLab, then reinstall the latest drivers from the manufacturer. This error may appear if there is an issue with the configuration of your audio playback device.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |