Author Topic: BASS.NET API 2.4.17.5  (Read 1126369 times)

radio42

  • Posts: 4839
Re: BASS .NET API 2.3.1.0 !
« Reply #150 on: 4 Jan '07 - 19:44 »
05.01.2007: Version 2.3.1.0 is out!

Windows Vista and .Net 3.0 compatibility build:
A few small internal issues have been resolved mostly with the xxxGetInfo methods. This was due to a different marshaling behavior of .Net 2.0 resp. .Net 3.0 and Windows Vista. The new .Net 3.0 framework (which already comes with Windows Vista) is based on .Net 2.0. The main difference of .Net 3.0 are the several foundation extensions. So .Net 3.0 = .Net 2.0 plus foundations. BASS.NET for .Net 2.0 now also fully supports the .Net 3.0 framework!

BassTAG: small bug-fix when reading empty ID3 tags

BASS 2.3.0.2 support added:
- BASS_SampleGetChannels (Retrieval of a sample's existing channel handles)
- BASS_DATA_FFT8192 (BASS_ChannelGetData flag)
- Adjustable recording buffer with BASS_CONFIG_REC_BUFFER (BASS_SetConfig option)
- Stopping decoding channels before end with BASS_ChannelStop
- Sample channels created paused to prevent overriding before playback with BASS_SampleGetChannel
- BASS_CONFIG_MP3_CODEC *removed* !!! (Separate "MP3-FREE" version using Windows MP3 decoder)

ken

  • Posts: 752
Re: BASS .NET API 2.3.1.0 !
« Reply #151 on: 14 Jan '07 - 23:04 »
Maby offtopic...

I create an .NET 3.0 app using Bass .NET no proplem with simple playback. But using events is another thing, the invoke I used in 2.0 don't work in 3.0, I searched the net but not found a solution.

This dont work:
Code: [Select]
// .Net 2.0 or above only!   
BeginInvoke( (MethodInvoker)delegate()   
{        // This runs on the UI thread!       
this.Text = data;   
} );


I found this for 3.0, but can't get it working.
Code: [Select]

if(textbox.Dispatcher.CheckAccess())
{
   // The calling thread owns the dispatcher, and hence the UI element
   textbox.AppendText(...);
}
else
{
   // Invokation required
   textbox.Dispatcher.Invoke(DispatcherPriority.Normal, delegate);
}




help...

radio42

  • Posts: 4839
Re: BASS .NET API 2.3.1.0 !
« Reply #152 on: 15 Jan '07 - 10:43 »
.Net 3.0 is actually based on the .Net 2.0 framework version but just has additional foundation components.
All code which runs under .Net 2.0 should 'normally' also run under .Net 3.0.

So what errors do you exactly get under .Net 3.0 and under which OS are running .Net 3.0 (Vista)?

However, here is some simple delegate which works fine for .Net 2.0 and .Net 3.0:
(it is taken from the C# Endoder demo code)
Code: [Select]
// in your code which is executed from a non-UI thread, call:
this.BeginInvoke(new UpdateDelegate(UpdateDisplay), new object[] { maxL, maxR });
Code: [Select]
public delegate void UpdateDelegate(int maxL, int maxR);
private void UpdateDisplay(int maxL, int maxR)
{
this.progressBarRecL.Value = maxL;
this.progressBarRecR.Value = maxR;
DrawWave();
}

ken

  • Posts: 752
Re: BASS .NET API 2.3.1.0 !
« Reply #153 on: 15 Jan '07 - 11:49 »
Yes I know 3.0 is based on 2.0 with new stuff like WPF and so. Well there is no Invoke or BeginInvoke in the framework. I think it's in System.Windows.Forms, and that is different in 2.0 and 3.0. Im doing a WPF application in .NET 3.0.

I coding an a XP Pro with .NET 3.0 installed, I have tested running the app on Vista and that works. (exept VU update).

The code you provided do you run that in .NET 3.0 WPF application, not a 2.0 app?




radio42

  • Posts: 4839
Re: BASS .NET API 2.3.1.0 !
« Reply #154 on: 15 Jan '07 - 12:46 »
Nop, it is a classic .Net 2.0/.Net 3.0 Windows Forms application - so not based on the new WPF.

So I am not in case of WPF, if they are already capable of handling Invokations and if Invokations are needed at all?
Have you tried your WPF code without any "BeginInvoke"?

ken

  • Posts: 752
Re: BASS .NET API 2.3.1.0 !
« Reply #155 on: 15 Jan '07 - 14:16 »
Yes I tried without BeginInvoke (In WPF) same problem as in 2.0. (threading)

Well I have to digg more on Google, If you find time please test makeing a WPF application.

Microsoft Expression Blend is a great tool for designing WPF apps: http://www.microsoft.com/products/expression/en/expression-blend/default.mspx


Lars Vinter

  • Posts: 2
Re: BASS .NET API 2.3.1.0 !
« Reply #156 on: 16 Jan '07 - 14:13 »
- BASS_CONFIG_MP3_CODEC *removed* !!! (Separate "MP3-FREE" version using Windows MP3 decoder)

Hmm.... Newbie here :-) How do I configure Bass to use a specific mp3-decoder codec (like Lame, FhG, mad etc.) if I don't want to use the Windows MP3 decoder?
(Only talking about decoding mp3s - not encoding).

Regards

big_gun

  • Posts: 353
Re: BASS .NET API 2.3.1.0 !
« Reply #157 on: 16 Jan '07 - 20:47 »
Bass itself is a decoder, but you can use that m3_free or whatever const to use the default windows decoder.

radio42

  • Posts: 4839
Re: BASS .NET API 2.3.1.0 !
« Reply #158 on: 16 Jan '07 - 22:33 »
First we need to differentiate between decoding and encoding:
For encoding (converting to MP3 or any other format) you might use the BASSenc add-on.
So encoding should be straight forward as shown in the BASSenc doc.

When it comes to decoding there are two version out:
a) The good old BASS internal decoder
b) the option to use the Windows MP3 decoder

