Author Topic: BASS for WinCE  (Read 372177 times)

topsuccess

  • Posts: 8
Re: BASS for WinCE
« Reply #25 on: 20 Mar '09 - 02:26 »
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:

Code: [Select]
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

  • Administrator
  • Posts: 26083
Re: BASS for WinCE
« Reply #26 on: 20 Mar '09 - 13:37 »
Anyone 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

  • Guest
BASS for WinCE for Mobile Device Application Development
« Reply #27 on: 2 Apr '09 - 10:21 »
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

  • Guest
Re: BASS for WinCE
« Reply #28 on: 2 Apr '09 - 10:31 »
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?

radio42

  • Posts: 4839
Re: BASS for WinCE
« Reply #29 on: 2 Apr '09 - 11:33 »

Ian @ un4seen

  • Administrator
  • Posts: 26083
Re: BASS for WinCE
« Reply #30 on: 2 Apr '09 - 15:46 »
Could someone send me the bass.dll for WinCE please?

I have now sent you the WinCE stuff.

Why 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

  • Posts: 1
Re: BASS for WinCE
« Reply #31 on: 2 Apr '09 - 18:23 »
Hello!

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


orb255@gmail.com

I`m Russian, not English  :-[

auroralview

  • Guest
Re: BASS for WinCE
« Reply #32 on: 3 Apr '09 - 13:06 »
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:

Code: [Select]
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

  • Posts: 4839
Re: BASS for WinCE
« Reply #33 on: 3 Apr '09 - 13:57 »
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

  • Guest
Re: BASS for WinCE
« Reply #34 on: 3 Apr '09 - 14:11 »
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

  • Administrator
  • Posts: 26083
Re: BASS for WinCE
« Reply #35 on: 3 Apr '09 - 16:22 »
To see whether the problem is something specific to .Net, is the pre-compiled NETRADIO.EXE example working OK there?

auroralview

  • Guest
Re: BASS for WinCE
« Reply #36 on: 3 Apr '09 - 17:18 »
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:

Code: [Select]

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:

Code: [Select]
A first chance exception of type 'System.NotSupportedException' occurred in DeviceApplication1.exe
« Last Edit: 3 Apr '09 - 21:17 by auroralview »

auroralview

  • Guest
Re: BASS for WinCE
« Reply #37 on: 5 Apr '09 - 06:11 »
Do you know what might  be the problem?

brown_eagle_fly

  • Posts: 3
Re: BASS for WinCE
« Reply #38 on: 5 Apr '09 - 06:47 »
Yes, 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

  • Guest
Re: BASS for WinCE
« Reply #39 on: 6 Apr '09 - 09:13 »
Does anybody say something about "System.NotSupportedException" Problem BassCE???????

radio42

  • Posts: 4839
Re: BASS for WinCE
« Reply #40 on: 6 Apr '09 - 09:35 »
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

  • Guest
Re: BASS for WinCE
« Reply #41 on: 6 Apr '09 - 10:06 »
it is Exatly the BASS_StreamCreateURL call. I am looking forward to seeing the result of the your trial.
Thanks

radio42

  • Posts: 4839
Re: BASS for WinCE
« Reply #42 on: 6 Apr '09 - 18:04 »
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

  • Guest
Re: BASS for WinCE
« Reply #43 on: 6 Apr '09 - 18:26 »
Thanks I am going to try and let you know

auroralview

  • Guest
Re: BASS for WinCE
« Reply #44 on: 6 Apr '09 - 18:41 »
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?
« Last Edit: 17 Apr '09 - 19:47 by auroralview »

radio42

  • Posts: 4839
Re: BASS for WinCE
« Reply #45 on: 6 Apr '09 - 19:57 »
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.

smeesseman

  • Posts: 6
Re: BASS for WinCE
« Reply #46 on: 7 Apr '09 - 05:09 »
Nice work on this!!

auroralview

  • Guest
Re: BASS for WinCE
« Reply #47 on: 7 Apr '09 - 07:36 »
StreamCreateURL is now working percect. Thanks :)))

Andre

  • Guest
Re: BASS for WinCE
« Reply #48 on: 8 Apr '09 - 06:09 »
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

  • Guest
Re: BASS for WinCE
« Reply #49 on: 8 Apr '09 - 11:07 »
i forgot my email-Address  :-\
Please anyone send me the Bass.dll for WinCE :-)
andrepietsch@gmx.de