Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. 3rd Party Software
  4. Recording Audio With openAl and aac
QtWS25 Last Chance

Recording Audio With openAl and aac

Scheduled Pinned Locked Moved Unsolved 3rd Party Software
4 Posts 2 Posters 975 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mahd96
    wrote on last edited by
    #1

    i tried to capture audio frames with openAll and decode them via aac .
    it works fine in Mac-Linux but not in windows!(they are faster by 30%!!!)

    is there any flag that i forget to set?

    these are my aac configuratiuon

    if (aacEncOpen(&aacHandle, 0,this->channelCount) != AACENC_OK) {
        fprintf(stderr, "Unable to open encoder\n");
        return false;
    }
    if (aacEncoder_SetParam(aacHandle, AACENC_AOT, 2) != AACENC_OK) {
        fprintf(stderr, "Unable to set the AOT\n");
        return false;
    }
    if (aacEncoder_SetParam(aacHandle, AACENC_SAMPLERATE,this->sampleRate) != AACENC_OK) {
        fprintf(stderr, "Unable to set the Sample Rate\n");
        return false;
    }
    if (aacEncoder_SetParam(aacHandle, AACENC_CHANNELMODE, channelMode) != AACENC_OK) {
        fprintf(stderr, "Unable to set the channel mode\n");
        return false;
    }
    if (aacEncoder_SetParam(aacHandle, AACENC_CHANNELORDER, 1) != AACENC_OK) {
        fprintf(stderr, "Unable to set the wav channel order\n");
        return false;
    }
    if (aacEncoder_SetParam(aacHandle, AACENC_BITRATE, this->bitRate) != AACENC_OK) {
        fprintf(stderr, "Unable to set the bitrate\n");
        return false;
    }
    if (aacEncoder_SetParam(aacHandle, AACENC_TRANSMUX, 2) != AACENC_OK) {
        fprintf(stderr, "Unable to set the ADTS transmux\n");
        return false;
    }
    if (aacEncoder_SetParam(aacHandle, AACENC_AFTERBURNER, 1) != AACENC_OK) {
        fprintf(stderr, "Unable to set the afterburner mode\n");
        return false;
    }
    if (aacEncEncode(aacHandle, NULL, NULL, NULL, NULL) != AACENC_OK) {
        fprintf(stderr, "Unable to initialize the encoder\n");
        return false;
    }
    aacInfo= { 0 };
    if (aacEncInfo(aacHandle, &aacInfo) != AACENC_OK) {
        fprintf(stderr, "Unable to get the encoder info\n");
        return false;
    }
    
    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      You're here on a Qt forum. That's a question better asked to the OpenAL folks.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • M Offline
        M Offline
        mahd96
        wrote on last edited by mahd96
        #3

        it's a combination of openAl and AAC that compilled and run correctly on Mac/Linux with Qt but not in windows.
        i thought it might be a platform-dependency problem that Qt folks better know it!!

        and i am not sure the problem is with openal! it might be aac

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          What library are you using for the encoding ? And again, that's a question better asked to the author of the library.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved