Skip to content

Instantly share code, notes, and snippets.

View Raffaelbdl's full-sized avatar

Raffael Bolla Di Lorenzo Raffaelbdl

View GitHub Profile
@Raffaelbdl
Raffaelbdl / AudioToSpectrumBuffer.cs
Created November 17, 2023 23:37
[UNITY] Pre-generate AudioClip spectrum to use it without playing the Audio
using System.Collections.Generic;
using UnityEngine;
using System;
/// <summary>
/// Class <c>AudioToSpectrumBuffer</c> pre-generates a buffer of spectrum
/// in the manner of AudioSource.GetSpectrum() but without the need of
/// playing the AudioClip.
///
@Raffaelbdl
Raffaelbdl / FlacToAudioClip.cs
Created November 17, 2023 23:32
[UNITY] Convert FLAC to AudioClip
using UnityEngine;
using System.IO;
using NAudio.Flac;
using NAudio.Wave;
/// <summary>
/// Class <c>FlacToAudioClip</c> converts a raw array of bytes in FLAC format
/// into a UnityEngine AudioClip.
///