Home > Mobile >  Using QAudioRecorder recording function, but not to generate audio files in the Linux development bo
Using QAudioRecorder recording function, but not to generate audio files in the Linux development bo

Time:05-09

Ladies and gentlemen, ask a question,
I want to implement using QAudioRecorder recording function,
The following code, write a Demo, can run in the ubuntu, after cross-compilation can also run the development board,
Voice file directory under the/workspace,
So simple code that can be generated under ubuntu y111. Wav,
In the development board no this file


#include
#include
#include
#include
Int main (int arg c, char * argv [])
{
QCoreApplication a (arg c, argv);

QAudioRecorder * m_pAudioRecorder=new QAudioRecorder ();
QString fileName="/workspace/y111";
QDebug () & lt; & lt;" FileName: "& lt; M_pAudioRecorder - & gt; SetOutputLocation (QUrl: : fromLocalFile (fileName));
M_pAudioRecorder - & gt; Record ();


Return a.e xec ();
}
Hope bosses to give directions, do not understand why, thank you very much

CodePudding user response:

Use command line search to see if the file

CodePudding user response:

reference 1/f, mango black response:
use command line search to see if the file


[root @ AM335X/] # find/-name y111. Wav
[root @ AM335X/] #

Who has examined the also does not have this file,

CodePudding user response:



Didn't abnormal running out, is not to come out the file

CodePudding user response:

I associated connect (m_pAudioRecorder, SIGNAL (error (QMediaRecorder: : error)), this, SLOT (displayErrorMessage ()));
To run a hint:
Error: "No input device available."
Is this reason caused no generated file?
Because the development board audio driver seemed to haven't do,
  •  Tags:  
  • Qt
  • Related