Author Topic: BASS for WinCE  (Read 372223 times)

Ian @ un4seen

  • Administrator
  • Posts: 26095
Re: BASS for WinCE
« Reply #325 on: 25 Jun '21 - 14:56 »
The Windows CE version of the BASS 2.4.16 release is up now in the 1st post.

Ian @ un4seen

  • Administrator
  • Posts: 26095
Re: BASS for WinCE
« Reply #326 on: 15 Jul '21 - 13:10 »
The Windows CE version of the BASSOPUS 2.4.2 release is up in the 1st post.

Ian @ un4seen

  • Administrator
  • Posts: 26095
Re: BASS for WinCE
« Reply #327 on: 10 May '22 - 17:40 »
The Windows CE version of the BASSMIDI 2.4.14 release is up in the 1st post.

Serhii

  • Posts: 6
Re: BASS for WinCE
« Reply #328 on: 27 Oct '22 - 07:10 »
Good afternoon
I'm trying to compile under WinCe InetRadio, an error pops up: "bass.pas(732,1) Fatal: Syntax error, "identifier" expected but "FUNCTION" found". Error: function BASS_SetConfig(option, value: DWORD): BOOL; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF}; external bassdll;
Everything works under win32.

unit Unit1;

{$mode objfpc}{$H+}

interface

uses
  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
  ExtCtrls, Buttons, Bass;

type

  { TForm1 }

  TForm1 = class(TForm)
    BitBtn1: TBitBtn;
    BitBtn10: TBitBtn;
    BitBtn11: TBitBtn;
    BitBtn12: TBitBtn;
    BitBtn13: TBitBtn;
    BitBtn14: TBitBtn;
    BitBtn15: TBitBtn;
    BitBtn16: TBitBtn;
    BitBtn17: TBitBtn;
    BitBtn18: TBitBtn;
    BitBtn19: TBitBtn;
    BitBtn2: TBitBtn;
    BitBtn20: TBitBtn;
    BitBtn21: TBitBtn;
    BitBtn22: TBitBtn;
    BitBtn23: TBitBtn;
    BitBtn24: TBitBtn;
    BitBtn3: TBitBtn;
    BitBtn4: TBitBtn;
    BitBtn5: TBitBtn;
    BitBtn6: TBitBtn;
    BitBtn7: TBitBtn;
    BitBtn8: TBitBtn;
    BitBtn9: TBitBtn;
    Button2: TButton;
    Button3: TButton;
    Fallout: TImage;
    Image2: TImage;
    Image3: TImage;
    Image4: TImage;
    Image5: TImage;
    Stop: TButton;
    procedure BitBtn10Click(Sender: TObject);
    procedure BitBtn11Click(Sender: TObject);
    procedure BitBtn12Click(Sender: TObject);
    procedure BitBtn13Click(Sender: TObject);
    procedure BitBtn14Click(Sender: TObject);
    procedure BitBtn15Click(Sender: TObject);
    procedure BitBtn16Click(Sender: TObject);
    procedure BitBtn17Click(Sender: TObject);
    procedure BitBtn18Click(Sender: TObject);
    procedure BitBtn19Click(Sender: TObject);
    procedure BitBtn1Click(Sender: TObject);
    procedure BitBtn20Click(Sender: TObject);
    procedure BitBtn21Click(Sender: TObject);
    procedure BitBtn22Click(Sender: TObject);
    procedure BitBtn23Click(Sender: TObject);
    procedure BitBtn24Click(Sender: TObject);
    procedure BitBtn2Click(Sender: TObject);
    procedure BitBtn3Click(Sender: TObject);
    procedure BitBtn4Click(Sender: TObject);
    procedure BitBtn5Click(Sender: TObject);
    procedure BitBtn6Click(Sender: TObject);
    procedure BitBtn7Click(Sender: TObject);
    procedure BitBtn8Click(Sender: TObject);
    procedure BitBtn9Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
    procedure Button3Click(Sender: TObject);
    procedure FormCreate(Sender: TObject);
    procedure StopClick(Sender: TObject);

  end;

var
  Form1: TForm1;


implementation


 var
  url_radio: HSTREAM;

{$R *.lfm}

{ TForm1 }

procedure TForm1.FormCreate(Sender: TObject);
begin
  BASS_CONFIG_DEV_BUFFER();
  BASS_Init(-1,44100,0,Handle,nil);
  BASS_SetConfig(BASS_CONFIG_NET_PLAYLIST, 1);
  BASS_SetConfig(BASS_CONFIG_NET_PREBUF, 0);

end;



procedure TForm1.StopClick(Sender: TObject);
begin
  BASS_ChannelStop(url_radio);
  BASS_StreamFree(url_radio);
  url_radio:=0;
end;



procedure TForm1.BitBtn10Click(Sender: TObject);
var
    url1:string;
begin
  try
  url1:='http://listen.42fm.ru:8000/stealkill-128';
  BASS_StreamFree(url_radio);
  BASS_ChannelSetAttribute(url_radio, BASS_ATTRIB_VOL, 100);
  url_radio := BASS_StreamCreateURL(PChar(url1), 0, BASS_STREAM_BLOCK or BASS_STREAM_STATUS or BASS_STREAM_AUTOFREE, nil, nil);
  BASS_ChannelPlay(url_radio,False);

  except
    on e:Exception do
   end;

end;

Tell me what's the problem?

JKD

  • Posts: 2
Re: BASS for WinCE
« Reply #329 on: 11 Dec '23 - 04:41 »
Hello,
I'm testing the latest supported bass.dll in WinCe 6 (emulator) and Wince 7 (device) which use ARM32. In both enviroments I'm getting BASS_ERROR_NONET error (32) using BASS_StreamCreateURL while network is enabled. Other applications can establish communication without problem. I've tested netradio demo getting the same error.

What steps does bass.dll perform to get that error? If there's no more support for WinCE, could it be possible to get that library source code to adapt it to the peculiarities of this obsolete operating system?

Ian @ un4seen

  • Administrator
  • Posts: 26095
Re: BASS for WinCE
« Reply #330 on: 11 Dec '23 - 13:51 »
BASS uses WinInet for internet access and will fail with BASS_ERROR_NONET when that (wininet.dll) can't be loaded (or if InternetOpen fails), so perhaps it isn't included in your WinCE versions?

JKD

  • Posts: 2
Re: BASS for WinCE
« Reply #331 on: 11 Dec '23 - 14:37 »
Wininet.dll exists at windows folder both in emulator and device. I've made a simple application to test InternetOpenW:
Code: [Select]
DWORD accesstype = INTERNET_HANDLE_TYPE_INTERNET;
WCHAR *proxy = NULL;
WCHAR *useragent=L"Test";
HINTERNET hi = InternetOpenW(useragent, accesstype, proxy, 0, 0);

Debugging indicates that the variable hi contains a handle other than NULL so in my test, InternetOpenW works  ???

Ian @ un4seen

  • Administrator
  • Posts: 26095
Re: BASS for WinCE
« Reply #332 on: 11 Dec '23 - 15:09 »
That's strange then. With default settings, the InternetOpen call will look like this:

Code: [Select]
HINTERNET hi = InternetOpenW(L"BASS/2.4", INTERNET_OPEN_TYPE_PRECONFIG, 0, 0, 0);

Do you still get a non-0 return value when trying that yourself? The only other time a BASS_ERROR_NONET error may occur is if the file request fails and InternetGetConnectedState fails too, so you could also check that.