Author Topic: BASS.NET API 2.4.12.7  (Read 783588 times)

radio42

  • Posts: 4576
Re: BASS.NET API 2.4.4.1
« Reply #600 on: 16 Mar '09 - 15:30 »
16.03.2009: Version 2.4.4.1 is out.

BASS_SFX: added support for v3.0.0.0
BASS_FX: added support for v2.4.3.2
BASS_AAC: added support for v2.4.2.0
BassVis: added support for v2.4.1.6

BASS.NET:
Full Install:
  www.un4seen.com/filez/4/Bass24.Net.zip

Lib only:
  www.un4seen.com/filez/4/Bass24.Net_update.zip


P.S.: As Emil decided to not drop the BassVis development - BASS.NET will still main the BassVis add-on :-)
« Last Edit: 16 Mar '09 - 15:41 by radio42 »

WarMacre

  • Posts: 18
Re: BASS.NET API 2.4.4.1
« Reply #601 on: 17 Mar '09 - 03:09 »
You are pretty prompt with the responses aren't you radio42? ;)

I may have exaggerated the extent of the typos, so I apologise for that.

However, in the same sub as previously corrected:

Code: [Select]
Dim length As Integer = Bass.BASS_ChannelGetData(channel, ref sampleData(0), length20ms)
I'm guessing should be:

Code: [Select]
Dim length As Integer = Bass.BASS_ChannelGetData(channel, sampleData, length20ms)

If I find anymore in the process of using your help files I will post here.

Thanks for the excellent service. 8)

radio42

  • Posts: 4576
Re: BASS.NET API 2.4.4.1
« Reply #602 on: 17 Mar '09 - 09:02 »
Yes, you might be correct. I'll fix that as well in the VB examples (as I am really not a VB guy ;-)

EWeiss

  • Posts: 355
Re: BASS.NET API 2.4.4.1
« Reply #603 on: 17 Mar '09 - 09:53 »
Quote
P.S.: As Emil decided to not drop the BassVis development - BASS.NET will still main the BassVis add-on :-)
i will make BassVis Open Source when i have no longer Interest on it.
and upload to the BassVis Wrapper Project .. not yet !!!

greets

radio42

  • Posts: 4576
Re: BASS.NET API 2.4.4.2
« Reply #604 on: 2 Apr '09 - 15:20 »
02.04.2009: Version 2.4.4.2 is out!

BASS_FX: added support for v2.4.4.0
BASS_SFX: added support for v2.4.1.1
BASSCD: added support for v2.4.2.0
BASSMIDI: added support for v2.4.3.0
General:
BREAKING CHANGE NOTE: Bass.BASS_Init signature change!!!
The last clsid parameter has been removed in the default overload of BASS_Init!
So unless you are working with a certain clsid you can simply remove the last parameter from your call.
See the help file for more info and samples.

BASS.NET:
Full Install:
  www.un4seen.com/filez/4/Bass24.Net.zip

Lib only:
  www.un4seen.com/filez/4/Bass24.Net_update.zip

brown_eagle_fly

  • Posts: 3
Re: BASS.NET API 2.4.4.2
« Reply #605 on: 6 Apr '09 - 17:14 »


Hi,

Excuse my ignorance, probably I did not look properly on the site,
I would like to know, is there like a centralized repository / chm document or something for the this API, for a quick start-up, or usage samples are best way of learning it?

Thank you

radio42

  • Posts: 4576
Re: BASS.NET API 2.4.4.2
« Reply #606 on: 6 Apr '09 - 18:02 »
Sure.
When you install BASS.NET it comes with 2 different help systems:
a) a single Bass.Net.chm file which will be placed to your install folder
b) an integrated MSHelp system, which automatically installs and integrates into your VisualStudio environment (to just let you press F1 from your source code)

In addition a complete set of sample/demo applications will be installed to your <AppUser> directory:
e.g. under Vista this will be "C:\Users\<username>\AppData\Roaming\BASS.NET\Samples"

GambitKZ

  • Posts: 9
Re: BASS.NET API 2.4.4.2
« Reply #607 on: 15 Apr '09 - 22:58 »
I can't understand, how to extract audio from video file using bassvideo.
Because  Bass.Net haven't "BassVideo_EncoderAudio".
What to do?

radio42

  • Posts: 4576
