Author Topic: BASS 2.4 beta  (Read 122208 times)

Ian @ un4seen

  • Administrator
  • Posts: 20401
Re: BASS 2.4 beta
« Reply #25 on: 27 Dec '07 - 12:51 »
I think that there's another declaration error in BassMidi.pas :

function BASS_MIDI_StreamGetMark(handle:HSTREAM; mtype:DWORD; count:DWORD; var fonts:BASS_MIDI_MARK): BOOL; stdcall; external bassmididll;


The current declaration :

function BASS_MIDI_StreamGetMarks(handle:HSTREAM; mtype:DWORD; var fonts:BASS_MIDI_MARK; count:DWORD): DWORD; stdcall; external bassmididll;

Oops, right you are. Another Delphi API update is in the BASSMIDI download now - an updated VB API too, as it was missing the new BASS_MIDI_FontGetPreset function.

I am trying to create a mixer stream (BASS_Mixer_StreamCreate). While in windows xp all goes well, and my stream retrieves a value, under Vista, I always get a stream of 0.

That's strange. What is the error code of the BASS_Mixer_StreamCreate call?

Other then that I believe I also have a problem with Vista, with wma tag reading.

I guess that could be related to the fact that the WMA tag delimiter has changed from " : " to "=" (to be the same as OGG/APE tags). How are you reading the tags, eg. are you using the BASS_ChannelGetTags function directly, or some wrapper?

Code: [Select]
Global Const BASS_MUSIC_SINCINTER = &H800000 ' sinc interpolated sample mixing
Global Const BASS_MUSIC_POSRESET = 32768  ' stop all notes when moving position <---?
Global Const BASS_MUSIC_POSRESETEX = &H400000

A little joke in the VB.bas?  ;D

Nope, at least not intentionally :)

Is there a problem?

TmpChan:= BASS_MIDI_StreamCreateFile(FALSE, PChar(SourceFile), 0, 0, BASS_MUSIC_DECODE,0);

total:= BASS_MIDI_StreamGetMark(TmpChan, BASS_MIDI_MARK_LYRIC, myBASS_MIDI_MARK, 0);

BASS_MIDI_StreamGetMark does not return the number of markers. See the docs for an example of listing/counting the markers.

mystreamradio

  • Posts: 12
Re: BASS 2.4 beta
« Reply #26 on: 27 Dec '07 - 15:14 »
Hi Ian,
Still trying to find out what is causing all my vista problems..


I am trying to create a mixer stream (BASS_Mixer_StreamCreate). While in windows xp all goes well, and my stream retrieves a value, under Vista, I always get a stream of 0.

That's strange. What is the error code of the BASS_Mixer_StreamCreate call?


The error I get calling the BASS_Mixer_StreamCreate is : BASS_ERROR_HANDLE
I have opened another topic on this issue, as this is not a 2.4 problem, but more of a vista problem. I am using 2.4 now, but believe it happened on the 2.3 version as well.
All works well on XP, its only on vista I have this. I went to the samples, and and also had a mixer stream 0 on the WinAmpDSP sample, on a vista machine. this happens to me on another vista laptop i tried, even though radio42 told me he tested and all samples worked for him...

Other then that I believe I also have a problem with Vista, with wma tag reading.


I guess that could be related to the fact that the WMA tag delimiter has changed from " : " to "=" (to be the same as OGG/APE tags). How are you reading the tags, eg. are you using the BASS_ChannelGetTags function directly, or some wrapper?

I am reading the tags like this :
tmpstream = BassWma.BASS_WMA_StreamCreateFile(_fileName, 0, 0, BASSFlag.BASS_STREAM_DECODE);
 //// display the tags...
TAG_INFO tagInfo = new TAG_INFO(_fileName);
if (BassTags.BASS_TAG_GetFromFile(tmpstream, tagInfo))
 {
                            songtitle = tagInfo.title;
}


I have investigated more into this, and found out nothing with wma add on works for me with Vista. Again all works fine on the xp...
I then went to the NetRadio sample...any stream playing mp3, is played with no problem, while if I open WMA radio station, i get an error. Xp plays both no problem..
radio42 told me it might be a problem with Vista wma codecs, but I have windows media player 11 installed on the vista machine. do I need to install anything else, to run the WMA add on with vista??