The whole reason behind seperating these two decoders are patent and license issues.
MP3 encoding and decoding requires you as a product developer to have a legal patent license which can be obtained by Thomson.
It is not the BASS lib, but your product which needs to be licensed!
So if you are building a product based on the BASS internal decoder YOU need to buy a MP3 license from Thomson!
Unfortunately some folks would like to avoid this ;-)

The solution is using the Windows MP3 decoder!
Since here Microsoft has already paid the license for you!
So don't blame on Microsoft too much...

With version 2.3.0.1 there are now two versions of the bass.dll available:
a) the standard on in the main directory based on the BASS internal MP3 decoder
b) the on the 'mp3-free' directory which is using the Windows based MP3 decoder

If you are using the standard BASS based decoder...your product needs a Thomson license and you have to pay.
If you are using the Windows based Mp3 decoder version...all is for free.

Lars Vinter

  • Posts: 2
Re: BASS .NET API 2.3.1.0 !
« Reply #159 on: 16 Jan '07 - 22:54 »
Thank you for the reply - it did, however, give birth to a few more questions :-)

The whole reason behind seperating these two decoders are patent and license issues.
MP3 encoding and decoding requires you as a product developer to have a legal patent license which can be obtained by Thomson.

Would this be the case also if my application were to be released under GPL?

With version 2.3.0.1 there are now two versions of the bass.dll available:
a) the standard on in the main directory based on the BASS internal MP3 decoder
b) the on the 'mp3-free' directory which is using the Windows based MP3 decoder

Do you know of the differences between these two with respect to sound quality and performance?

I really want to avoid nasty mp3 side effects (flanger, weak transients etc.) by using the best available mp3-decoder. However, my application also needs to decode approx 15 streams at a time (!) - so speed is also on my mind (as the application will run on a "normal" consumer pc).

I think I'm gonna run a test both ways and see what I can learn from this, but if you have any experience in the differences between the two, it certainly would be nice to hear them upfront.

radio42

  • Posts: 4839
