BASS for WinCE

Started by Ian @ un4seen, 2 Mar '09 - 16:46

rv

I don't know well WinCE, but i there a way to bypass the software mixer, like with ASIO or WASAPI?

http://msdn.microsoft.com/en-us/library/ee487409(v=winembedded.60).aspx

Ian @ un4seen

As far as I know, there unfortunately isn't anything like ASIO or WASAPI available on WinCE.

Ian @ un4seen

The latest version (2.4.12) of the BASSenc add-on is now up in the 1st first, adding support for user-provided encoders.

Ian @ un4seen

The Windows CE version of BASS 2.4.11 is now up in the 1st post.

Note that existing BASS_ChannelGetData calls that use the BASS_DATA_FLOAT or BASS_DATA_FFT flags will need to be modified slightly, because those options will now deliver floating-point data by default rather than fixed-point data, to match what happens on other (non fixed-point) platforms. Fixed-point data can still be requested via the new BASS_DATA_FIXED flag. This change affects the BASS_FX add-on, so if you're using that, you will need to upgrade to the latest version of that too.

alex208210

#279
I have a problem with bass.dll under wince 6. Lazarus 1.2.6 (fpc 2.6.4) + bass.pas (2.4.11) + bass.dll (2.4.11). Other versions bass.dll also have this problem. During playback of mp3 files, each time at a different time from 20 seconds to 5-10 minutes application crashes. Error text:
"Fatal error. The application has performed an illegal operation and will be closed. If the problem persists, contact the program manufacturer.
Exception 0xproject1.eхe "
X32 Windows does not have this problem

example: http://pbcdod.ru/basserror.zip



the program code:

unit Unit1;

{$mode delphi}

interface

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

type

  { TForm1 }

  TForm1 = class(TForm)

    Button1: TButton;
    Button2: TButton;
    Button3: TButton;
    Label1: TLabel;
    Label2: TLabel;
    Timer1: TTimer;
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
    procedure Button3Click(Sender: TObject);
    procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
    procedure FormCreate(Sender: TObject);
    procedure Timer1Timer(Sender: TObject);

  private
    { private declarations }
  public
    { public declarations }
  end;

var
  Form1: TForm1;
  track:integer;
  Channel: DWORD;

implementation

{$R *.lfm}

{ TForm1 }

procedure TForm1.FormCreate(Sender: TObject);
begin
    BASS_Init(-1, 44100, 0, nil, nil);
    track:=1;
end;

procedure TForm1.Timer1Timer(Sender: TObject);
var
TrackLen, TrackPos: Double;
ValPos: Double;
ValLen: Double;
begin
TrackPos:=BASS_ChannelBytes2Seconds(Channel, BASS_ChannelGetPosition(Channel,0));
TrackLen:=BASS_ChannelBytes2Seconds(Channel, BASS_ChannelGetLength(Channel,0));
ValPos:=TrackPos / (24 * 3600);
ValLen:=TrackLen / (24 * 3600);
Label1.Caption:=FormatDateTime('hh:mm:ss',ValPos);
Label2.Caption:=FormatDateTime('hh:mm:ss',ValLen);
if  BASS_ChannelIsActive(channel)=BASS_ACTIVE_STOPPED then begin  inc(track); if track>2 then track:=1; player; end;
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
BASS_ChannelStop(Channel);
BASS_StreamFree(Channel);
Channel := BASS_StreamCreateFile(false, PChar(ExtractFilePath(ParamStr(0))+inttostr(track)+'.mp3'), 0, 0, 0 );
BASS_ChannelPlay(Channel, False);
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
 BASS_ChannelPause(Channel);
end;

procedure TForm1.Button3Click(Sender: TObject);
begin
 BASS_ChannelStop(Channel);
end;

procedure TForm1.FormClose(Sender: TObject; var CloseAction: TCloseAction);
begin
  Bass_Stop();
  BASS_StreamFree(channel);
  Bass_Free;
end;

end.


Help solve the problem. How can I keep track of exactly where to wince goes wrong? Was anyone has a similar problem and how to solve it?

Ian @ un4seen

I'm not familiar with Lazarus; does it have a debugger? If so, can you catch the crash under that to see where it occurred? If not, to perhaps narrow it down, does the crash still happen if you disable the timer? Also, is it only happening when playing MP3 files, eg. not OGG or WAV? If so, are you using the standard or "mp3-free" BASS.DLL version?

