Author Topic: BASS for WinCE  (Read 373523 times)

Ian @ un4seen

  • Administrator
  • Posts: 26157
Re: BASS for WinCE
« Reply #75 on: 20 May '09 - 15:07 »
Does the problem only affect the WinCE version, or does it happen with the Win32 version too? Is the position a long way off, and does it only affect a particular file/format? In any case, please upload a troublesome file to reproduce the problem with...

   ftp.un4seen.com/incoming/

charmander

  • Posts: 3
Re: BASS for WinCE
« Reply #76 on: 21 May '09 - 00:16 »
Does the problem only affect the WinCE version, or does it happen with the Win32 version too? Is the position a long way off, and does it only affect a particular file/format? In any case, please upload a troublesome file to reproduce the problem with...

   ftp.un4seen.com/incoming/

Hi again,

file format is mp3, and it happens win32 too (i tried)? and it is not happening one file, it happening all of big files. (mp3 lengths are about 2 hour).

when we look the problem deeper....,

when we set the time to 5300, it is sets to around 5100-5200 second, but channel_getposition is continue to get true position.

Ian @ un4seen

  • Administrator
  • Posts: 26157
Re: BASS for WinCE
« Reply #77 on: 21 May '09 - 15:00 »
That sounds like the MP3 files could be VBR; please look for "Xing" near the start to confirm. That would explain the seeking inaccuracy. The "Xing" VBR header includes a seek-table, but it only has 100 entries (0-99%), which are 8-bit so also only accurate to within 1/256th of the file size. Therefore, the larger the file, the less accurate seeking will generally be. The BASS_STREAM_PRESCAN flag can be used to have BASS pre-scan the file for exact seek points, but that could be quite slow on a large file.

If the files are not VBR, please upload one of them to have a look at.
« Last Edit: 22 May '09 - 16:16 by Ian @ un4seen »

stone977a

  • Posts: 1
Re: BASS for WinCE
« Reply #78 on: 2 Jun '09 - 08:26 »
Hi,

I'm testing bass dll on Win CE 5.0 platform and I saw that current bass.dll is built for ARM processors.
Is it possible to get bass.dll for MIPSII?

Thanks,

Tone

phete

  • Posts: 3
Re: BASS for WinCE
« Reply #79 on: 1 Jul '09 - 09:47 »
Any plans on implementing the BASS_StreamCreateFileUser? :) throwing NotSupportedEx

Though, I don't even know if thats the correct method I should use.
I'm receiving a stream (read: byte[], in chunks) from a streaming service in .ogg vorbis q5-format and I need to get it played back on my device.

Possible? :)
« Last Edit: 1 Jul '09 - 20:14 by phete »

radio42

  • Posts: 4839
Re: BASS for WinCE
« Reply #80 on: 2 Jul '09 - 16:58 »
Can you please show your code how you the BASS_StreamCreateFileUser method together with the FILEPROCs.

phete

  • Posts: 3
Re: BASS for WinCE
« Reply #81 on: 3 Jul '09 - 01:10 »
Code: [Select]
class Test
{
  private FILEREADPROC _readProc;
  private BASS_FILEPROCS fileProcs;
  private int mStream;

  public Test()
  {
    _readProc = new FILEREADPROC(fileReadProc);
    fileProcs = new BASS_FILEPROCS(null, null, _readProc, null);
    mStream = 0;
    BassNet.Registration("email", "pass");
    if (!Bass.BASS_Init(-1, 44100, BASSInit.BASS_DEVICE_DEFAULT, IntPtr.Zero))
      throw new Exception("Can't run without Init");
  }
 
  private void button1_Click(object sender, EventArgs e)
  {
    if (mStream == 0)
    {
      mStream = Bass.BASS_StreamCreateFileUser(BASSStreamSystem.STREAMFILE_BUFFERPUSH, BASSFlag.BASS_STREAM_AUTOFREE, fileProcs, IntPtr.Zero);
      ...
    }
  }

  private int fileReadProc(IntPtr buffer, int length, IntPtr user)
  {
    ...
  }
}

The implementation of fileReadProc doesn't really matter since it never gets hit, it's on the CreateStreamFileUser-call where I get the NotSupportedException :s

dannnn

  • Guest
BPM / Tempo / Pitch
« Reply #82 on: 6 Jul '09 - 08:02 »
Hi all,
playback and some other functionality works fine on my Windows CE 5 platform with .NET 2.0 CF.

