Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Recording Audio With openAl and aac



  • 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;
    }

  • Lifetime Qt Champion

    Hi,

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



  • 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


  • Lifetime Qt Champion

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


Log in to reply