CSCore has moved to github! Visit https://github.com/filoe/cscore for the latest source.

 

CSCore – .NET Sound Library

CSCore is a free .NET audio library which is completely written in C#. Although it is still a rather young project, it offers tons of features like playing or capturing audio, en- or decoding many different codecs, effects and much more!

CSCore is based on a very extensible architecture which allows you to make it fit to your needs without any major effort. You can build music players, voice chats, audio recorders and so on!

Feel free to download or clone the source code:

git clone https://git01.codeplex.com/cscore

You may prefer to install the CSCore nuget package:

Install-Package CSCore

Why CSCore?

  • Highly optimized PERFORMANCE through usage of CLI instructions
  • Designed for newbies and professionals
  • Tons of features (see below)
  • Fast support on codeplex or stackoverflow
  • High code coverage through unit tests
  • Licensed under the MS-PL (which allows the usage of cscore for commercial products)

Supported features:

Currently the following features are implemented:

  • Codecs
    • MP3
    • WAVE(PCM, IeeeFloat, GSM, ADPCM,…)
    • FLAC
    • AAC
    • AC3
    • WMA
    • Raw data
  • Speaker Output
    • WaveOut(function- and window-callback)
    • DirectSoundOut(using notifications)
    • WASAPI(loop- and event-callback + exclusive mode available for each of them)
    • XAudio2
  • Recording
    • WaveIn(function-, window- and event-callback)
    • WASAPI(loop- and event-callback + exclusive mode available for each of them)
    • WASAPI loopback capture
  • Tags(ID3v1, ID3v2, FLAC)
  • Sample Winforms Visualizations
  • DSP Algorithms
    • Fastfouriertransform
    • Effects (Echo, Compressor, Reverb, …)
    • Resampler
    • Channel-conversion using custom channel-matrices
    • Generic equalizer
  • XAudio2 support
    • XAudio2.7 and XAudio2.8 support
    • Streaming source voice implementation allowing
      the client to stream any codec, custom effect,… to XAudio2
    • 3D Audio support (see X3DAudio)
    • Optimized for games
  • DirectSound-Wrapper (mostly for playback)
  • Mediafoundation encoding and decoding (with the ability to extend it)
  • Complete DMO Wrapper
  • CoreAudioAPI
    • WASAPI
    • Windows Multimedia Device
    • Windows Audio Session
    • Endpoint Volume
  • Optimized Performance through the usage of CLI instructions
Codec Available Requirements Comments
MP3      
Decoding Yes Windows XP Using DMO- and-Mediafoundation-decoder.
Encoding Yes Windows 8 Mediafoundation
WAVE      
Decoding Yes None PCM and IeeeFloat supported. (GSM, ADPCM,… supported through Mediafoundation and DMO)
Encoding Yes None PCM and IeeeFloat supported. (GSM, ADPCM,… supported through Mediafoundation and DMO)
FLAC      
Decoding Yes None  
Encoding No -  
Raw data      
Decoding Yes None  
Encoding Yes None  
AAC      
Decoding Yes Windows 7 1) Mediafoundation.
Encoding Yes Windows 7 Mediafoundation.
DDP(AC-3)      
Decoding Yes Windows 8 Mediafoundation.
Encoding Yes Windows 8 Mediafoundation.
WMA      
Decoding Yes Windows Vista DMO/Mediafoundation
Encoding Yes Windows Vista DMO/Mediafoundation
WMA-Voice      
Decoding Yes Windows XP DMO/Mediafoundation
Encoding Yes Windows XP DMO/Mediafoundation
OGG-Vorbis      
Decoding (Yes) See NVorbis requirements. Currently only available by using NVorbis. See the NVorbisIntegration-Sample.

Projects using CSCore:

Just a few randomly picked projects which are using cscore:

tumblr_inline_n4kt3zIHQZ1sydqgd musiX: “MusiX is an audio player which tries to keep listening to music clean and simple.”
aa Hurricane: “Hurricane is a powerful music player written in C# based on the CSCore sound library. […] The goal is that you don't get annoyed by Hurricane so it's only visible if you really need it.”
68747470733a2f2f7777772e636f6465706c65782e636f6d2f446f776e6c6f61643f50726f6a6563744e616d653d73686172706578326426446f776e6c6f616449643d383739393237 Sharpex2D: A game engine which “allows you to create beautiful 2D games under .NET for Windows and Mono compatible systems.”
b HTLED: A audio visualization displayed on a selfmade 32x16 LED matrix.

“CSCore – Visualization” Sample:

ezgif.com-resize


1) Is available on Windows Vista by installing the “Platform Update Supplement for Windows Vista”.

Last edited May 28, 2015 at 8:19 PM by filoe, version 66