ManagedBass.Crossfade
0.3.0
dotnet add package ManagedBass.Crossfade --version 0.3.0
NuGet\Install-Package ManagedBass.Crossfade -Version 0.3.0
<PackageReference Include="ManagedBass.Crossfade" Version="0.3.0" />
paket add ManagedBass.Crossfade --version 0.3.0
#r "nuget: ManagedBass.Crossfade, 0.3.0"
// Install ManagedBass.Crossfade as a Cake Addin #addin nuget:?package=ManagedBass.Crossfade&version=0.3.0 // Install ManagedBass.Crossfade as a Cake Tool #tool nuget:?package=ManagedBass.Crossfade&version=0.3.0
BASS_CROSSFADE
A fading playback plugin for BASS with .NET bindings.
bass.dll and bassmix.dll are required for native projects. ManagedBass and ManagedBass.Mix are required for .NET projects.
A simple example;
BassCrossfade.Load();
BassCrossfade.Mode = BassCrossfadeMode.Always;
BassCrossfade.InPeriod = 1000;
BassCrossfade.OutPeriod = 1000;
BassCrossfade.InType = BassCrossfadeType.Linear;
BassCrossfade.OutType = BassCrossfadeType.Linear;
BassCrossfade.Mix = true;
Bass.Init();
var sourceChannel1 = Bass.CreateStream("01 Botanical Dimensions.m4a", Flags: BassFlags.Decode);
var sourceChannel2 = Bass.CreateStream("02 Outer Shpongolia.m4a", Flags: BassFlags.Decode);
BassCrossfade.ChannelEnqueue(sourceChannel1);
BassCrossfade.ChannelEnqueue(sourceChannel2);
var channelInfo = Bass.ChannelGetInfo(sourceChannel1);
var playbackChannel = BassCrossfade.StreamCreate(channelInfo.Frequency, channelInfo.Channels);
Bass.ChannelPlay(playbackChannel);
while (Bass.ChannelIsActive(sourceChannel1) == PlaybackState.Playing || Bass.ChannelIsActive(sourceChannel2) == PlaybackState.Playing)
{
Thread.Sleep(1000);
}
Bass.StreamFree(sourceChannel1);
Bass.StreamFree(sourceChannel2);
Bass.StreamFree(playbackChannel);
BassCrossfade.Unload();
Bass.Free();
Since version 0.1.0, you are responsible for handling playback latency. This likely only means adding a delay when performing a manual fade out, e.g;
BassCrossfade.StreamFadeOut();
Thread.Sleep(Bass.PlaybackBufferLength);
If you have mixers or other buffers, they need to be accounted for. Obviously if you want the effect to be responsive, keep the latency to a minimum.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net40 is compatible. net403 was computed. net45 was computed. net451 was computed. net452 was computed. net46 was computed. net461 is compatible. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
-
.NETFramework 4.0
- No dependencies.
-
.NETFramework 4.6.1
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.