#1 Burning Software

It is currently Thu Apr 18, 2024 10:57 pm

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Mp3 Conversion failure
PostPosted: Fri May 21, 2010 2:12 am 
Offline

Joined: Tue Oct 31, 2006 12:25 am
Posts: 43
Hi

(Delphi 2007, StarBurn 12.0.0.272)

I am attempting to convert Wav files to MP3 using a function that can be simplified as follows:
Code:
function ConvertWavToMp3File(const sSourceFilename : string;
                             const sDestFilename : string;
                             const sTempFolder: string;
                             const bVerbose: Boolean = True
                             ): Boolean;
const
  MP3_Conversion_Mode    = STARBURN_STARWAVE2_MP3_MODE0 { CBR };
  MP3_Bit_Rate           = 128;
  MP3_Conversion_Quality = STARBURN_STARWAVE2_QM_STANDARD;
var         
  l__ULONG__Status : DWORD;   
  l__CHAR__ExceptionText : Packed Array[ 1..1024 ] Of Char; 
  sbException: EXCEPTION_NUMBER;
  l__STARBURN_STARWAVE2_INIT_PARAMS: STARBURN_STARWAVE2_INIT_PARAMS;
begin     
  result := True;
  try
    ZeroMemory(@l__CHAR__ExceptionText, sizeof( l__CHAR__ExceptionText));        
    ZeroMemory(@l__STARBURN_STARWAVE2_INIT_PARAMS, sizeof( l__STARBURN_STARWAVE2_INIT_PARAMS ));
     
    l__STARBURN_STARWAVE2_INIT_PARAMS.m__STARBURN_STARWAVE2_CONVERSION_MODE := MP3_Conversion_Mode;
    l__STARBURN_STARWAVE2_INIT_PARAMS.m__LONG__nominalBitrate               := MP3_Bit_Rate * 1000;
    l__STARBURN_STARWAVE2_INIT_PARAMS.m__STARBURN_STARWAVE2_QUALITY_MODE    := MP3_Conversion_Quality;

    sbException := StarBurn_StarWave2_EncodeMP3OGGFromWAV(PChar(sSourceFilename),
                                                          PChar(sDestFilename),
                                                          @l__STARBURN_STARWAVE2_INIT_PARAMS,
                                                          CompressProgressCallback,
                                                          nil,
                                                          PCHAR( @l__CHAR__ExceptionText[1] ),
                                                          sizeof( l__CHAR__ExceptionText ),
                                                          l__ULONG__Status);

    if (sbException <> EN_SUCCESS) then
      raise Exception.create('Audio compression error: ' + PAnsiChar(@l__CHAR__ExceptionText[1]));

  except
    ...
  end;
end;


However i consistently receive the error:

'CStarWave2_EncoderMp3::Init(): failed! Error text: 'nlame_init_params() failed', Error code = -1'


However i am able to convert using the same files and parameters with the AudioCompressor.exe demo without any problem.

Can you give me any hints as to possible causes for the error.



As the log is short I will include it in situ:
Code:
StarBurn:StarBurn_StarWave2_EncodeMP3OGGFromWAV(): ENTERed for C:\Users\ABC\AppData\Local\Temp\convert_3.wav, D:\Testing_Other\ABC\Fun_8.mp3, 0x0018E4C1, 0x006F5B44, 0x00000000, 0x0018E4DB, 1024, 0x0018E8E8
CStarWave2_EncoderGeneric::PreInit(): ENTERed.
CStarWave2_EncoderGeneric::PreInit(): EXITing with success.

StarBurn:StarBurn_StarWave2_EncodeMP3OGGFromWAV(): ->PreInit(...) returned 1
CStarWave2_EncoderMp3::Init(): ENTERed.
CStarWave2_EncoderGeneric::LoadDll(): ENTERed. Dll name: 'nlame.dll'
CStarWave2_EncoderGeneric::LoadDll(): EXITing with success.
CStarWave2_EncoderMp3::Init(): failed! Error text: 'nlame_init_params() failed', Error code = -1
CStarWave2_EncoderMP3::Init(): EXITing with failure!

StarBurn:StarBurn_StarWave2_EncodeMP3OGGFromWAV(): ->Init(...) returned 0
CStarWave2_EncoderMp3::CleanUp(): ENTERed.
CStarWave2_EncoderGeneric::UnloadDll(): ENTERed.
CStarWave2_EncoderGeneric::UnloadDll(): EXITing with success.
CStarWave2_EncoderMp3::CleanUp(): EXITing with success.
CStarWave2_EncoderGeneric::CleanUp(): ENTERed.
CStarWave2_EncoderGeneric::CleanUp(): EXITing with success.

StarBurn:StarBurn_StarWave2_EncodeMP3OGGFromWAV(): EXITing with failure!


Top
 Profile  
 
 Post subject: Re: Mp3 Conversion failure
PostPosted: Tue May 25, 2010 10:51 pm 
Offline

Joined: Tue Oct 31, 2006 12:25 am
Posts: 43
I should mention that there is not a Delphi demo showing MP3 conversion, so my code is converted from a C console example.


Top
 Profile  
 
 Post subject: Re: Mp3 Conversion failure
PostPosted: Wed May 26, 2010 3:19 pm 
Offline

Joined: Fri Jan 26, 2007 4:31 pm
Posts: 452
Hello,

Please send me full source code of your sample, I'm trying to reproduce and to determine what is the problem?

P.S.
Contact email I sent to you in private message.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 10 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group