Skip to content

AudioHeaderReader

ClassAudioToolAudioTool.Editor
public static class AudioHeaderReader

Lightweight audio header reader that extracts metadata (duration, channels, sample rate) from audio file headers without loading the full audio data. Thread-safe: all methods use local file handles and no shared state. Supports WAV/RIFF, AIFF/AIFC, and OGG Vorbis formats.

public static AudioHeaderReader.AudioHeaderInfo ReadHeader(string filePath)

Attempts to read audio metadata from the file header. Returns null if the format is not recognized or the header is corrupt.

Parameters

Name Type Description
filePath System.String

Returns

AudioTool.AudioHeaderReader.AudioHeaderInfo — No return description is available.