My vista I am testing on is a VMWARE machine, but the problems occured on a OEM vista built laptop as well..

I tried, removing, and readding the dll's with no change..
I do have the feeling, it is something wrong with my Vista, but have no clue...I will keep investigating..
anyone else have this problems with vista??
Eli


Ian @ un4seen

  • Administrator
  • Posts: 20401
Re: BASS 2.4 beta
« Reply #27 on: 28 Dec '07 - 15:56 »
The error I get calling the BASS_Mixer_StreamCreate is : BASS_ERROR_HANDLE

Are you sure that error code isn't from a subsequent call? I ask as BASS_Mixer_StreamCreate should never generate a BASS_ERROR_HANDLE error :)

I am reading the tags like this :
tmpstream = BassWma.BASS_WMA_StreamCreateFile(_fileName, 0, 0, BASSFlag.BASS_STREAM_DECODE);
 //// display the tags...
TAG_INFO tagInfo = new TAG_INFO(_fileName);
if (BassTags.BASS_TAG_GetFromFile(tmpstream, tagInfo))
 {
                            songtitle = tagInfo.title;
}


I have investigated more into this, and found out nothing with wma add on works for me with Vista. Again all works fine on the xp...

Is the BASS_WMA_StreamCreateFile call succeeding, ie. a non-0 return value?

mystreamradio

  • Posts: 12
Re: BASS 2.4 beta
« Reply #28 on: 29 Dec '07 - 01:59 »
Hi Ian,
I am copying here what I wrote Radio42 on another post.
I believe I found the trouble to all my problems, but no solution.
Copied :

Hi Radio42 ,
I decided not to give up, and spent the last couple of hours, installing vista on an old machine I had.
After all windows updates, my sound card (realtek ac97) was working properly, and I was ready to debug my problems.
It was wierd, that my program was working fine on winxp, and had problems on vista.
Now bass itself was working correctly on vista as well, it was bassmix and basswma that did not function correctly under vista.

So I installed VS.NET 2005, and copied over my source files to the vista machine.
I wanted to compile and run my application from vista itself and see if the problem occurs . Unfurtunaly my problems still happened. I kept getting Mixer Streams of 0, and wma tags were not read properly.
I then opened one of the bass samples (SimpleMix), from the bass I installed on vista, and it worked great. Just like you said...

My application uses the exect same code to create a mixer stream, as the sample, and I could not figure out why the same code, gives me 0 on one code, and works correctly on another.
I had no errors initilizing Bass, and bass was working properly (even reading mp3 tags correctly).

So I went over property by property, in the two applications, to see what is different. BUILD properties were all the same (as that was my first suspection).
The only thing that was different was the Security Properties for my application.
I use CLICKONCE to distribute my application, and the "Enable ClickONce Security Settings" was checked. I have assigned "Full Trust Application".
I saw no reason for this to be a problem, and it does work with these security settings under XP, but THAT WAS IT.
Once I took off the CLICKONCE Security Settings , everything worked correctly on vista.
My mixer was created, and wma tags were read..
So I heard alot about the new permissions in vista, but my application does have FULL TRUST assigned, and have no clue what to do next.
I do need to keep clickonce security, but more then clickonce distribution I need the application to work..

So I do not know if this is a bug, or restriction, or something that can be handled, any advise would be great.
Again loads of tnx.
Eli

radio42

  • Posts: 4574
Re: BASS 2.4 beta
« Reply #29 on: 29 Dec '07 - 09:14 »
Have you tried running your application under Admin privileges (right-click and select "Run as Administrator")?

When you demand "Full Trust" to you app - this means, that your app won't run, if the user doesn't have such rights.
So I assume you have UAC enabled on your Vista machine.
Note, that assigning "Full Trust" doesn't mean you app is automatically elevated. It just tells the runtime to check, that the user must have such rights in order to execute the app.
However, you might create a manifest file to elevate your app automatically.