Re: BASS.NET API 2.4.4.2
« Reply #608 on: 15 Apr '09 - 23:03 »
I'll take a look into the BASS.NET API for BassVideo - it might actually be, that I overlooked the function you mentioned, as the versioning and releases of BassVideo as sometimes a bit confusing... ;-)

radio42

  • Posts: 4576
Re: BASS.NET API 2.4.4.2
« Reply #609 on: 16 Apr '09 - 09:43 »
The function "BassVideo_EncoderAudio" has actually been removed from the latest BassVideo version - that's why it has also been removed from the BASS.NET API.
I'll guess, that you now have to use BASS_Video_EncoderCreate. But I am also not fully sure - so at best you leave more detailed BassVideo questions to the BassVideo forum topic.

GambitKZ

  • Posts: 9
Re: BASS.NET API 2.4.4.2
« Reply #610 on: 21 Apr '09 - 19:51 »
Thanks.

Latch

  • Posts: 90
Re: BASS.NET API 2.4.4.2
« Reply #611 on: 25 Apr '09 - 20:10 »
Does the Bass.Net API work with the new 64 bit versions of the Bass Modules?  If so, is there anything we need to change?

Creastar

  • Posts: 2
Re: BASS.NET API 2.4.4.2
« Reply #612 on: 26 Apr '09 - 22:58 »
Hi, I wanted to ask if there is any way to incorporate the use of bass.net w/ out it minimizing the program you're using it in, in order to display the splash screen ?
Its being used in a totally free mod but its minimizing the program that the mod is being used in. Is it possible to incorporate the splash in some other way, like as part of the initial mod installation as opposed to a bass.net splash screen every time the program using the mod, is run ? Thanks for any helpful suggestions!

radio42

  • Posts: 4576
Re: BASS.NET API 2.4.4.2
« Reply #613 on: 27 Apr '09 - 10:21 »
Quote
Does the Bass.Net API work with the new 64 bit versions of the Bass Modules?
Yes - you just need to make sure to use the native x64 versions of the bass.dll resp. the add-ons.
Other then that there souldn't be nothing special.


You might actually call "BassNet.Registration" to disable the automatic display of the SplashScreen - but call "BassNet.ShowSplash" in order to show it manually.

Creastar

  • Posts: 2
Re: BASS.NET API 2.4.4.2
« Reply #614 on: 27 Apr '09 - 13:50 »
Thanks radio42!  :) I'll share this w/ the programmer and see what we get

Alex WAit

  • Guest
Re: BASS.NET API 2.4.4.2
« Reply #615 on: 28 Apr '09 - 04:24 »
Nice to see an active thread on this wonderful api.

I am having some trouble using the api atm.  Right now I have VS 2008 set to do "Any CPU" and this works. I can play mp3s successfully with this.

   
Code: [Select]
Stream = Bass.BASS_StreamCreateFile("breaking.mp3", 0, 0, BASSFlag.BASS_SAMPLE_FLOAT);
                Bass.BASS_ChannelPlay(Stream, false);

However, when trying to load a aac file, I get a

Quote
System.BadImageFormatException was unhandled
  Message="An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)"
  Source="Bass.Net"
  StackTrace:
  <snip>

How do I work around this?

radio42

  • Posts: 4576
Re: BASS.NET API 2.4.4.2
« Reply #616 on: 28 Apr '09 - 10:00 »
On which OS are you running it and what BASS_AAC version are you using?
And what is the exact code you are getting the error with?

The error you mention typically occures, if you are trying to load a 32-bit dll with a 64-bit application.
So I guess you are using an x64 OS and using the 64-bit bass.dll ?!
But note, that currently there is no 64-bit version of the AAC add-on available.

radio42

  • Posts: 4576
Re: BASS.NET API 2.4.4.3
« Reply #617 on: 28 Apr '09 - 13:23 »
28.04.2009: Version 2.4.4.3 is out!

BASSenc: added support for v2.4.3.1           
BASS_SFX: added support for v2.4.1.5
BASS_FX: added support for v2.4.4.1
BASS_OFR: added support for v2.4.0.2
BASS_AC3: added support for v2.4.0.1
BASSMIDI: added support for v2.4.3.1

BASS.NET:
Full Install:
  www.un4seen.com/filez/4/Bass24.Net.zip

Lib only:
  www.un4seen.com/filez/4/Bass24.Net_update.zip


Bob3756

  • Guest
Re: BASS.NET API 2.4.4.3
« Reply #618 on: 28 Apr '09 - 19:54 »
Yeah !

