BASS for WinCE

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

topsuccess

Good message, use Free Pascal to write a BASS test program, and run on HP 1715 (PPC 2003SE) successfully.

There is a bit changes of bass.pas from Win32 version, and I renamed it to "bassCE.pas".

The test program code is following:

program BASSTest;
uses windows, bassCE;

var
chan: DWORD;
musFile: array[0..MAX_PATH] of WideChar;
ofn: TOpenFileName;

procedure Error_Halt(s:WideString);
begin
messagebox (0, PWideChar(s), 'Error', 0 );
BASS_Free();
halt(1);
end;

begin
ZeroMemory(@ofn,0);
with ofn do begin
lStructSize:=sizeof(ofn);
hwndOwner:=0;
nMaxFile:=MAX_PATH;
lpstrFile:=@musFile[0];
Flags:=OFN_FILEMUSTEXIST or OFN_HIDEREADONLY or OFN_EXPLORER;
lpstrTitle:='Select a file to play';
lpstrFilter:='playable files'#0'*.mod;*.mp3;*.ogg'#0#0;
end;
if not GetOpenFileName(@ofn) then Error_Halt('Open File');

if not BASS_Init (-1, 44100, 0, nil, nil) then Error_Halt('Init BASS');

chan:=BASS_StreamCreateFile(FALSE,@musFile[0],0,0,BASS_SAMPLE_LOOP or BASS_UNICODE);
if chan=0 then chan:=BASS_MusicLoad(FALSE,@musFile[0],0,0,BASS_MUSIC_RAMP or BASS_SAMPLE_LOOP or BASS_UNICODE,0);
if chan=0 then Error_Halt('Load Music');

BASS_ChannelPlay(chan,FALSE);
Messagebox(0,'Playing... Click OK to exit','BASS Test',0);

BASS_Free();
end.


Ian @ un4seen

Quote from: person1069 on 19 Mar '09 - 21:15Anyone had success with recording?

I am using the recording sample from the help .chm file and it works fine on desktop.  I copied the code to a windows forms project.

On the mobile device the line:

 _recHandle = Bass.BASS_RecordStart(44100, 2, BASSFlag.BASS_RECORD_PAUSE, _myRecProc, IntPtr.Zero);

Instantly throws a dotnet error.  Was there an extra supporting dll I missed for recording?
Playback works fine so I know my initialization is fine, registration etc.

To narrow-down the cause of the problem (eg. see if it occurs outside of .Net), I'll send you a recording test to try.

auroralview

Hello,

I have found BASS for WinCE in the forum and download it.
Before I start to develop, an internet online radio player or mp3 player, I want to ask some questions about it:

1. Why is BASS only released only for WinCE operatig system? is it planned to release Windows Mobile 5/6 operating system?
2. Can I use this BASS for WinCE all .NET Compact Framework 1/2 installed smartphones, pocekt PC, mobile phones ..etc.
3. Can I use this BASS for WinCE all .NET Compact Framework 1/2 installed smartphones, pocekt PC, mobile phones ..etc even if its operating system is different from WinCE (e.g. windows Mobile 5/6)
4. Where can i find bass.dll for WinCE? i can not find in the BASS for WinCE. i could only find .net API.
5. Does anyone recommend a mobile device which is best compatible with BASS for WinCE?

Thanks...

auroralview

By the way,

Could someone send me the bass.dll for WinCE please?

udemirezen@gmail.com

Why don't you release all necessary files(.dll example project etc.) for WinCE development with BASS on This website?

Thanks?


Ian @ un4seen

Quote from: auroralview on  2 Apr '09 - 10:31Could someone send me the bass.dll for WinCE please?

I have now sent you the WinCE stuff.

Quote from: auroralview on  2 Apr '09 - 10:31Why don't you release all necessary files(.dll example project etc.) for WinCE development with BASS on This website?

Please read the first post ;)

Most of the examples have been ported now, so the WinCE stuff should appear here fairly soon. In the meantime, it is still available on request.

xaero-ma

Hello!

Could someone send me the bass.dll for WinCE please?


orb255@gmail.com

