Author Topic: lame osx encoder executable  (Read 1062 times)

Salvo

  • Posts: 111
lame osx encoder executable
« on: 10 Dec '19 - 21:55 »
Who can tell me where to find an executable encoder LAME for 64 Bit OSx?

Ian @ un4seen

  • Administrator
  • Posts: 22959
Re: lame osx encoder executable
« Reply #1 on: 11 Dec '19 - 15:16 »
OSX builds of LAME are available here:

   www.rarewares.org/mp3-lame-bundle.php

If you're planning to use MP3 encoding with BASS then another option is to use the BASSenc_MP3 add-on (which is based on LAME).

Salvo

  • Posts: 111
Re: lame osx encoder executable
« Reply #2 on: 15 Dec '19 - 16:37 »
Sorry Ian but I can't get it to work.
this is the code for OSX 64bit Catalina:

var
  t, handle_1, chanE: DWORD;
  c: Cardinal;
  Buf: PSmallInt;
  dwSamples, dwBufferSize, dwGet, nw: DWORD;

chanE := BASS_StreamCreateFile(False, PChar(Nomefile), 0, 0, BASS_STREAM_DECODE or BASS_UNICODE);
if chanE = 0 then
    exit;
chanE := BASS_FX_TempoCreate(chanE, BASS_STREAM_DECODE or BASS_FX_FREESOURCE);

  dwSamples := freq;
  dwBufferSize := 10000;
  Buf := AllocMem(dwSamples * sizeof(SmallInt));
  handle_1 := BASS_Encode_MP3_StartFile(chanE, '-b 128',BASS_UNICODE or BASS_ENCODE_AUTOFREE, PChar(DM1.PathB + 'tempxx'));
//->>>>so far everything is ok.

 t := Bass_ChannelGetLength(chanE, BASS_POS_BYTE);
  dwGet := 0;
  ProgressBar1.Value := 0;

  while BASS_ChannelIsActive(chanE) > 0 do
  begin
    c := BASS_ChannelGetPosition(chanE, BASS_POS_BYTE); { current position }
 error->>>>>>>>>>>   BASS_ChannelGetData(chanE, Buf, dwSamples * sizeof(SmallInt));
  end;

Why ???
« Last Edit: 15 Dec '19 - 17:13 by Salvo »

Salvo

  • Posts: 111
Re: lame osx encoder executable
« Reply #3 on: 15 Dec '19 - 17:12 »
Ian found the error.
I changed :
Buf: PInteger;
and
Buf: = AllocMem (dwSamples * sizeof (Integer));
and
BASS_ChannelGetData (chanE, Buf, dwSamples * sizeof (Integer));