Author Topic: bass_enc & Unicode  (Read 1263 times)

firemen

  • Posts: 151
bass_enc & Unicode
« on: 14 Apr '10 - 08:52 »
your sample RecTest

in Delphi 2007 work OK.
in Delphi 2010:

  if (BASS_Encode_Start(rchan, commands[encoder], BASS_ENCODE_AUTOFREE {$IFDEF UNICODE} or BASS_UNICODE {$ENDIF}, nil, 0) = 0)

Access 'kernel32'

work only if delete BASS_UNICODE and change
  commands: array[0..1] of PAnsiChar = (...
and BASSenc - function BASS_Encode_Start(handle:DWORD; cmdline:PAnsiChar; ...

how to get to work with unicode ?

Xire

  • Posts: 274
Re: bass_enc & Unicode
« Reply #1 on: 14 Apr '10 - 11:59 »
Just use widestring and it will work for d2007 and 2010 ;)

var
  commands: WideString;
begin
commands := 'lame.exe -b320 -';
if (BASS_Encode_Start(rchan, PWideChar(commands), BASS_ENCODE_AUTOFREE or BASS_UNICODE, nil, 0) = 0)
...



firemen

  • Posts: 151
Re: bass_enc & Unicode
« Reply #2 on: 14 Apr '10 - 12:01 »
thanks  ;)