This link might provide more info: http://msdn2.microsoft.com/en-us/library/01daf08f.aspx
« Last Edit: 29 Dec '07 - 09:23 by radio42 »

mystreamradio

  • Posts: 12
Re: BASS 2.4 beta
« Reply #30 on: 31 Dec '07 - 01:06 »
Hi Radio42 , and thanks for pointing me to UAC  and vista.
I have read alot and learned alot about vista, and UAC.
Unluckly for me, Clickonce is not intended to be elevated security, and by default runs un-elevated. Not only that, vista will not even prompt for elevation (as it does on regular setup deployments), for clickonce deployments.
There is a workaround i found ,but it means creating a helper application, to ask for elevation everytime before my clickonce application runs. I do not think it is worth the while.
But as there is no other way, Basswma and Bassmix both need to be run elevated in order to function correctly on vista,  i will need to move from my clickonce deployment method to regular windows installer. this will prompt UAC elevation on setup, and let my application run correctly on vista.... although we do not love it, vista will probably rule the market in a couple of years :) ,so shell be it.
Again thank you, and if you do know of a way to get clickonce applications work with bassmix and basswma, let me know . As far as I understand from researching, windows did not intend clickonce applications to run with permissions, and by that will not let vista run those applications elevated (or even prompt for elevation, this I do not understand.....)...
Thank you again, as now I know alot more about UAC then i did last week, and bass is an amazing project, enjoying every minute with it.
Eli

alenofx

  • Posts: 28
Re: BASS 2.4 beta
« Reply #31 on: 31 Dec '07 - 12:48 »
Hi,

@Ian: there is an updated "bass-addon.h" header file available for 2.4 version?

Thank you, and a happy new year to all bass forum members! ;D

Ian @ un4seen

  • Administrator
  • Posts: 20401
Re: BASS 2.4 beta
« Reply #32 on: 31 Dec '07 - 16:14 »
@Ian: there is an updated "bass-addon.h" header file available for 2.4 version?

Yep, although I'm not 100% sure if it is finalized yet. If you need it, please drop me an email.

Ian @ un4seen

  • Administrator
  • Posts: 20401
Re: BASS 2.4 beta
« Reply #33 on: 4 Jan '08 - 14:21 »
A BASS update is up now (see first post), includng a syncing tweak to ensure that syncs are called in the order that they were triggered. This won't make much difference in general, but will for things like MIDI lyric syncs where there can be multiple syncs triggered at (or very close to) the same position.

The WavPack add-on is also up, and is now an "official" add-on, with documentation and everything :D

nr1

  • Posts: 78
Re: BASS 2.4 beta
« Reply #34 on: 5 Jan '08 - 10:14 »
Little thing about bass_cd 2.4:

The Delphi class "basscd.pas" is not compilable because there is a little bug:

Original:
Code: [Select]
type
  BASS_CD_INFO = record
    PChar: vendor;      // manufacturer
    PChar: product;     // model
    PChar: rev;         // revision
    letter: Integer;    // drive letter
rwflags: DWORD;     // read/write capability flags
canopen: BOOL;      // BASS_CD_DOOR_OPEN/CLOSE is supported?
canlock: BOOL;      // BASS_CD_DOOR_LOCK/UNLOCK is supported?
maxspeed: DWORD;    // max read speed (KB/s)
cache: DWORD;       // cache size (KB)
cdtext: BOOL;       // can read CD-TEXT
  end;

Correct:
Code: [Select]
  BASS_CD_INFO = record
   vendor: PChar;      // manufacturer
   product: PChar;     // model
   rev: PChar;         // revision
    letter: Integer;    // drive letter
rwflags: DWORD;     // read/write capability flags
canopen: BOOL;      // BASS_CD_DOOR_OPEN/CLOSE is supported?
canlock: BOOL;      // BASS_CD_DOOR_LOCK/UNLOCK is supported?
maxspeed: DWORD;    // max read speed (KB/s)
cache: DWORD;       // cache size (KB)
cdtext: BOOL;       // can read CD-TEXT
  end;

