BASS for WinCE

Started by Ian @ un4seen,

Willem

Hello,

I've been experimenting with Bass on my Windows Mobile device. I'm using Visual Studio 2005, mobile emulator and C#. I simply want to record a 8000khz 16bit mono PCM audio stream from my device.

I have run across a couple of problems and am wondering if any of you recognize these issues:
- when I call the BASS_Recordstart() method and I supply my callback function, it is never called.
- when I record audio manually using BASS_ChannelGetData() I am getting sound breaks in the resulting data. In this case I am using a Windows.threads.Timer to trigger the BASS_ChannelGetData(). The reported sound breaks are dependent on the interval that I specify when I create the timer. I get the feeling that BASS is easily pushed to the background in respect to other threads (or maybe just the UI thread). I would expect that the sound recording thread is per definition time critical.

What kind of things can I do to resolve these Issues?

Regards,
-- Willem

Ian @ un4seen

Please try to reproduce the problem with the pre-compiled RECTEST.EXE example. If it happens with that too, I'll have to send you a debug version to get some further info.

Btw, the recording thread runs at above normal priority (THREAD_PRIORITY_ABOVE_NORMAL). I think that should generally be sufficient, as the thread just takes data from the recording buffer (which has been placed there by the driver) and then gives it to the RECORDPROC. The recording buffer is also 2 seconds long by default (see BASS_CONFIG_REC_BUFFER), so any short periods of CPU starvation shouldn't be a major problem, ie. no lost data.

Oscilloscope

Hi, does anybody knows how to implement oscope instead of Spectrum?

Thanks

Dondon

Ian @ un4seen

The SPECTRUM example includes a waveform/oscilloscope mode (press on the screen a few of times to get to it).

dondon

Hi guys,

yeah the oscope is there :) sorry about that.

i got an this error in this new device. It is using Marvell, ARM920T-PX i think this is intel xcale, i can't run even a simple recording function in this device. it says this error.

File or assembly name 'Bass.Net.compact, Version = 2.4.1.1, Culture = neutral, PublicKeyToken = B7566C273E6EF480' or here is dependent on the file or assembly can not find one.

I tried this in another device but just this device has the error like this.

i need help guys.

thanks
Dondon

ken

#165
Does "BASS_StreamCreateURL" work on BassWinCE ?

I'm trying at Windows Mobile 6.5 play an mp3 internet stream (Shoutcast) but gets 0 in return.  BASS_StreamCreateFile  works just fine. I'm using Bass.Net.compact.

ken

Quote from: kenDoes "BASS_StreamCreateURL" work on BassWinCE ?

I'm trying at Windows Mobile 6.5 play an mp3 internet stream (Shoutcast) but gets 0 in return.  BASS_StreamCreateFile  works just fine. I'm using Bass.Net.compact.

Sorry, I think it's only my emulator that don't connect to internet. I have to wait and test until after the weekend when I get my new HTC HD2...

ken

Is there any add-ons that works with BASS WinCE?

Like BASSwma and BASSenc?

AlexFrance

Hello

I'm new to mobile dev so may be I'm missing something obvious...

I have VS2010/C# and I try to use BASS on a Windows mobile 6 pro emulator (without success...).
Adding Bass.Net.compact.dll reference is ok but no way to add bass.dll (ce version) reference ("can't add bass.dll reference" error message in VS).
And when I execute my app in the WM6 pro emulator, I get the following exception (when BASS_Init is called) :
"Can't find PInvoke DLL "bass.dll"" .
Can someone tell me what's the point ? Is there a way to link the bass.dll in my exe (before deploying it) ?

Thanks a lot!

radio42

It is pretty much like regular development.
You don't reference the bsss.dll in your project, you just need to make sure, that the bass.dll exists in your executable directory on the mobile device.
When using an emulator (and not a real device), you might need to copy the bass.dll to your emulator's folder manually, e.g. using the "Windows Mobile Device Center" application.

AlexFrance


yeah, quick and clear reply ! It works (just after figuring out how to copy/paste a file on WM)... Thanks a lot !!!

Ian @ un4seen

Quote from: kenIs there any add-ons that works with BASS WinCE?

Like BASSwma and BASSenc?

If you look closely, there are 3 of them in the package :)

BASSenc is one of them, but I'm afraid BASSWMA isn't as there doesn't seem to be a usable WMA decoder included in Windows Mobile. There is a DirectShow codec available to those that build their own WinCE platforms, and there is a slightly experimental "BASSDS" add-on available (on request) to make use of that, if anyone would like to do that.

ken

Ok thanks Ian,

I just got my "HTC HD2" phone, and Bass WinCE works just fine. For now I have tested playing local mp3 and internetradio (mp3).

But I like to play wma files and wma internet stream.

ken

to Bernd,

I use Bass.Net.compact, and play internetradio just fine. But I can't get update on TagInfo when the station change song. In your WinForm example in "MyDownloadProc" you use "Marshal.PtrToStringAnsi" to get the buffer. But "Marshal.PtrToStringAnsi" is not in the compact framework.

Any ideas how to get updated song info?

/Ken

radio42

You might use the Un4seen.Bass.AddOn.Tags.BassTags class in the CE version to get the tags.
Not, that song title changes are captures via:

// setup a meta sync to get the URL TAGs
Bass.BASS_ChannelSetSync(_stream, BASSSync.BASS_SYNC_META, 0L, _metaSync, IntPtr.Zero);
...
private void MetaSync(int handle, int channel, int data, IntPtr user)
{
    TAG_INFO tags = new TAG_INFO();

    if (tags.UpdateFromMETA(Bass.BASS_ChannelGetTags(_stream, BASSTag.BASS_TAG_META), false, true))
    {
        // do what you need with the tag members
        // ...
    }
}

ken

Thanks Bernd, that worked just fine.

/Ken

dondon

i have this error when i tried to compile using this processor Marvell, ARM920T-PX

assembly name 'Bass.Net.compact, Version = 2.4.1.1, Culture = neutral, PublicKeyToken = B7566C273E6EF480' or here is dependent on the file or assembly can not find one

can you help me. i am using pixtree devices, it is a korean made device.

thanks

dondon

radio42

I guess it has nothing to do with the device.
It sounds more like the .Net compact framework 2.0 is not or not properly installed.

aimanmt

Hello guys,

I have downloaded the attached file "bass24-ce.zip" to try the functionality of the library on WM6 device, but when I tried to compile the sample "rectest", compilation failed because I don't have "bass.h" header file, so where can I find it?

Any help is highly appreciated, thank you.

Ayman

Ian @ un4seen

The BASS.H file can be obtained from the Win32 or OSX package. You can also get the documentation (BASS.CHM) from there.