Re: BASS .NET API 2.3.1.0 !
« Reply #160 on: 16 Jan '07 - 23:53 »
Quote
Would this be the case also if my application were to be released under GPL?
I guess so, yes. But to be sure you'll need to ask Thomson!

Quote
Do you know of the differences between these two with respect to sound quality and performance?
Sound quality should be almost the same, since decoding is decoding - there couldn't be something added which is not present. The sound quality is mainly effected be the encoding process!
In terms of performance: BASS is slightly faster and uses less resources.

Quote
I think I'm gonna run a test both ways and see what I can learn from this...
In your case this is really recommended. I would do the same!

ken

  • Posts: 752
Re: BASS .NET API 2.3.1.0 !
« Reply #161 on: 17 Jan '07 - 13:46 »
Intresting...

Well wich flag to use for internat decoding or "windows" decoding?


radio42

  • Posts: 4839
Re: BASS .NET API 2.3.1.0 !
« Reply #162 on: 17 Jan '07 - 13:51 »
In BASS v2.3.0.1 and below there is still the "BASS_CONFIG_MP3_CODEC" flag (used with BASS_SetConfig)

Form BASS v2.3.0.2 and above there will be no flag anymore. Instead two seperate BASS dll's will be shiped.

Ian @ un4seen

  • Administrator
  • Posts: 26035
Re: BASS .NET API 2.3.1.0 !
« Reply #163 on: 17 Jan '07 - 15:07 »
Do you know of the differences between these two with respect to sound quality and performance?

Besides what Bernd already said above, the only other real difference to note is that the Windows decoder can't produce floating-point output, so BASS has to convert it to floating-point for floating-point channels (BASS_SAMPLE_FLOAT). That means floating-point channels will take slightly more CPU compared to 16-bit when using the Windows decoder, which is opposite to the BASS decoder (it decodes in floating-point and then converts to 16-bit if necessary). This doesn't apply to OSX users, as the OSX decoder can produce floating-point output.

Regarding your earlier question of choosing which MP3 decoder to use (if you have multiple decoders installed), you can set the order in the Audio Codecs Properties control panel. Note the Windows default decoder is produced by Fraunhofer.

radio42

  • Posts: 4839
Re: BASS .NET API 2.3.1.0 !
« Reply #164 on: 22 Jan '07 - 16:10 »
The current BASS.NET API v2.3.1.0 is already fully BASS v2.3.0.2 enabled - so no update will be needed.

However, note, that there is already an update out, which supports the new BASS_VIS v.2.3.0.3.
Here you can find the latest update (which is already a pre-BASS.NET v2.3.1.1 version):

.Net 1.1. build : http://www.un4seen.com/filez/4/Bass23.Net11_update.zip
.Net 2.0 build : http://www.un4seen.com/filez/4/Bass23.Net20_update.zip

Make sure to copy the included files to your install directory!

Have fun...

mitchjs

  • Posts: 15
Re: BASS .NET API 2.3.1.0 !
« Reply #165 on: 30 Jan '07 - 03:30 »
the .net stuff is great!!

i am using strong named assemblies...
so to use your's as a sub assembly it must be strong named...

could you strong name your .net api for us :)

thanks so much

mitch

radio42

  • Posts: 4839
Re: BASS .NET API 2.3.1.0 !
« Reply #166 on: 30 Jan '07 - 08:18 »
The BASS.NET API is already strong-named!
:-)

mitchjs

  • Posts: 15
Re: BASS .NET API 2.3.1.0 !
« Reply #167 on: 31 Jan '07 - 00:19 »
sorry, you are right

my eyes must have seen "false" somewhere...

great work on this thing!

oh one thing.. might not be .net related but

when i
Code: [Select]
_visPlugin = BassVis.BASS_WINAMPVIS_CreateVis(@"visPlugins\vis_avs.dll", 0, (int)BASSVISCreate.BASS_VIS_NOINIT, this.Handle, true);

i get
Code: [Select]
PInvokeStackImbalance was detected
Message: A call to PInvoke function 'Bass.Net!Un4seen.Bass.AddOn.Vis.BassVis::BASS_WINAMPVIS_CreateVis' has unbalanced the stack. This is likely because the managed PInvoke signature does not match the unmanaged target signature. Check that the calling convention and parameters of the PInvoke signature match the target unmanaged signature.

