Welcome Guest ( Log In | Register )

libfaac encoding problem, libfaac gets me weird output
post Jan 15 2013, 13:01
Post #1

Group: Members
Posts: 3
Joined: 7-January 13
Member No.: 105674

I'm making a C++ program that recordes audio from microphone and encodes it to MPEG4 MAIN AAC file . I made a function for encoding to AAC using libfaac and i got weird output file.I don't know what i'm doing wrong .Could you tell me what's wrong in my function.This is my RAW PCM 16-bit file File and this is output file File
Here's my code.
static void encodeAac( const char *infilename,const char *filename)
    faacEncHandle codec;
    faacEncConfigurationPtr conf;
    SAMPLE* samples;
    uint8_t*    outbuf;
    unsigned long* one;
    unsigned long* two;
    int outsize;

    one=new unsigned long;
    two = new unsigned long;
        error("Something went wrong");
    FILE *f = fopen(filename, "wb");
    FILE *fin=fopen(infilename,"rb");
    if (!fin) {
        error("could not open temporary file");
    if (!f) {
        error("could not open output file");
    samples = new SAMPLE[*one];
    outbuf = new uint8_t[*two];
    while(outsize != 0){
    delete outbuf;
    delete samples;

Go to the top of the page
+Quote Post

Posts in this topic

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:


RSS Lo-Fi Version Time is now: 30th November 2015 - 15:01