Recent

Author Topic: LAZ-ACS doesn't compile under UBUNTU 64 bits 14.04  (Read 4110 times)

Jurassic Pork

  • Hero Member
  • *****
  • Posts: 1228
LAZ-ACS doesn't compile under UBUNTU 64 bits 14.04
« on: October 19, 2015, 05:37:26 am »
hello,
first thanks to serbod to work on Audio Components Suite for Lazarus/Delphi
the package compiles under windows 7 Lazarus 1.4.4 32 bits but under Ubuntu 64 bits 14.04  Lazarus 1.4  (fpc 2.6.4) i have some errors when i try to compile the package.

1 -  File acs_classes.pas
Code: Pascal  [Select][+][-]
  1.  { TAcsCircularAudioBuffer }
  2.  
  3.   TAcsCircularAudioBuffer = class(TAcsAudioBuffer)
  4.   protected
  5.     function GetByte(Index: Integer): Byte; override;
  6.     procedure SetByte(Index: Integer; AValue: Byte); override;
  7.     function GetSamplePtr(Index: Integer): Pointer; override;
  8.   public
  9.     function Read(var Buffer; Count: Longint): Longint; override;
  10.     function Write(const Buffer; Count: Longint): Longint; override;
  11.     { If Origin = soCurrent, then changed ReadPosition, otherwise changed WritePosition }
  12.     function Seek(const Offset: Int64; Origin: TSeekOrigin): Int64; override;
  13.     procedure SetSize(NewSize: PtrInt); override;
  14.   end;    
error on line 13 :
Quote
Compiling package laz_acs 3.0: Code de sortie 1, Erreurs : 1
acs_classes.pas(203,15) Error: function header doesn't match the previous declaration "TAcsCircularAudioBuffer.SetSize(Int64);"

2 - File ACS_procs.pas 
Code: Pascal  [Select][+][-]
  1. procedure LgMagnitude(InData: PAcsComplexArray; OutData: PAcsDoubleArray;
  2.   DataSize, Shift: Integer);
  3. {$ifdef CPU386}
  4. var
  5.   LogBase, num: Double;
  6.   pIn: PACSComplex;
  7.   pOut: PDouble;
  8.   i: integer;
  9. begin
  10.   {$R-}
  11.   //pIn:=@InData[0];
  12.   //pOut:=@OutData[0];
  13.   //LogBase:=1/log2(10); // 0.3010299956639812
  14.   for i:=0 to DataSize-1 do
  15.   begin
  16.     OutData[i]:=0;
  17.     num:=sqrt((InData[i].Re * 2) + (InData[i].Im * 2));
  18.     if num > 0 then
  19.     begin
  20.       num:=log10(num)+Shift;
  21.       if num >= 0 then OutData[i]:=num;
  22.     end;
  23.     //num:=num*log2(LogBase)+Shift;
  24.     //num:=LogBase*log2(num)+Shift;
  25.     //Inc(pIn);
  26.     //Inc(pOut);
  27.   end;
  28.   {$R+}
  29.  
  30. {$else}
  31.  
  32. var
  33.   LogBase: Double;
  34. begin
  35.  
  36.   asm
  37.               FLD1;               // st0 := 1.0
  38.               FLDL2T;             // st1 <- st0, st0 := log2(10)
  39.               FDIVP ST(1), ST(0); // st0 := st1 / st0
  40.               FSTP LogBase;       // LogBas
error :
Quote
acs_procs.pas(330,24) Error: Unknown identifier "ST"

3 -  File acs_tags.pas line 1643 :
Code: Pascal  [Select][+][-]
  1.      finally
  2.         FileSeek(InFile, file_pos + get_tags_size(tags_info), FILE_BEGIN);
  3.       end;  
error :
Quote
acs_tags.pas(1643,9) Error: Can't determine which overloaded function to call

4 - File acs_flac.pas :
Code: Pascal  [Select][+][-]
  1.   begin
  2.       SetLength(S, Entry.length);
  3.       Move(Entry.entry^, S[1], Length(S));
  4.       SL.Add(String(S));
  5.       Inc(LongWord(Entry), SizeOf(FLAC__StreamMetadata_VorbisComment_Entry));
  6.     end;
error on line 5  :
Quote
acs_flac.pas(600,76) Error: Can't take the address of constant expressions

