2021-03-03 18:29:20

Hello! So i'm learning c sharp in my school, and i want to add a sound library which allows me to play and loop sounds, pan sounds, and change their pitch. Can you post any good free sound libraries that allow me to do that? And how can i add those libraries?

Best regards: Marco

2021-03-03 18:50:46

well, bass is a good option for now, untill synthizer becomes more stable and good enough bindings are available for it. For now, I don't think there is a bass nuget package available, but you can get it in bass forums, in the bass for .net topics. If you go on the un4seen website, you can then download bass for all operating systems you want to support with your app. Then, you use the bass wrapper as you would any other assembly reference, you add it in the solution as a reference to your project, then add the native libs with the copy to build directory build action so that they are in the same folder as your app and the bass wrapper so that your program can find them more easily.

2021-03-03 18:55:29

Or you can make your life much, much simpler and just put the necessary DLLs in the game folder, then use CSC to compile from CMD. Done and done.

2021-03-03 19:18:59

@3
CSC is easier for small projects, But not easy for big ones, I mean really, It's not, And until now, I never found someone that made a real big project only using csc, Because *undoable*, Or maybe doable, But, Not easy.
There is some posts on
This topic.
that proofs what I'm saying.

2021-03-03 20:35:05 (edited by pauliyobo 2021-03-03 20:37:02)

there is a bass wrapper called BASS.NET
You can either add the dependency through the UI provided by visualstudio, You can use PM which is a package manager that you can utilize to add nuget extensions, you can reach said manager by pressing alt plus t and then N within visualstudio.
Additionally you can edit your .csproj file and rebuild your project.
You can add the line
<PackageReference Include="Bass.NetWrapper" Version="2.4.12.5" />
within the IteGroup node, which may look like the following
  <ItemGroup>
    <Reference Include="System" />
    <Reference Include="System.Xml" />
  </ItemGroup>
@3
CSC works, until you have to deal with multiple architectures and deal with a lot of dependencies and you don't want to scream and shriek in pain when VS has profiles you can use for each architecture.
If you want to  stay in the commandline you may want to try using a combination of the dotnet CLI, although that has been designed primarily for .NET Core so it may bite your ass at some point, and msbuild
I usually use dotnet to add dependencies and create templates and then build with msbuild.
Edit:
when searching for a nuget extension, you will be able to copy the PackageReference node you can paste in your .csproj file to add said dependency.

Paul