ken

  • Posts: 739
Re: BASS.NET API 2.4.4.3
« Reply #619 on: 10 May '09 - 10:42 »
MixDown several audiofiles to one MP3.

The code below works fine, I can set the position and length where I want the audio in the total mix with "BASS_Mixer_StreamAddChannelEx". But my problem is how do I set the startposition on my audiofile I make the mix from (I dont want the "input audio" to start from zero). I tried "Bass.BASS_ChannelSetPosition" on when I create the stream, and when I add the mixer, but still the file starts from the begining.  How shall I do?

I also need guidens how to make fade in/out between my files.


Code: [Select]

private void MixAudio(List<string> audioList)
        {
           
            List<int> _audioStreams = new List<int>();

            int _mixerStream = BassMix.BASS_Mixer_StreamCreate(44100, 2, BASSFlag.BASS_STREAM_DECODE | BASSFlag.BASS_MIXER_END);

          
            foreach (string audio in audioList)
            {

                int _stream = Bass.BASS_StreamCreateFile(audio, 0, 0, BASSFlag.BASS_STREAM_DECODE | BASSFlag.BASS_SAMPLE_FLOAT);
               
               //Bass.BASS_ChannelSetPosition(_stream, 5);  //Trying to set startPosition

                _audioStreams.Add(_stream);
              
            }

            int _pos = 0;

            foreach (int stream in _audioStreams)
            {

                long _start = Bass.BASS_ChannelSeconds2Bytes(stream , _pos); //StartPos
                long _length = Bass.BASS_ChannelSeconds2Bytes(stream , 5);  //Duration
               
                _pos += 5; //Move the StartPos (testing...)

                 //Bass.BASS_ChannelSetPosition(stream, 5);  //Trying to set startPosition 
             
                BassMix.BASS_Mixer_StreamAddChannelEx(_mixerStream, stream, BASSFlag.BASS_STREAM_AUTOFREE | BASSFlag.BASS_MIXER_DOWNMIX, _start, _length);
            
               
            }


            Console.WriteLine("Start Encoder...");


            EncoderLAME _EncoderLAME = new EncoderLAME(_mixerStream);
            _EncoderLAME.InputFile = null;
            _EncoderLAME.OutputFile = @"D:\Audio\DownMix.mp3";
            _EncoderLAME.LAME_Bitrate = 128;
            _EncoderLAME.Start(null, IntPtr.Zero, false);


            while (Bass.BASS_ChannelIsActive(_mixerStream) == BASSActive.BASS_ACTIVE_PLAYING)
            {
                Byte[] buf = new Byte[50000];

                Bass.BASS_ChannelGetData(_mixerStream, buf, buf.Length);
            }


            Console.WriteLine("Done...");

        }

« Last Edit: 10 May '09 - 10:45 by ken »

radio42

  • Posts: 4576
Re: BASS.NET API 2.4.4.3
« Reply #620 on: 10 May '09 - 11:31 »
You are actually on the right track.
In order to set the 'cuein' position you need to call "BassMix.BASS_Mixer_ChannelSetPosition(source, cuein)" after you have added the source via BassMix.BASS_Mixer_StreamAddChannelEx.
E.g.:
Code: [Select]
int mixer = BassMix.BASS_Mixer_StreamCreate(freq, 2, BASSFlag.BASS_STREAM_DECODE | BASSFlag.BASS_MIXER_END | BASSFlag.BASS_SAMPLE_FLOAT);

long totalLength = 0L;
long startOffset = 0L;
foreach (...)
{
  int source = Bass.BASS_StreamCreateFile(audio, 0, 0, BASSFlag.BASS_STREAM_DECODE | BASSFlag.BASS_SAMPLE_FLOAT);

  long cuein = xyz;  // the pos of the current tracks cuein pos
  long cueout = xyz;  // the pos of the current tracks cueout pos
  long next = xyz;  // the pos of the current tracks next track pos

  long length = cueout - cuein;
  long lengthNext = next - cuein;
  totalLength += lengthNext;

  BassMix.BASS_Mixer_StreamAddChannelEx(mixer, source,
                                BASSFlag.BASS_MIXER_DOWNMIX | BASSFlag.BASS_MIXER_FILTER | BASSFlag.BASS_MIXER_NORAMPIN | BASSFlag.BASS_STREAM_AUTOFREE,
                                startOffset,
                                Bass.BASS_ChannelSeconds2Bytes(mixer, Bass.BASS_ChannelBytes2Seconds(source, length)));

  // cuein pos
  BassMix.BASS_Mixer_ChannelSetPosition(source, cuein);

  // add next track offset
  startOffset += Bass.BASS_ChannelSeconds2Bytes(mixer, Bass.BASS_ChannelBytes2Seconds(source, lengthNext));
}