I`m Russian, not English  :-[

auroralview

hello,

I have been trying the BassCE version. Everything is ok until now :))) I have been trying to play a internet radio URL,

main part of my code is below:

Bass.BASS_SetConfig(BASSConfig.BASS_CONFIG_NET_PLAYLIST, 1);
Bass.BASS_Init(-1, 44100, BASSInit.BASS_DEVICE_DEFAULT, IntPtr.Zero, null);
....
....
          try{
            stream_url = Bass.BASS_StreamCreateURL("http://netradio_url:port/bass", 0, BASSFlag.BASS_STREAM_BLOCK |   
                                                                    BASSFlag.BASS_STREAM_STATUS | BASSFlag.BASS_UNICODE, null, IntPtr.Zero);           
               }
        catch(Exception Ex){

        Debug.WriteLine(Ex.ToString());       

        }
            if (stream_url == 0) { MessageBox.Show("URL Connection Error!", "Error", MessageBoxButtons.OK,     
                                          MessageBoxIcon.Exclamation,MessageBoxDefaultButton.Button3); }
            else {
                      Bass.BASS_ChannelPlay(stream_url, false);
            }


the URL is working i can play with winamp. but in this case i can not play with the emulator.
I use emulator's internet explorer to check the web site, it is ok. i see the web page.
but when i execute the streamcreateURL method i see the exception :

A first chance exception of type 'System.NotSupportedException' occurred in DeviceApplicationBass.exe
System.NotSupportedException: NotSupportedException

My development computer and emulator regional settings are both adjusted to English (United States).
The example provided me from ian works well but it is written in C but i want to use C#.
What is reason or cause for this exception.
Thanks
Umut

radio42

Are you sure you are using the special BASS.NET compact version?
Note, that the regular BASS.NET version will not work on CE devices.

auroralview

of course radio42 :)))))
I downloaded the file posted on this forum and also Ian sent me yesterday :))))
you can be sure about it.
What do you think about this error?

Ian @ un4seen

To see whether the problem is something specific to .Net, is the pre-compiled NETRADIO.EXE example working OK there?

auroralview

#36
yes it works perfect.

if you want to check i can send the code but it is very simple. i have already posted it. nothing but the creating a stream from url and play it with channelplay.

but with the dll files you have send me, i get the error below:


int g = Bass.BASS_StreamCreateURL("http://stream-2.ssatr.ch:80/rsp/mp3", 0, BASSFlag.BASS_UNICODE |
BASSFlag.BASS_STREAM_BLOCK | BASSFlag.BASS_STREAM_STATUS | BASSFlag.BASS_STREAM_AUTOFREE, null, IntPtr.Zero);

Bass.BASS_ChannelPlay(g, false);


At the output console:

A first chance exception of type 'System.NotSupportedException' occurred in DeviceApplication1.exe

auroralview

Do you know what might  be the problem?

brown_eagle_fly

Quote from: radio42 on  5 Mar '09 - 23:31Yes, you need a special bass.dll build for CE from Ian!

My I receive this bass.dll file to try it on windows mobile 6?

I get the same PKInvoke error message, dll not found ....

Thanks !

auroralview

Does anybody say something about "System.NotSupportedException" Problem BassCE???????

radio42

The "System.NotSupportedException" will typically appear, if you are trying to call a method which is not fully CE compliant - as there are a couple of more restrictions under CE/CF 2.0.

I'll try your code later today, to see, if this is a BASS.NET CE issue or something else.
However, which function call exactly raises the exception?
Is it the BASS_StreamCreateURL call, BASS_ChannelPlay...?

auroralview

it is Exatly the BASS_StreamCreateURL call. I am looking forward to seeing the result of the your trial.
Thanks

radio42

Here comes the new BASS.NET CE version (for the .Net CompactFramework 2.0):
v2.4.0.4:
www.un4seen.com/filez/4/Bass24.Net_compact.zip

It should now fix the BASS_StreamCreateURL issue.
Let me know what you find...

auroralview

Thanks I am going to try and let you know

auroralview

#44
By the way,

Do you develop Bass.Misc.Waveform class support for the BASS for CE in near future?

I have checked the example applications in the package sent me by the ian, but it is written in C++. I have been using C#.NET for the development and in the examples, drawing a waveform is very very hard to implement and i can not find the necessary methods for Compact Framework (C#)...

Do you have a plan to release this class to public usage? if yes, when?

radio42

Yes, I had the same problem, that I can't use the WaveForm class right away as too many methods I am using are missing in the Compact Framework resp. are restricted by CE.
So I'll see what I can do - but can not promise anything.


auroralview

StreamCreateURL is now working percect. Thanks :)))

Andre

Hi,

can anyone send me the bass.dll for WinCE devices, please?
I use the Bass.dll for Win32 and think it is a good library for playing music :-)

Thanks

Andre

i forgot my email-Address  :-\
Please anyone send me the Bass.dll for WinCE :-)
andrepietsch@gmx.de