BASS.NET API 2.4.18.2

Started by radio42,

radio42

You might use the BASSmix add-on and attach all 5 streams to the same mixer (created with BASSmix).
Then it is possible to have a DSP and/or an encoder on that mixer channel (which is the sum of all 5 inputs of the mixer) to encode to OGG.

radio42

13.07.2006: Version 2.3.0.3 is out!

BASS_CD upgrade to 2.3.0.1.
. Pregap length retrieval via BASS_CD_GetTrackPregap
. MusicBrainz ID generation via BASS_CDID_MUSICBRAINZ (BASS_CD_GetID type)

New BASS.NET internal features (in the Un4seen.Bass.Misc namespace):
1) DSP framework introduced:
    . see BaseDSP
    . with ready-made DSP implementations, e.g.:  DSP_PeakLevelMeter, DSP_Gain
2) Encoder framework introduced:
    . see IBaseEncoder and BaseEncoder
    . with ready-made encoder implementations, e.g.: EncoderLAME, EncoderWMA, EncoderOGG,
      EncoderACM, EncoderCMDLN, EncoderWinampAACplus, EncoderNeroAAC, EncoderTooLAME
    . the encoder framework can also be used to implement your own encoders
    . Encoder implementations can be used for Recording, Streaming or File encoding.
3) Streaming Server framework introduced:
    . see IStreamingServer and StreamingServer (which uses any IBaseEncoder implementation)
    . with ready-made streaming server implementations, e.g.: SHOUTcast, ICEcast, WMAcast
    . the streaming framework can also be used to implement your own servers
4) Generic BroadCast class introduced (used to handle central broadcasting):
    . supporting any IStreamingServer implementation
5) New C# sample "Streaming " added to demo the above.

All method overloads which previously implemented ANSI filenames have been changed to now also automatically implement Unicode filenames - since .Net will never be using any ANSI file name strings internally. So you don't have to care about ANSI/Unicode overloads anymore!

Plus:
Here are two compact versions (if you don't want the full installer version - only recommended for pro-users!)
- Bass23.Net11_compact.zip
- Bass23.Net20_compact.zip
These files simply contain:
- Bass.Net.dll
- Bass.Net.xml
- Bass.Net.chm

ken

Hi!

Is is possible with the latest .NET API to do like this:

LINE IN -> WinAmp DSP -> (1) -> Shoutcast (mp3)
                                     (2) - > Shoutcast (Acc)
                                     (3) -> WMA stream

Just like the Streaming example, but with a WinAmp DSP before encoder and several streaming encoders at the same time running to different servers.


radio42

Yes, you still can use any WinampDSP if you want.
The new BASS.NET encoder classes use the standard BASS encoder priority, with is -1000.
So if you want to add any Winamp DSP upfront, simply use a higher priority (e.g. 0).

In order to stream to multiple servers you simply need to create:
3 x encoder instance (e.g. EcoderLAME, EncoderWinampAACplus, EncoderWMA)
3 x streaming server instance (e.g. 2x SHOUTcast, 1xWMAcast)
3 x instance of the BroadCast class

The 3 BroadCast instances will then use the specified StreamingServer instances, which then will use the specified encoder instances.

radio42

26.07.2006: Version 2.3.0.4 is out!

Just optimizations and internal enhancements.
Utils:
1) new BASSTimer class added (behaves like a Windows.Forms.Timer but uses a Threading.Timer)
    It is recommended to use this timer within your app when needed, since it is more precise.
2) new Utils.GetLevel methods added (equivalent to BASS_ChannelGetLevel, but with individual offset and length.
3) new Utils.SampleDither method added.
WaveForm:
1) RenderRecording revisited and new overloads added.
2) new SyncPlayback method added.
DSP framework:
1) DSP_Gain revisited and a UseDithering property added

-----
Here are two compact versions (if you don't want the full installer version - only recommended for pro-users!)
- Bass23.Net11_compact.zip
- Bass23.Net20_compact.zip

radio42

28.08.2006: Version 2.3.0.5 is out!!

Loads of BASS.NET internal additions :-) Highlights are in bold:

DSP Framework enhanced, new DSPs added:
1) new DSP_Pan, DSP_Mono, DSP_StereoEnhancer, DSP_IIRDelay, DSP_SoftSaturation
2) new DSP_Stacker added (allowing you to stack multiple DSPs into one physical BASS DSP routine)
3) new DSP_StreamCopy added (allowing you to clone a stream to any other BASS device or speakers)
4) DSP_PeakLevelMeter: new UpdateTime member added
5) new C# sample TestDSP added

Utils:
1) new BASSBuffer class added (generic cyrcular ring buffer)
2) new MakeLong, HighWord, LowWord overloads, new MakeLong64 method added
3) new GetLevel and GetLevel2 overloads, new SampleDither method