any idea?

thanks
mitch

mitchjs

  • Posts: 15
Re: BASS .NET API 2.3.1.0 !
« Reply #168 on: 31 Jan '07 - 00:46 »
here is a note...
i get same error on BASS_WINAMPVIS_Free

i looked at the help file for the bass_vis.dll it actually takes 2 params

so i imported that function my self, created


Code: [Select]
[DllImport("bass_vis.dll")]
  private static extern bool BASS_WINAMPVIS_Free(int handle, int VisCounter);

and used that... and no stack error

mitch

mitchjs

  • Posts: 15
Re: BASS .NET API 2.3.1.0 !
« Reply #169 on: 31 Jan '07 - 00:55 »
yes!

all fixed when i do my own inports of bass_vis.dll

did bas_vis.dll change on you?

mitch

radio42

  • Posts: 4839
Re: BASS .NET API 2.3.1.0 !
« Reply #170 on: 31 Jan '07 - 07:52 »
Yes, just scroll up a bit on this thread and you'll find the following:

----
The current BASS.NET API v2.3.1.0 is already fully BASS v2.3.0.2 enabled - so no update will be needed.

However, note, that there is already an update out, which supports the new BASS_VIS v.2.3.0.3.
Here you can find the latest update (which is already a pre-BASS.NET v2.3.1.1 version):

.Net 1.1. build : http://www.un4seen.com/filez/4/Bass23.Net11_update.zip
.Net 2.0 build : http://www.un4seen.com/filez/4/Bass23.Net20_update.zip

Make sure to copy the included files to your install directory!

Have fun...

BassFan

  • Guest
Re: BASS .NET API 2.3.1.0 !
« Reply #171 on: 31 Jan '07 - 09:48 »
Yes, just scroll up a bit on this thread and you'll find the following:

----
The current BASS.NET API v2.3.1.0 is already fully BASS v2.3.0.2 enabled - so no update will be needed.

However, note, that there is already an update out, which supports the new BASS_VIS v.2.3.0.3.
Here you can find the latest update (which is already a pre-BASS.NET v2.3.1.1 version):

.Net 1.1. build : http://www.un4seen.com/filez/4/Bass23.Net11_update.zip
.Net 2.0 build : http://www.un4seen.com/filez/4/Bass23.Net20_update.zip

Make sure to copy the included files to your install directory!

Have fun...

i working on a C# Sample for BassVis from mitchjs... it's work now
And will it insert in the BassVis Archive when mitchjs say ok!

Sorry for my english .. hihihiihihhi

Ich arbeite gerade an den C# Sample von mitchjs.
Es funktioniert ganz gut
Wenn mitchjs sein OK gibt dann addiere ich es im Archiv für BassVis


greets
« Last Edit: 31 Jan '07 - 13:58 by BassFan »

radio42

  • Posts: 4839
Re: BASS .NET API 2.3.1.0 !
« Reply #172 on: 31 Jan '07 - 14:40 »
Super!  sounds great!!!

If you want - pass me the sample to add it to BASS.NET

BassFan

  • Guest
Re: BASS .NET API 2.3.1.0 !
« Reply #173 on: 31 Jan '07 - 15:20 »
Super!  sounds great!!!

If you want - pass me the sample to add it to BASS.NET

jo keine problem ;)
Habe aber die XML und NET.dll aus dem Archiv rausgeschmissen
Wird ja neu erstellt wenn compiliert wird.

Warte noch auf mitch das er mir sein OK dafür gibt.
Ist ja auch ein teil von ihm im Source ;)

gruss

mitchjs

  • Posts: 15
Re: BASS .NET API 2.3.1.0 !
« Reply #174 on: 31 Jan '07 - 16:04 »
that code isnt ready for public!

its to messy and needs more work

since i couldnt get beat data into vis...
i think it was cause of my .net api was the 2.3.1.0 not the 2.3.1.1

ill clean up and make a nicer demo

thanks
mitch