BASS.NET API 2.4.18.2

Started by radio42,

riesm

A question about TAG_INFO (native tags). In Vista you can give ratings to all audio files in the explorer. All my MP3 tagger programs see this rating (MP3 Tagger calls it WMP RATING). However BASS.NET does not return this tag as native tag. Am I doing something wrong or is this not implemented? Would be great if it was!

Another question, would it be possible to implement a SAVE function for the TAG_INFO structure? I know of no other possibilities besides ancient ActiveX controls that can save tags back to files. Would be great if this could be managed in .NET directly. Hope to hear from you.

Cheers,
riesm

radio42

The native tag list will contain all native tags present in the file - also the "Rating" tag - if present in the file.
So it must be set on a file explicitly. If it doesn't exist in the native tag list it is simply not there in the file ;-)

However, there are currently no plans to include TAG writing within BASS.NET.
I know this would be nice, but...
...you might do this by yourself :-)
Take a look to the WMASDK...there is plenty of .Net source code available which shows how to implement TAG writing using the WMASDK.

The reason, why I don't want to add TAG writing support is the following:
- I could also use the WMASDK stuff - but that would nail every application to have WMA support - and even the MediaPlayer installed on the system
- the WMASDK only supports WMA and MP3 ID3 tag writing...so what about the other formats
- I could try to implement some other formats myself...but...that would require to much work as of today
In essence:
There is good lib out there (AudioGenie) which is in fact an ActiveX control - but works nicely!
So I preffer to leave that task to some other folks :-(

ken

I just started a project where I need ASIO.

But I can't get it to play??

I test "simple ASIO" but no... I add BASS_ASIO_GetDeviceDescription for listing my devices and get:

ASIO 2.0 - ESI MAYA44
ASIO Digidesign Driver
ASIO for EWS88 MT/D
BCD3000 ASIO
Hercules DJ Console ASIO
Maya44 USBAudio ASIO driver

and when "init" ASIO i get back: 

if (Bass.BASS_Init(0, 48000, 0, 0, null) && BassAsio.BASS_ASIO_Init(comboBox1.SelectedIndex))
Name=BCD3000-1 , Group=0, Format=BASS_ASIO_FORMAT_16BIT
Name=BCD3000-2 , Group=0, Format=BASS_ASIO_FORMAT_16BIT
Name=BCD3000-3 , Group=0, Format=BASS_ASIO_FORMAT_16BIT
Name=BCD3000-4 , Group=0, Format=BASS_ASIO_FORMAT_16BIT

But I can't get it to play.  My devices works fine in ex ViryualDJ (in ASIO mode) and i restarded Windows (Win XP) but same resault.

And yes, I have the latest BASS, BASSasio, and BASS.NET  (downloaded today)

Any ideas?  Is ASIO that tricky?

radio42

No, but it is a little different ;-)

Take a look to the BASS.NET provided C# sample called "SimpleAsio" or "SimpleAsioFX"...that will give you some hints I guess.

ken

#244
I just did!  They don't work.  I just tested the compiled c++ exaples that somed with BASSasio and they work.  I don't get it.

edit: Even the VB6 example for BASSasio, works..?

And your SimpleAsioFX, when "play" the VU meter move and position, but no sound. Have checked my ASIO control panel. Why???

ken

Quote from: radio42No, but it is a little different ;-)

Take a look to the BASS.NET provided C# sample called "SimpleAsio" or "SimpleAsioFX"...that will give you some hints I guess.

I found an older version of BASS.NET compiled, 2.3.0.6  and SimpleAsio works fine. But the not latest version 2.3.1.7.

ken

Correction. In that older version. I also hade an older BASSasio.

If I take that older Bassasio and use with latest BASS.NET it works!  I dont know the version but I notised that the function "ChannelSetVolume is not in that bassasio.dll

Hope that helps  ???

radio42

What compile error do you get? - seems I don't get any here!

ken

No, I don't get any compile error.

I come to the conclution that the latest bassasio.dll don't work with BASS.NET (stangly works in VB6 and C++ example)

Strange this is also that your SimpleAsioFX app runs fine, the VU meters show signal and position is roling, but there is no sound.  But do I use a older version of bassasio.dll then I get sound. But in that version I get error when calling "BASS_ASIO_ChannelSetVolume" 

