I get an error:

mp3encoder.cpp: In method `int MP3Encoder::GetFormat (char *, int)':
mp3encoder.cpp:63: `mp3extra' undeclared (first use this function)
mp3encoder.cpp:63: (Each undeclared identifier is reported only once 

Did you patch a newer version?

--Tom

----- Original Message ----- 
From: "Eugene Kuznetsov" <[EMAIL PROTECTED]>
To: "Thomas Hargrove" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, May 17, 2001 3:26 PM
Subject: Re[2]: [Avifile]AVI audio header problem with MP3


> Hello Thomas,
> 
> Sunday, July 01, 2001, 4:32:18 PM, you wrote:
> 
> TH> I am using 0.53.5.
> 
> TH> Thanks for looking into this.
> 
> Try this patch ( apply it in lib/audioencoder directory ):
> 
> --- mp3encoder.cpp.old  Tue Oct 10 11:31:36 2000
> +++ mp3encoder.cpp      Thu May 17 15:18:43 2001
> @@ -8,7 +8,7 @@
>      in_fmt=*format;
>      lame_init(&gf);
>      gf.silent=1;
> -    gf.padding=1;
> +    gf.padding=2;
>      gf.VBR=0;
>      gf.in_samplerate=format->nSamplesPerSec;
>      gf.num_channels=format->nChannels;
> @@ -34,20 +34,39 @@
>      gf.quality=quality;
>      return 0;
>  }
> +struct __attribute__((__packed__)) strf_mp3 
> +{
> +        short wID;
> +        int fdwFlags;
> +        short  nBlockSize;
> +        short  nFramesPerBlock;
> +        short  nCodecDelay;
> +};
> +
>  int MP3Encoder::GetFormatSize()
>  {
> -    return 18;
> +    return 30;
>  }
>  int MP3Encoder::GetFormat(char* extension, int size)
>  {
> -    if(size<18)return -1;
> +    if(size<30)return -1;
>      WAVEFORMATEX wf;
>      memcpy(&wf, &in_fmt, 18);
>      wf.wFormatTag=0x55;
>      wf.nAvgBytesPerSec=gf.brate*125;
>      wf.nBlockAlign=1;
> -    wf.cbSize=0;
> +    wf.wBitsPerSample=0;
> +    wf.cbSize=12;
>      memcpy(extension, &wf, 18);
> +    
> +    lame_init_params(&gf);
> +    mp3extra.wID             = 1;        //
> +    mp3extra.fdwFlags        = 2;        // These values
> +    mp3extra.nBlockSize      = gf.framesize;      // based on an
> +    mp3extra.nFramesPerBlock = 1;        // old Usenet post!!
> +    mp3extra.nCodecDelay     = 1393;     //
> +    memcpy(extension+18, &mp3extra, 12); 
> +
>      return 0;
>  }
>  int MP3Encoder::Start()
> 
> 
> 
> -- 
> Best regards,
>  Eugene
> mailto:[EMAIL PROTECTED] or [EMAIL PROTECTED]
> [Team GADGET]  [Team Two Divided By Zero]  [Team Hackzone.ru]
> 
> 
> 
> _______________________________________________
> Avifile mailing list
> [EMAIL PROTECTED]
> http://prak.org/mailman/listinfo/avifile
> 


_______________________________________________
Avifile mailing list
[EMAIL PROTECTED]
http://prak.org/mailman/listinfo/avifile

Reply via email to