Ian @ un4seen

  • Administrator
  • Posts: 20401
Re: BASS 2.4 beta
« Reply #35 on: 6 Jan '08 - 13:14 »
Oops! A correction is in the BASSCD download now.

Gamo

  • Posts: 97
Re: BASS 2.4 beta
« Reply #36 on: 8 Jan '08 - 10:00 »
Ian,
 In bassmidi.
 Is it possible to get/set tempo while it playing?
 Can I get the current MIDI tick from API? I don't prefer the accruracy value the approximate value should be enough.

Thank you.

Ian @ un4seen

  • Administrator
  • Posts: 20401
Re: BASS 2.4 beta
« Reply #37 on: 9 Jan '08 - 16:34 »
In bassmidi.
 Is it possible to get/set tempo while it playing?

Here are a couple of threads about that...

   http://www.un4seen.com/forum/?topic=7468
   http://www.un4seen.com/forum/?topic=7530

Can I get the current MIDI tick from API? I don't prefer the accruracy value the approximate value should be enough.

I've put up a BASSMIDI update with tick positioning support. BASS_ChannelSetPosition required a small modification to support seeking in ticks, so a BASS update is also up. I've not tested it much yet, so please report any problems.

Gamo

  • Posts: 97
Re: BASS 2.4 beta
« Reply #38 on: 10 Jan '08 - 04:11 »
Ian,
    Get/Set tempo is worked perfectly.
To get the MIDI tick that you mention. I don't understand that Could you give me the code example to do that?

Thank you.
« Last Edit: 10 Jan '08 - 04:14 by Gamo »

nr1

  • Posts: 78
Re: BASS 2.4 beta
« Reply #39 on: 11 Jan '08 - 10:33 »
I notices another issue with the new bass dll's:

With bass / bass_fx 2.3 it was possible to set the samplerate on high values (example: 300000 or 400000).

The new version just allows me to set it at a max of 200000.

I need this high values for a backspin function.

Ian @ un4seen

  • Administrator
  • Posts: 20401
Re: BASS 2.4 beta
« Reply #40 on: 11 Jan '08 - 14:14 »
To get the MIDI tick that you mention. I don't understand that Could you give me the code example to do that?

Use BASS_MIDI_StreamGetTickPosition to get the tick position, and BASS_MIDI_StreamGetTicks to get the total number of ticks. For example...

Code: [Select]
printf("tick = %d / %d\n", BASS_MIDI_StreamGetTickPosition(midi), BASS_MIDI_StreamGetTicks(midi));

Btw, I realised that it would not return the correct tick position if the tempo is changed (via BASS_MIDI_StreamEvent), so I've put up another BASSMIDI update that hopefully will :)

I notices another issue with the new bass dll's:

With bass / bass_fx 2.3 it was possible to set the samplerate on high values (example: 300000 or 400000).

The new version just allows me to set it at a max of 200000.

200000 is the DirectSound limit. If you were able to set 300000-400000 previously, I suspect you were doing so via the BASS_FX tempo stuff, ie. BASS_FX_TempoSet?

nr1

  • Posts: 78
Re: BASS 2.4 beta
« Reply #41 on: 11 Jan '08 - 14:23 »

200000 is the DirectSound limit. If you were able to set 300000-400000 previously, I suspect you were doing so via the BASS_FX tempo stuff, ie. BASS_FX_TempoSet?

Yes, with Bass 2.3 i did it via "BASS_FX_TempoSet". Is there a possibility in 2.4 to get rates over 200000?

Renegade

  • Posts: 160
BASS 2.4 Beta Question - API Final?
« Reply #42 on: 13 Jan '08 - 04:11 »
A quick question about the 2.4 beta:

Is it "feature complete" as in the API will not change?

Ian @ un4seen

  • Administrator
  • Posts: 20401
Re: BASS 2.4 beta
« Reply #43 on: 13 Jan '08 - 15:07 »
Yes, with Bass 2.3 i did it via "BASS_FX_TempoSet". Is there a possibility in 2.4 to get rates over 200000?

