Aural 1.0.2

There is a newer version of this package available.
See the version list below for details.
dotnet add package Aural --version 1.0.2
                    
NuGet\Install-Package Aural -Version 1.0.2
                    
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="Aural" Version="1.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Aural" Version="1.0.2" />
                    
Directory.Packages.props
<PackageReference Include="Aural" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Aural --version 1.0.2
                    
#r "nuget: Aural, 1.0.2"
                    
#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.
#:package Aural@1.0.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Aural&version=1.0.2
                    
Install as a Cake Addin
#tool nuget:?package=Aural&version=1.0.2
                    
Install as a Cake Tool

Aural

Tested and working audio playback library for .NET — Play audio files with a single line of code using cross-platform OpenAL support.

Features

  • Simple API: Play any audio file with Player.Play(path, volume, loop)
  • Cross-platform: Works on Windows, macOS, and Linux automatically
  • Format support: WAV, OGG Vorbis
  • Playback control: Pause, resume, stop, volume adjustment, seeking
  • Zero setup: No initialization required—just start playing
  • Intuitive tokens: Control-based API via PlaybackToken objects
  • OpenAL backend: Built on OpenTK.Audio.OpenAL for reliable, cross-platform audio

Installation

dotnet add package Aural

Quick Start

using Aural;

// Play an audio file
var token = Player.Play("path/to/song.ogg", 0.7f, loop: true);

// Let it play for 10 seconds
Thread.Sleep(10000);

// Pause playback
token.Pause();
Thread.Sleep(10000);

// Resume playback
token.Play();
Thread.Sleep(10000);

// Stop and release resources
token.End();

// Optional: cleanup all active playbacks on shutdown
Player.Dispose();

API Reference

Player.Play(filePath, volume, loop)

Plays an audio file and returns a PlaybackToken for control.

Parameters:

  • filePath (string): Path to audio file (WAV, MP3, OGG)
  • volume (float, default: 1.0): Volume level 0.0 (silent) to 1.0 (full)
  • loop (bool, default: false): Whether to loop the audio

Returns: PlaybackToken? - Control token, or null if playback failed

PlaybackToken Methods

  • Pause() - Pause playback
  • Play() - Resume playback
  • End() - Stop and release resources
  • SetVolume(float) - Adjust volume (0.0-1.0)
  • Seek(float) - Seek to position in seconds
  • IsPlaying (property) - heck if audio is playing
  • CurrentPosition (property) - Get current playback position in seconds

Player.Dispose()

Disposes all active playback sessions. Call on application shutdown.

Supported Formats

C

  • WAV (.wav)
  • OGG (.ogg)

Platform Support

  • Windows
  • macOS
  • Linux

License

MIT

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
1.2.0 79 3/8/2026
1.1.0 80 3/7/2026
1.0.2 78 3/6/2026
1.0.0 71 3/6/2026

Initial release: cross-platform audio playback for WAV and OGG with volume control, pause/resume, and seeking.