Fading can be done via Bass.BASS_ChannelSetFX(source, BASSFXType.BASS_FX_BFX_VOLUME_ENV, 0).

ken

  • Posts: 739
Re: BASS.NET API 2.4.4.3
« Reply #621 on: 10 May '09 - 12:23 »


Thanks, works great with "BASS_Mixer_ChannelSetPosition", just as I wanted. 


Fading can be done via Bass.BASS_ChannelSetFX(source, BASSFXType.BASS_FX_BFX_VOLUME_ENV, 0).


But I don't get it with the volume envelope.  How do I set the time for the fade. I'm used to the "BASS_ChannelSlideAttribute".

I found this in you documentation, but not sure how to inplement it in my "mixdown" code

Code: [Select]




int fx = Bass.BASS_ChannelSetFX(_stream, BASSFXType.BASS_FX_BFX_VOLUME_ENV, 0);
                BASS_BFX_VOLUME_ENV ve = new BASS_BFX_VOLUME_ENV(
                                                new BASS_BFX_ENV_NODE(0.0, 1f),
                                                new BASS_BFX_ENV_NODE(5.0, 1f),
                                                new BASS_BFX_ENV_NODE(7.0, 0.5f),
                                                new BASS_BFX_ENV_NODE(12.0, 0.5f),
                                                new BASS_BFX_ENV_NODE(14.0, 1f));
                // which is the same as:
                BASS_BFX_ENV_NODE[] en = new BASS_BFX_ENV_NODE[6];
                en[0].pos = 0.0;
                en[0].val = 1f;
                en[1].pos = 5.0;
                en[2].val = 1f;
                en[3].pos = 7.0;
                en[3].val = 0.5f;
                en[4].pos = 12.0;
                en[4].val = 0.5f;
                en[5].pos = 14.0;
                en[5].val = 1f;
                ve = new BASS_BFX_VOLUME_ENV(en);

                Bass.BASS_FXSetParameters(fx, ve);


/Ken
« Last Edit: 10 May '09 - 17:14 by ken »

radio42

  • Posts: 4576
Re: BASS.NET API 2.4.4.3
« Reply #622 on: 11 May '09 - 07:52 »
Yes - so what is unclear?

A volume envelope can be set on a mixer source channel directly. It is there to describe the volume curve for decoding channels, as slides can not be used, as they are executed in real time - which doesn't work for decoding channels in your case.
The positions of each nore are set in seconds. The level is in float between 0=silent and 1=max.
The first node MUST be at 0 sec.!
So in the example given the volume curve starts at full level and then slides the volume from max. to half between 5 sec. and 7. sec. and back to full level between 12 and 14 sec.

ken

  • Posts: 739
Re: BASS.NET API 2.4.4.3
« Reply #623 on: 11 May '09 - 12:10 »
Thanks Bernd, the coin now drop down, I get it....


Another Question. I want to clone a stream, so I can add a WinAmp DSP on the "main" mixerchannel, but before the WA_DSP I want to encode the channel to a file (without DSP processing). Something like this:

Code: [Select]
Sources --> Mixer --> "CLONE" --> WADSP --> Out to ASIO channel and streaming.
                      "CLONE" -->  EncoderLAME

I tested DSP_BufferStream and DSP_StreamCopy, examples from your documentation. I don't get zero from the copied stream, but I don't get any "audio" to EncoderLAME.  Any suggestions?

/Ken


radio42

  • Posts: 4576
Re: BASS.NET API 2.4.4.3
« Reply #624 on: 11 May '09 - 12:47 »
Yes, the more easy way is to use the new BASS_Split_StreamCreate of the BASSmix add-on.
That also clones a stream very easily.
E.g. to create a 1:1 clone use:
Code: [Select]
int clone1 = BassMix.BASS_Split_StreamCreate(mixer, BASSFlag.BASS_STREAM_DECODE, null);
int clone2 = BassMix.BASS_Split_StreamCreate(mixer, BASSFlag.BASS_STREAM_DECODE, null);