So mabey something wrong with volume handeling in BASS.NET vs latest bassasio  (version from 23 Aug '07)  ?

radio42

Ahh, I didn't know, that Ian already released that new version for ASIO ;-)

Yes, the signature of the ASIOPROC has changed (it now expects a return value).
The advantage is, that now the user ASIOPROCs doesn't need to fill remaining buffer samples with 0's.

Here is the BASS.NET update for .Net 2.0:
.Net 2.0 build : Click here

Just copy it to your installation directory.

Pls note, that you also would need to change the sample code, e.g. in the "SimpleAsio" the AsioCallback now would lok like this:
// the main ASIO callback - filling the ASIO buffer with sample data to play...
private int AsioCallback(bool input, int channel, IntPtr buffer, int length, int user)
{
    // Note: 'user' contains the underlying stream channel
    int decLength = Bass.BASS_ChannelGetData(user, buffer, length);

    // on error, we need to set the return value to 0!
    if (decLength < 0)
        decLength = 0;
    return decLength;
}


P.S.: This update also adds a new feature to the EncoderOGG supporting oggenc2.2.84 !

ken

Great!

ASIO is fun... specialy your "BassAsioHandler" that makes life so easier... I did use a BassMixerand DSP_StreamCopy and acomplish what i wanted (cueing chanels on a different device), and in ASIO "StreamCopy" is realy perfect cloning of a channel, it plays identic on the other channel even true BassMixer, that comparing to DirectSound is some differens i sync!  I like!

Thanks!

radio42

You're welcome - THX!

P.S.: You might also play with the new "DSP_BufferStream" - which also generates a 'clone' of a decoding stream.
That DSP is even a little bit more efficient and faster as the DSP_StreamCopy.
The limitation is, that the "DSP_BufferStream" does not support multiple readers.
Note: If using the "DSP_BufferStream" take care of the "IsOutputBuffered" property - e.g. for Asio this one needs to be set to FALSE.

radio42

26.08.2007: Version 2.3.1.8 is out!

AddOn.Tags:
    - bug-fix reading non zero-terminated ID3v1 tags
Misc:
    - EncoderOGG: supporting new oggenc2.84 version (which now accepts 32bit float input from STDIN)
    - EncoderFAAC: now using BASS_ENCODE_FP_24BIT when using 32bit float input from STDIN
      (currently FAAC doesn't like 32bit float input from STDIN)
WaveForm: new volume curve options (e.g. see AddVolumePoint)
                and DrawWave type WAVEFORMDRAWTYPE.HalfMono added
BASSasio: Upgrade supporting final BASSASIO v1.0.0.0
              (ASIOPROC signature change: must now return the number of bytes written)
BASS_VIS: support for version 2.3.2.1 added

jeroenp

Quote from: radio4226.08.2007: Version 2.3.1.8 is out!
...
BASSasio: Upgrade supporting final BASSASIO v1.0.0.0
              (ASIOPROC signature change: must now return the number of bytes written)

It seemed that after an uninstall of 2.3.1.7 and an install of 2.3.1.8, the GAC still contains the 2.3.1.7 assembly.
Actually, thas was my fault, as I forgot Bass.Net.dll is not put into the GAC by default.

This resulted in me not noticing the ASIOPROC breaking change didn't show up after a recompile (and in fact no new functionality was seen at all).

So: can you install it into the GAC by default? and uninstall from GAC upon uninstallation?


Oh, and thanks for fixing the BASS_ASIO_GetDeviceCount() and BASS_ASIO_GetDeviceDescriptions() issues!

Regards,

--jeroen

radio42

The install doesn't put anything into the GAC (as you mentioned) - so there would also be no need to remove it ;-)
So what's the point in ´putting it also into the GAC at all?

jeroenp

Signed libraries should go into the GAC, applications should go into their own directory.

--jeroen

radio42

That's just a recommendation - but it doesn't gain anything.
Many libs don't place theirself to the GAC.
So the question stays: what is the real advantage of having a lib in the GAC - since that would anyhow only have an effect to the development side of the world - but for me no real bennefit.

BassPassion

Quote from: radio42That's just a recommendation - but it doesn't gain anything.
Many libs don't place theirself to the GAC.
So the question stays: what is the real advantage of having a lib in the GAC - since that would anyhow only have an effect to the development side of the world - but for me no real bennefit.

There are scenarios where it is preferably to have an assembly in the GAC.
For instance, if you are compiling the assemblies with NGen, they should be placed in the GAC.
Otherwise the CLR loader has to verify the assembly; compute the hash and compare the assembly's signature at load-time.
These steps are not neccessary for the CLR-loader if the assemby is in the GAC.

Albeit the gain is small in today's fast CPU's/HD's, but it does exist.

/Magnus

radio42

Yes, but everyone can install BASS.NET in the GAC if he wants to do so.

By the default installation process I don't do so, since that would require Admin rights - which I can not always ensure, e.g. on Vista.

So I still think it is better to leave the descission to place BASS.NET in the GAC to the developer in question.
So everyone who needs/wants BASS.NET in the GAC ... feel free to do so...

BassPassion

Quote from: radio42Yes, but everyone can install BASS.NET in the GAC if he wants to do so.

By the default installation process I don't do so, since that would require Admin rights - which I can not always ensure, e.g. on Vista.

So I still think it is better to leave the descission to place BASS.NET in the GAC to the developer in question.
So everyone who needs/wants BASS.NET in the GAC ... feel free to do so...

Yes, I forgot to mention that also.
I agree that this is a decision that each developer has to make, wether their assemblies, including the Bass.Net assembly, should be placed in the GAC or not.
I think the Bass.Net installation doesn't need a change in this matter.

Thanks for the good work on the Bass.Net product.

/Magnus