Skip to content

Simple library for WAV encoding support for Unity (UPM)

License

Notifications You must be signed in to change notification settings

RageAgainstThePixel/com.utilities.encoder.wav

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

com.utilities.encoder.wav

Discord openupm openupm

Simple library for WAV encoding support in the Unity Game Engine.

Installing

Requires Unity 2021.3 LTS or higher.

The recommended installation method is though the unity package manager and OpenUPM.

Via Unity Package Manager and OpenUPM

  • Open your Unity project settings
  • Select the Package Manager scoped-registries
  • Add the OpenUPM package registry:
    • Name: OpenUPM
    • URL: https://package.openupm.com
    • Scope(s):
      • com.utilities
  • Open the Unity Package Manager window
  • Change the Registry from Unity to My Registries
  • Add the Utilities.Encoder.Wav package

Via Unity Package Manager and Git url

  • Open your Unity Package Manager
  • Add package from git url: https://github.com/RageAgainstThePixel/com.utilities.encoder.wav.git#upm

    Note: this repo has dependencies on other repositories! You are responsible for adding these on your own.


Documentation

Table of Contents

Recording Behaviour

Simply add the WavRecorderBehaviour to any GameObject to enable recording.

This will stream the recording directly to disk as it is recorded.

Audio Clip Extensions

Provides extensions to encode AudioClips to WAV encoded bytes. Supports 8, 16, 24, and 32 bit sample sizes.

Encode WAV

var bytes = audioClip.EncodeToWav();
var bytes = await audioClip.EncodeToWavAsync();

Related Packages