I guess that should still be possible via the tempo stuff. In place of BASS_FX_TempoSet, use BASS_ChannelSetAttribute (BASS_ATTRIB_TEMPO_FREQ).

A quick question about the 2.4 beta:

Is it "feature complete" as in the API will not change?

I am currently considering adding a "flags" parameter to BASS_ChannelSetPosition (replacing MAKEMUSIC/TICKPOS macros and BASS_MUSIC_POSRESET flags, and maybe some other stuff). I don't have any other API changes in mind.

nadia

  • Posts: 302
Re: BASS 2.4 beta
« Reply #44 on: 14 Jan '08 - 13:14 »
Hello,  ;D

I can see that this new version addresses several 64 bits issues: is version 2.4 now compatible with x64 versions of Windows?

Kind Regards  ;D

Nadia

Ian @ un4seen

  • Administrator
  • Posts: 20401
Re: BASS 2.4 beta
« Reply #45 on: 14 Jan '08 - 16:38 »
Not yet, but if all goes according to plan, a 64-bit version should be available shortly after the 32-bit version :)

SoundMike

  • Posts: 331
Re: BASS 2.4 beta
« Reply #46 on: 16 Jan '08 - 00:01 »
2.4 versions of BASS_APE and BASS_AC3 are also required. This may apply to some other plugins as well, but these are two plugins I've been trying out.

When starting the app with the 2.3 plugins loaded, I get a message box displayed from each one stating: "Incorrect BASS.DLL version (2.3 is required)".

In 2.4 could we get a change so that an incorrect version number is reported with a BASS error code in BASS_PluginLoad (instead of the plugin displaying an error message box), or alternatively is it possible to obtain the plugin version prior to attempting to load the plugin?
« Last Edit: 16 Jan '08 - 04:33 by SoundMike »

Gamo

  • Posts: 97
Re: BASS 2.4 beta
« Reply #47 on: 16 Jan '08 - 06:41 »
Hi Ian,

  I have try to get Tick position by using the API. It return difference value that I calculate in my program.

  Here is the code that I used and it work correctly. I compare with directmusic (The microsoft DirectX).

BTime = (BASS_ChannelBytes2Seconds(chan, BASS_ChannelGetPosition(chan)) * 1000)
DeltaTime = ((BTime / (60000 / (bpm * ppqn))) / 1000)

I am not sure that the tick position that you provide and DirectX provide is same value.

Ian @ un4seen

  • Administrator
  • Posts: 20401
Re: BASS 2.4 beta
« Reply #48 on: 16 Jan '08 - 16:14 »
2.4 versions of BASS_APE and BASS_AC3 are also required.

I have now put up a BASS_APE 2.4 update (see first post). I'll add BASS_AC3 later.

When starting the app with the 2.3 plugins loaded, I get a message box displayed from each one stating: "Incorrect BASS.DLL version (2.3 is required)".

In 2.4 could we get a change so that an incorrect version number is reported with a BASS error code in BASS_PluginLoad (instead of the plugin displaying an error message box)...

API differences could cause stack faults, so I think add-ons will still have to fail to load when linked with the EXE, but it may be ok to make them just produce BASS_ERROR_VERSION errors when loaded dynamically, eg. via BASS_PluginLoad. I'll look into that for the 2.4 release.

  I have try to get Tick position by using the API. It return difference value that I calculate in my program.

  Here is the code that I used and it work correctly. I compare with directmusic (The microsoft DirectX).

BTime = (BASS_ChannelBytes2Seconds(chan, BASS_ChannelGetPosition(chan)) * 1000)
DeltaTime = ((BTime / (60000 / (bpm * ppqn))) / 1000)

I am not sure that the tick position that you provide and DirectX provide is same value.

Where are you getting the "bpm" and "ppqn" values from, and is "BTime" floating-point or integer?

Btw, how far apart are BASSMIDI and your calculation?

saga

  • Posts: 2180
Re: BASS 2.4 beta
« Reply #49 on: 16 Jan '08 - 17:30 »
I just upgraded my projects to the bass2.4 api - great work, the new SetAttribute Syntax is quite useful! so thank you Ian for another great release! ;D