BASS for WinCE

Started by Ian @ un4seen,

Ian @ un4seen

A tweaked version of the BASSMIDI add-on is now up in the 1st post. Performance is still unlikely to be great compared to other platforms (WinCE devices tend to be lower spec than Android/iOS), but better than it was previously.

Ian @ un4seen

A WinCE version of the new BASSOPUS add-on is now up in the 1st post. The BASS_AAC add-on has also been updated to the latest stuff (2.4.4.2).

elimmedia

Hello Ian,

Could you please provide MIPS build for BASS MIDI ?

Thank you in advance.

Ian @ un4seen

I think that should be possible. I'll try to get a build up for you to try tomorrow.

Ian @ un4seen

OK. A BASSMIDI build is now included in the MIPS WinCE package (the BASS build has also been updated to the latest stuff)...

   www.un4seen.com/stuff/bass24-ce-mips.zip

It hasn't been tested at all, so please report how you get on. If performance isn't great and you get stuttering sound, you can try the BASS_ATTRIB_MIDI_CPU option to prevent it hogging the CPU.

elimmedia

It works great!

Thank you so much Ian!



Quote from: Ian @ un4seenOK. A BASSMIDI build is now included in the MIPS WinCE package (the BASS build has also been updated to the latest stuff)...

   www.un4seen.com/stuff/bass24-ce-mips.zip

It hasn't been tested at all, so please report how you get on. If performance isn't great and you get stuttering sound, you can try the BASS_ATTRIB_MIDI_CPU option to prevent it hogging the CPU.

yanzipeng

Hello Ian, I am working on recording from mic and have a problem on compression. I can use GSM610 through ACM. But the sound quality is not good. My wince has directx build-in. Can I try the BASSDS for using other codec? Thanks.

Ian @ un4seen

Are you interested in BASSDS for encoding or decoding purposes? Please note that BASSDS only supports decoding, so I'm afraid it can't help with encoding. If you are looking for other codecs, perhaps there are 3rd-party encoding libraries that you could use, ie. pass the recorded data to the encoding library? I think the Speex library supports WinCE.

yanzipeng

Thanks Ian. It's for encoding & decoding. I'll try speex library.

Ian @ un4seen

The latest versions of the BASS/BASSenc/BASSMIDI/BASSWV libraries are now up in the 1st post.

Ian @ un4seen

The latest BASS version (2.4.10) is now up in the first post.

Ian @ un4seen

The WinCE version of BASSMIDI 2.4.8 is now up in the 1st post.

Jastine

Никак не получается вывести обложку альбома...
        private void GetTags(int stream)
        {
            TAG_INFO tagInfo = BassTags.BASS_TAG_GetFromFile((PublicVars.list[PublicVars.current_track] as PlayList).Path, false, true);

            if (tagInfo != null)
            {
                if (tagInfo.artist != null) label_artist.Text = "Исполнитель: " + tagInfo.artist;
                else label_artist.Text = "Исполнитель: Нет исполнителя";
                if (tagInfo.title != null) label_trackname.Text = "Название: " + tagInfo.title;
                else label_trackname.Text = "Название: Нет названия";
               
                label1.Text = tagInfo.PictureCount.ToString();

                if (tagInfo.PictureCount != 0) pictureBox_ImgTag.Image = tagInfo.PictureGetImage(0);
                else pictureBox_ImgTag.Image = Properties.Resources.Img_TagAudio;
            }
            else
            {
                label_trackname.Text = "Название: Нет названия";
                label_artist.Text = "Исполнитель: Нет исполнителя";
                pictureBox_ImgTag.Image = Properties.Resources.Img_TagAudio;
            }
        }

label1 всегда равен нулю, хотя в файлах mp3 картинка точно есть. И pictureBox_ImgTag всегда отображает картинку по умолчанию Properties.Resources.Img_TagAudio

rv

What is the lowest latency we can get with BASSMIDI and WINCE6.0 ?

I know it is CPU dependant, but if we can get 5-10ms latency, then we can use it as a midi synthesizer

What is the lowest latency you have got, and what is your board?  I have here a 800MHZ Mini PC 7"

Ian @ un4seen

I very much doubt it will be possible to get anywhere near that low latency on WinCE. The default device buffer length is currently 200ms on WinCE. That can be adjusted via BASS_CONFIG_DEV_BUFFER (prior to calling BASS_Init), but it is currently restricted to a minimum of 150ms. If 150ms is working fine (no stuttering) on your device, then I could send you a version that can go lower to try.

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?