ManagedBass.Sox 0.6.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package ManagedBass.Sox --version 0.6.1                
NuGet\Install-Package ManagedBass.Sox -Version 0.6.1                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ManagedBass.Sox" Version="0.6.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ManagedBass.Sox --version 0.6.1                
#r "nuget: ManagedBass.Sox, 0.6.1"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install ManagedBass.Sox as a Cake Addin
#addin nuget:?package=ManagedBass.Sox&version=0.6.1

// Install ManagedBass.Sox as a Cake Tool
#tool nuget:?package=ManagedBass.Sox&version=0.6.1                

BASS_SOX

A resampler plugin for BASS which uses the soxr library with .NET bindings.

bass.dll is required for native projects. ManagedBass is required for .NET projects.

A simple example;

#include <stdio.h>
#include "bass/bass.h"
#include "bass_sox/bass_sox.h"

int main()
{
	int output_rate = 192000;
	DWORD source_channel;
	DWORD playback_channel;

	if (!BASS_Init(-1, output_rate, 0, 0, NULL)) {
		return 1;
	}

	source_channel = BASS_StreamCreateFile(FALSE, "C:\\Source\\Prototypes\\Resources\\1 - 6 - DYE (game version).mp3", 0, 0, BASS_STREAM_DECODE | BASS_SAMPLE_FLOAT);
	if (source_channel == 0) {
		return 1;
	}

	playback_channel = BASS_SOX_StreamCreate(output_rate, BASS_SAMPLE_FLOAT, source_channel, NULL);
	if (playback_channel == 0) {
		return 1;
	}

	//These settings are optional.
	//Defaults to medium quality, 1 second buffer and 1 thread.
	BASS_SOX_ChannelSetAttribute(playback_channel, QUALITY, Q_VHQ);
	BASS_SOX_ChannelSetAttribute(playback_channel, PHASE, LINEAR);
	BASS_SOX_ChannelSetAttribute(playback_channel, STEEP_FILTER, TRUE);
	BASS_SOX_ChannelSetAttribute(playback_channel, ALLOW_ALIASING, TRUE);
	BASS_SOX_ChannelSetAttribute(playback_channel, BUFFER_LENGTH, 2);
	BASS_SOX_ChannelSetAttribute(playback_channel, THREADS, 2);

	if (!BASS_SOX_StreamBuffer(playback_channel)) {
		return 1;
	}

	if (!BASS_ChannelPlay(playback_channel, FALSE)) {
		return 1;
	}

	do {
		DWORD channel_active = BASS_ChannelIsActive(source_channel);
		if (channel_active == BASS_ACTIVE_STOPPED) {
			break;
		}
		Sleep(1000);
	} while (TRUE);

	BASS_SOX_StreamFree(playback_channel);
	BASS_StreamFree(source_channel);
	BASS_Free();

	return 0;
}
Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .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.

Version Downloads Last updated
0.6.2 1,179 10/17/2022
0.6.1 455 7/19/2022
0.6.0 468 6/26/2022
0.5.0 408 6/26/2022
0.4.0 427 6/26/2022
0.3.0 928 4/22/2019