Author Topic: BASS_ChannelGetData on iOS  (Read 164 times)

petains

  • Posts: 3
BASS_ChannelGetData on iOS
« on: 30 Jan '18 - 07:38 »
I'm using Delphi FMX to design a music player for mobile using your BASS library. I use BASS_ChannelGetData to draw spectrum. Everything is OK on Windows and Android, but on iOS, it cannot link BASS_ChannelGetData function from libbass.a into my app (symbol(s) not found for architecture arm64). I don't know why. Is that function epxorted in the library on iOS? The bass unit in Delphi declared the function as follow:

Code: [Select]
function BASS_ChannelGetData(handle: DWORD; buffer: Pointer; length: DWORD): DWORD; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF}; external bassdll name _PU + 'BASS_ChannelGetData';
Is it correct? Please help me! Thank you.

Ian @ un4seen

  • Administrator
  • Posts: 20774
Re: BASS_ChannelGetData on iOS
« Reply #1 on: 30 Jan '18 - 13:30 »
I'm not a Delphi user myself, so I'm not very familiar with it. I do know that on OSX the function names need to be prefixed with an underscore (see the "_PU" definition in BASS.PAS). Perhaps it's the same on iOS? That would apply to all BASS functions though. Are you only having the problem with BASS_ChannelGetData?

petains

  • Posts: 3
Re: BASS_ChannelGetData on iOS
« Reply #2 on: 30 Jan '18 - 15:08 »
Thanks for your replying.
All functions work well, except BASS_ChannelGetData (maybe missing in libbass.a).

For example (declared with _PU prefix):
function BASS_ChannelPlay(handle: DWORD; restart: BOOL): BOOL; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF}; external bassdll name _PU + 'BASS_ChannelPlay';
function BASS_ChannelStop(handle: DWORD): BOOL; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF}; external bassdll name _PU + 'BASS_ChannelStop';
...

All of those functions are OK. (I also have downloaded the newest version of libbass.a)

Ian @ un4seen

  • Administrator
  • Posts: 20774
Re: BASS_ChannelGetData on iOS
« Reply #3 on: 30 Jan '18 - 17:56 »
Have you added the Accelerate framework to your project? If not, perhaps that's causing the problem, as BASS_ChannelGetData uses that in its FFT processing on iOS.

petains

  • Posts: 3
Re: BASS_ChannelGetData on iOS
« Reply #4 on: 31 Jan '18 - 02:47 »
Hi Ian,
Thank you for your hint. I added Accelerate framework and now it's OK.
Once again, thank you very much.