Results 1 to 2 of 2

Thread: How to solve problem for recording with QMediaRecorder?

  1. #1
    Join Date
    Jul 2012
    Posts
    21
    Thanks
    2
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Question How to solve problem for recording with QMediaRecorder?

    Hello everyone,

    I'm recording an audio file with extension(.mp3/.wav/.pcm). I'm using following code.
    Qt Code:
    1. QAudioCaptureSource *audiosource = new QAudioCaptureSource(this);
    2.  
    3. QMediaRecorder *capture = new QMediaRecorder(audiosource, this);
    4.  
    5. QString fileName =QFileDialog::getSaveFileName();
    6.  
    7. capture->setOutputLocation(QUrl(fileName));
    8.  
    9. outputLocationSet = true;
    10.  
    11. capture->record();
    To copy to clipboard, switch view to plain text mode 

    Now, while running on simulator, it is working fine. But on device the
    capture
    is storing the audio file with ".amr" extension automatically and while playing back it shows that the file is corrupted.

    Please check the code snippet and rectify my logic.

    Thank you in advance for your support.
    Satya.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,017 Times in 4,793 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How to solve problem for recording with QMediaRecorder?

    Did you check what is supported by QMediaRecorder on your device?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. mp3 audio recording
    By dhe in forum Qt Programming
    Replies: 1
    Last Post: 26th August 2012, 10:00
  2. Audio Recording in qt
    By BalaQT in forum Qt Programming
    Replies: 8
    Last Post: 12th September 2009, 09:01
  3. vary hard problem to solve
    By FS Lover in forum Newbie
    Replies: 3
    Last Post: 2nd July 2009, 09:26
  4. How to solve this cc1plus: out of memory problem?
    By triperzonak in forum Qt Programming
    Replies: 2
    Last Post: 28th September 2008, 20:20
  5. Replies: 12
    Last Post: 3rd April 2006, 06:11

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.