however, all the BASSAttribute.BASS_ATTRIB_MUSIC* and BASSAttribute.BASS_ATTRIB_TEMPO* enum options when using the function Un4seen.Bass.Bass.BASS_ChannelGetAttribute(..) return FALSE....

anyone know anything about this? i really wanna run some bpm detection etc...

thanks,
dan

radio42

  • Posts: 4839
Re: BASS for WinCE
« Reply #83 on: 6 Jul '09 - 11:06 »
As stated in the docs, the BASS_ATTRIB_TEMPO* flags can only be used together with the BASS_FX add-on - which is not supported for BASS CE.
The BASS_ATTRIB_MUSIC* attributes can only be used for MOD music streams.

phete

  • Posts: 3
Re: BASS for WinCE
« Reply #84 on: 8 Jul '09 - 15:08 »
So, was there anything wrong with the code i attached? :s

radio42

  • Posts: 4839
Re: BASS for WinCE
« Reply #85 on: 8 Jul '09 - 16:11 »
Hi phete,

so far I was unable to find a solution.
The problem seems to be, that the CE version of .Net (actually the interop marshaling) doesn't allow a struct to contain delegates when handed over to a managed function.
As for the BASS_StreamCreateFileUser function, the BASS_FILEPROCS parameter is actually a struct containing 4 delegates.
And this is what the .Net CE version doesn't like resp. doesn't support.
For the regular .Net framework this is fine, but interop marshaling is pretty limited under CE.
So I still trying to find another way to solve this problem (doing some internal tricks) - but if that fails, I guess either you can not use BASS_StreamCreateFileUser with CE or Ian needs to provide me with some special CE tweeks.
I'll keep you updated when I fiddle something...

radio42

  • Posts: 4839
Re: BASS for WinCE
« Reply #86 on: 17 Jul '09 - 13:55 »
@phete:

The issue with "BASS_StreamCreateFileUser" have now been resolved.
A new version of BASS CE as well as BASS.NET CE are now available in the first post!

Note, that you need to download/install both bass.dll as well as Bass.Net.compact.dll !

Let us know, if you find any further doggyness...

Selmo

  • Guest
Re: BASS for WinCE
« Reply #87 on: 20 Jul '09 - 14:28 »
Hi,

The rectest example of BASS-WinCE records in PCM wav. Is it possible to record and encoding audio in real time with BASS.NET.compact? If yes, please how should I proceed? I tried encoding to WMA, but no luck.

Thanks in advance

radio42

  • Posts: 4839
Re: BASS for WinCE
« Reply #88 on: 20 Jul '09 - 14:38 »
As far as I know WMA is currently not supported by BASS-CE.
So you might try the EncoderWAV on a CE device - samples are provided within the regular BASS.NET help file:

a) Create a recording handle with "BASS_RecordStart".
Code: [Select]
private RECORDPROC _myRecProc; // make it global, so that the Garbage Collector can not remove it
...
Bass.BASS_RecordInit(-1);
_myRecProc = new RECORDPROC(MyRecording);
// start recording paused
int recChannel = Bass.BASS_RecordStart(44100, 2, BASSFlag.BASS_RECORD_PAUSE, _myRecProc, IntPtr.Zero);
...
// really start recording
Bass.BASS_ChannelPlay(recChannel, false);
...
// the recording callback
private bool MyRecording(int handle, IntPtr buffer, int length, IntPtr user)
{
  return true;
}

b) use the EncodeWAV to do the encoding to Wave:
Code: [Select]
EncoderWAV wav = new EncoderWAV(recHandle);
wav.InputFile = null;
wav.OutputFile = "test.wav";

wav.Start(null, IntPtr.Zero, false);

// your recording will be encoded until you call...
wav.Stop();

Selmo

  • Guest
Re: BASS for WinCE
« Reply #89 on: 20 Jul '09 - 15:58 »
So you might try the EncoderWAV on a CE device...
Thanks for replying, but I didn't found EncoderWAV in BASS.NET.compact... :( Could you help me, please?

radio42

  • Posts: 4839
Re: BASS for WinCE
« Reply #90 on: 20 Jul '09 - 17:47 »
Ahh damn, you are right ;-)
BASSenc is also not available in the CE version, that's why the Encoder stuff is not present in BASS.NET.compact as well - sorry for the confusion.

In that case you would have to implement all the wave header writing etc. all of your own...as in the C++ example you referred to.

Ian @ un4seen

  • Administrator
  • Posts: 26157
Re: BASS for WinCE
« Reply #91 on: 21 Jul '09 - 14:31 »
I have added a slightly experimental BASSenc build to the WinCE package (see 1st post). It includes support for the built-in WAV writer and ACM codecs, but not external command-line encoders as I don't think there are any of those for WinCE. If you give it a try, please report your findings.

