Results 1 to 6 of 6

Thread: Save QAudioRecorder to QByteArray

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default Re: Save QAudioRecorder to QByteArray

    I tried using the code you posted to save the QByteArray to a file. I get an error, "Windows Media Player cannot play this file."
    edit: I did some testing and it saves the microphone data, but it didn't use the codec from the QAudioRecorder.
    Last edited by vanillac; 27th March 2015 at 20:39.

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Save QAudioRecorder to QByteArray

    If you want to write to a file, then converting into a byte array is just an unnecessary step, you can directly write the "const char*" data into the file.

    Cheers,
    _

Similar Threads

  1. Replies: 6
    Last Post: 14th May 2014, 12:14
  2. Replies: 4
    Last Post: 29th May 2012, 23:37
  3. Save and restore QByteArray in mysql database
    By ruben.rodrigues in forum Newbie
    Replies: 0
    Last Post: 9th August 2010, 09:43
  4. Save 4 Integers in a QByteArray without memcpy
    By GonzoFist in forum Newbie
    Replies: 3
    Last Post: 17th May 2010, 23:15
  5. Replies: 9
    Last Post: 25th July 2009, 13:27

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.