WaveForm:
1) drawing optimized
2) new WaveForm2 class added (independend stereo wave form drawing)
3) new property MarkerLength added
4) new envelope drawing (see ColorEnvelope)

Visuals: new method CreateWaveForm added

BassAsio:
1) new BassAsioHandler class added (ease-of use ASIO handling)
2) new BASS_ASIO_IsStarted() method added

Upgrade supporting BASS_VIS 2.3.0.2:
. changed BASS_WINAMPVIS_CreateVis method
. changed BASS_WINAMPVIS_SetChanInfo method
. new BASS_WINAMPVIS_SetChanMPEGInfo method
. new BASS_WINAMPVIS_GetVisHwnd method added
. new BASS_WINAMPVIS_GetAmpHwnd method added
. new BASS_WINAMPVIS_GetGenHwnd method added

ken

Hi!

Just downloaded 2.3.0.5, but NET 2.0 is stil version 2.3.0.4, v1.1 is 2.3.0.5...

/Ken

radio42

THX - maybe something went wrong with the upload.
i will upload the 2.3.0.5 for .Net20 in a couple of minutes again!

radio42

The (re)upload is done!
So now the BASS.NET API v2.3.0.5. should also be available for .Net20 !!!

ken

Hi!

I trie to run several Streaming Encoders on one recorder.

Recorder->WinAmpDSP> Decoder.
                               > Decoder2...


I run each "encoder" in it's own class, and pass the streamID from recorder. It works just fine when running one encoder. But when loading another instance of the encoderclass I get error:

So can I have several instance of a encoder on "one recorder"

In each encoder class I have a  IBaseEncoder , IStreamingServer and BroadCast. Basicly your streaming example but the "recorder" is in its own class.


Error:

A callback was made on a garbage collected delegate of type 'Bass.Net!Un4seen.Bass.RECORDPROC::Invoke'. This may cause application crashes, corruption and data loss. When passing delegates to unmanaged code, they must be kept alive by the managed application until it is guaranteed that they will never be called.

ken

Hi...

Think I solved it... Removed "GC.Collect();" and it works...

ken

Hi!

Well I get the CG error sometimes after a while running the app. Don't know if it's you EncoderClasses that don't like to be wrapped into a new class. I'm running VS 2005. And .NET 20 is more senitive to invoke calls than 1.1 is.

A callback was made on a garbage collected delegate of type 'Bass.Net!Un4seen.Bass.RECORDPROC::Invoke'. This may cause application crashes, corruption and data loss. When passing delegates to unmanaged code, they must be kept alive by the managed application until it is guaranteed that they will never be called.

big_gun

Radio42, I'd like to ask for a new feature in the Un4Seen.Bass.Misc.WaveForm class.

You currently have the ability to save/load the wavebuffer to a file by binary serialization. I'd like the ability to serialize/deserialize it myself and pass it to the waveform class. For example:
Dim wb as WaveBuffer = GetWaveBufferFromSomewhere()
waveform1.WaveFormLoadFromObject(wb)
or this code Dim wb as WaveBuffer = GetWaveBufferFromSomewhere()
waveform1.WaveBuffer = wb

As it stands now, I have to serialize it, then save to file, then load from file in your class in order to save it to memory or a class or a database.

Thanks,

Rick

radio42

Oki, I see, jepp, thats a nice feature...will add it to the next version.

I have three possibilities is mind:

a) Add a constructor overload to the WaveForm class acepting a "WaveBuffer"
    -> which can be used with a "Wave" property value

b) allowing to serialize the "Wave" property to a MemoryStream

c) allowing to deserialize from a MemoryStream


P.S:
Same would apply to the new WaveForm2 class !

big_gun

After examining the problem for the last several days, just make the "Wave" Property of the waveform and waveform2 a read/write property,and not just read only. that will solve the problem.

Once the property is wrote to, consider it rendering finished.

Rick

radio42

Something like this will follow in the next version yes !

ken

Hi!

When I useing DSP_StreamCopy how can I apply a separate DSP (like a EQ and IIR delay) on only the copied stream

I like to do like this (induvidual EQ/IR/Vol on each copied stream):

"MP3" > StreamCopy > EQ > IIR > Volume > SpeakerFront
           StreamCopy > EQ > IIR > Volume > SpeakerRear
           StreamCopy > EQ > IIR > Volume > SpeakerCenter

cablehead

radio42

QuoteWhen I useing DSP_StreamCopy how can I apply a separate DSP (like a EQ and IIR delay) on only the copied stream
Use the "StreamCopy" property of the "DSP_StreamCopy" class.
As written in the documentation - this is the copied stream being played out.
The "StreamCopy" is the created stream handle to which you can apply any DSP or FX - whatsoever, it is a normal BASS channel.

QuoteC# example of BassVis....anytime soon?
Don't think so - since there is already a VB example present. It should be easy to convert that to C# I guess.

ken

Can I show the waveform like this, just the half wave (mono) ?



If not can you please add this feature to the next update?