Selmo

  • Guest
Re: BASS for WinCE
« Reply #92 on: 23 Jul '09 - 17:09 »
Hi radio42,

Now that Ian added a experimental BASSenc for WinCE, is there some expectancy to implement it in BASS.NET.compact? :)

Thanks in advance

radio42

  • Posts: 4839
Re: BASS for WinCE
« Reply #93 on: 23 Jul '09 - 17:33 »
Yes of course!
The only little problem is, that I am going on holiday tomorrow for 2 weeks...and I am not sure, if I can finish a new version til tomorrow.
So if I am not able to finish that by tomorrow, you can expect it right after my return!

epmaster

  • Posts: 3
Re: BASS for WinCE
« Reply #94 on: 3 Aug '09 - 10:50 »
Hi!

I want to use BASS CE on MIPSII CE 5.0 device. but.. there is only a dll that supports only ARM devices.  :'(
When I try to execute my application, "PInvoke DLL 'bass.dll'" error is occured whether "bass.dll" downloaded from this article is existed on the same folder that contains the application.

My email is chjh0628 at naver.com

Thanks  :)
« Last Edit: 3 Aug '09 - 10:52 by epmaster »

Simon chen

  • Guest
Re: BASS for WinCE
« Reply #95 on: 5 Aug '09 - 11:41 »
HI,

I want use bass for wince at s3c2440 arm board, but error occurred
i try it in evc 4 and wince5.0, the error message is "BassPlayer" is not valid WindowsCE Application,
even i only use BASS_StreamCreateFile(). if i remove the invoke of BASS_StreamCreateFile(),the application run well.

after this, i try to use Bass.Net.compact.dll and C# to test, error still occurred. i used Net.compact2.0.

the C# test code is:
                try
                {
                    int handle = Bass.BASS_StreamCreateFile(openFileDialog.FileName, 0, 0, 0);
                    if (!Bass.BASS_ChannelPlay(handle, true))
                    {
                        MessageBox.Show("Can't open " + openFileDialog.FileName);
                    }
                }
                catch (System.Exception ex)
                {
                   MessageBox.Show(ex.Message);
                   MessageBox.Show(ex.ToString());
                }

the error message is: TypeLoadException.
please help me, if the library can not run in my s3c2440 board?


Ian @ un4seen

  • Administrator
  • Posts: 26157
Re: BASS for WinCE
« Reply #96 on: 5 Aug '09 - 16:02 »
I think it could be that the device's CE installation doesn't include a feature that BASS is using, possibly ACM codec support. If you would like to try it, I could send you a build without the ACM support.

Simon chen

  • Guest
Re: BASS for WinCE
« Reply #97 on: 6 Aug '09 - 03:24 »
Hi, Ian

thank you.

please send me a build without the ACM support.

by the way, my EVC++ 4 application using bass function(BASS_StreamCreateFile, etc) report a exception of not a valid Windows CE Application, what does it means?

FYI: windows media player is include in my device' CE installation, it is able to work well to use directshow to play mp3 in my application, but i didn't know how to add equalizer to my application, so, i planned to replace directshow with bass.

Simon chen

  • Guest
Re: BASS for WinCE
« Reply #98 on: 6 Aug '09 - 04:26 »
Hi, Ian

the error Message “AppName is not a Valid Windows CE application” look like the bass.dll is not match my CE system or Processer?
the OS of my device is CE 5.0, the CPU is SAMSUNG S3C2440 wiht ARMV4I instruction set, could you make a build for my device? i can send the sdk of my 2440 device to you.

Thanks

Simon chen

  • Guest
Re: BASS for WinCE
« Reply #99 on: 6 Aug '09 - 15:17 »
Hi, Ian

the application is OK now, as you said, the reson is ACM codec support, i rebuild the CE,add the ACM codec.
but now have a new problem, i want to add equalizer to my application, so i use BASS_ChannelSetFX() function.
HFX  fx = BASS_ChannelSetFX( handle, BASS_FX_DX8_PARAMEQ, 1);
but BASS_ChannelSetFX return BASS_ERROR_NOFX. it means DX8 effects are unavailable. if it possible to use DX8 effect in my system(wince5.0, 2440 processer)? if it's impossible, how can i add equalizer wiht other bass function or other function to implement it,  i guess that can use the following function to  implement it:
BASS_ChannelSetDSP()
CALLBACK DSPProc()
but i doesn't know how to do. could you give a advice?
thanks.