5 - File acs_vorbis.pas :
Code: Pascal  [Select][+][-]
  1.         Inc(LongWord(PComment), 4);  // !!! non-crossplatform      

error :
Quote
acs_vorbis.pas(563,34) Error: Can't take the address of constant expressions

6 - File acs_stdaudio.pas 
Code: Pascal  [Select][+][-]
  1. implementation
  2.  
  3. var
  4.   CrSecI, CrSecO: TCriticalSection;    
error :
Quote
acs_stdaudio.pas(132,19) Error: Identifier not found "TCriticalSection"

Friendly, J.P



« Last Edit: October 19, 2015, 05:44:59 am by Jurassic Pork »
Jurassic computer : Sinclair ZX81 - Zilog Z80A à 3,25 MHz - RAM 1 Ko - ROM 8 Ko

serbod

  • Full Member
  • ***
  • Posts: 142
Re: LAZ-ACS doesn't compile under UBUNTU 64 bits 14.04
« Reply #1 on: October 20, 2015, 08:45:01 pm »
the package compiles under windows 7 Lazarus 1.4.4 32 bits but under Ubuntu 64 bits 14.04  Lazarus 1.4  (fpc 2.6.4) i have some errors when i try to compile the package.

I fixed small bug for Linux x86, but don't have x64 to test. I'll try to setup a x64 Ubuntu under VirtualBox soon.

Jurassic Pork

  • Hero Member
  • *****
  • Posts: 1228
Re: LAZ-ACS doesn't compile under UBUNTU 64 bits 14.04
« Reply #2 on: October 20, 2015, 11:14:17 pm »
hello,
ok thanks serbod
Jurassic computer : Sinclair ZX81 - Zilog Z80A à 3,25 MHz - RAM 1 Ko - ROM 8 Ko

wp

  • Hero Member
  • *****
  • Posts: 11916
Re: LAZ-ACS doesn't compile under UBUNTU 64 bits 14.04
« Reply #3 on: October 20, 2015, 11:35:55 pm »
Has anybody tried to compile the demos recently? The lpr files are missing in almost every project folder (except for Demos/player).

Jurassic Pork

  • Hero Member
  • *****
  • Posts: 1228
Re: LAZ-ACS doesn't compile under UBUNTU 64 bits 14.04
« Reply #4 on: October 21, 2015, 12:42:56 am »
indeed, i have just tried player demo, in other demo projects, i can see only lpi file, no lpr file
Jurassic computer : Sinclair ZX81 - Zilog Z80A à 3,25 MHz - RAM 1 Ko - ROM 8 Ko

serbod

  • Full Member
  • ***
  • Posts: 142
Re: LAZ-ACS doesn't compile under UBUNTU 64 bits 14.04
« Reply #5 on: October 23, 2015, 11:00:59 pm »
I fix ACS errors under Ubuntu 14.4 x64. Demo projects remains from old 2.4 version, and probably not working.

Tested working demos:

AcsConsolePlayer - Minimal console audio player
audiodeck - Any input -> any output test, replace for 'converter', 'linerecord', 'recording' demos
player2 - Small audio player


Jurassic Pork

  • Hero Member
  • *****
  • Posts: 1228
Re: LAZ-ACS doesn't compile under UBUNTU 64 bits 14.04
« Reply #6 on: October 25, 2015, 11:46:56 pm »
hello,
serbod, it's ok now to compile LAZ-ACS package  :D . With the player2 demo i can listen wav file but i have a SIGSEGV exception when i try to open a mp3 file or when i use the soundindicator  :( .
The audio files used in my tests can be found here . mp3 C V 128 kps

Friendly J.P
Jurassic computer : Sinclair ZX81 - Zilog Z80A à 3,25 MHz - RAM 1 Ko - ROM 8 Ko

serbod

  • Full Member
  • ***
  • Posts: 142
Re: LAZ-ACS doesn't compile under UBUNTU 64 bits 14.04
« Reply #7 on: October 28, 2015, 07:18:48 am »
Under Windows7 x32 all test files playing properly.
Under Lubuntu x32 all test files played, but on some files displayed wrong remaing time.

Visualization is broken =( There is some bug in post-FFT processing.

 

TinyPortal © 2005-2018