alex208210

i'm using standard version dll.
there is speculation that the problem is the sampling rate, if you put 22050 the application does not fall, or have not yet fallen, testing...

Ian @ un4seen

Please also check the other things I mentioned. Does Lazarus have a debugger, and if so, what does that say about the crash, eg. the location? And does the crash only happen with MP3 files, not OGG or WAV?

alex208210

hello, Where can I download tags.dll to wince arm ?

Ian @ un4seen

There hasn't been a WinCE version of the TAGS add-on available up to now, but I've just put one up in the 1st post. It's pretty much untested, so let me know if you have any trouble with it. Note that the strings are 8-bit "char" rather than 16-bit "wchar_t", so you will probably want to convert the results. For example, something like this...

const char *tag=TAGS_Read(handle, "%UTF8(%TITL)"); // get title tag in UTF-8 form
if (tag) {
int n=MultiByteToWideChar(CP_UTF8, 0, tag, -1, 0, 0); // get its converted length
wchar_t *wtag=new wchar_t[n]; // allocate space for converted tag
MultiByteToWideChar(CP_UTF8, 0, tag, -1, wtag, n); // convert the tag
...

alex208210

Thank you, friend, the library is working correctly

Sunka Rakesh

Thanks for your inputs on this.

I am using "Windows Embedded CE 6.0 R3 device". Created Smart Device Project using VS 2008. I did add reference from dll ( bass24-ce\mp3-free\bass.dll). I am getting
error as "A reference to 'bass.dll' could not be added.". Please do the needful.

Ian @ un4seen

It sounds like you're using .Net? If so, are you also using BASS.Net in your project? If you don't currently have BASS.Net, you can get it from the BASS webpage.

jim

Ian,

Any thoughts on using bass with Visual Studio 2015 on a Raspberry Pi B running Windows 10?

Arm processor and all that...

Ian @ un4seen

I haven't looked into the details of Windows 10 on ARM yet, but I guess it will be something like Windows Phone, which is very different to Windows CE. There will hopefully be a Windows Phone version of BASS available eventually, but for now perhaps you could install Linux on your RPi and use the ARM Linux version of BASS?

renato

Quote from: radio42 on  3 Mar '09 - 08:47Here comes the BASS.NET CE version (for the .Net CompactFramework 2.0):
v2.4.1.3

www.un4seen.com/filez/4/Bass24.Net_compact.zip


Hello, I am developing an application to play mp3 in mini2440 with wince. However, my operating system only has the CF2.0. The link BASS.NET CE version CF2.0 is broken. Could provide the files again?

radio42

They are contained in the regular download now!

renato

Quote from: radio42 on 13 Jul '15 - 08:47They are contained in the regular download now!
but in the normal download version is compatible with cf3.5. Is there any version to CF2.0?

radio42

No, there is no build for the .Net CF v2.0 anymore existing.

malucul

Is there any issue with PPC2003 and this dll? I have a .NET 3.5 CF project with Bass.Net, and I get a missing DLL exception when trying to call the Registration method. I have quadruple-checked that both the .NET dll and the original bass.dll are present in the application directory, both are. What's going on?!

Ian @ un4seen

I don't think PPC2002 is supported any more, but I think PPC2003 still is. What is the Window CE version number shown in your device's system information?

malucul

Quote from: Ian @ un4seen on 22 Feb '16 - 14:00I don't think PPC2002 is supported any more, but I think PPC2003 still is. What is the Window CE version number shown in your device's system information?

CE Version is 4.21.1088 Build 15045.2.6.0 - The device is a stock HP HX4700. A modded HX4700 running WM6 works fine, it's only my PPC2003SE ones which seem to be affected by this.

Ian @ un4seen

Ah! I see now that the current BASS.DLL release has a minimum requirement of CE 5.0 for some reason. An update with a minimum requirement of CE 4.2 is up in the 1st post now. Let me know if you still have trouble with it.

malucul

That seems to have fixed it, thanks Ian!

Ian @ un4seen

The Windows CE versions of the BASS 2.4.12 and BASSenc 2.4.13 releases are now up in the 1st post. Please note that BASS 2.4.12 breaks back-compatibility in the BASS_CONFIG_NET_AGENT/PROXY options (they are now ANSI by default - Unicode is optional - and BASS_SetConfigPtr takes a copy of the provided string), so you should check how you're using those options, if you are.