DSPark 1.6.1
Header-only audio DSP framework in pure C++20 — zero dependencies
Loading...
Searching...
No Matches
AudioFile.h File Reference

Abstract interface for reading and writing audio files. More...

#include "../Core/AudioBuffer.h"
#include "../Core/AudioSpec.h"
#include <algorithm>
#include <cstdint>
#include <filesystem>
#include <limits>
Include dependency graph for AudioFile.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  dspark::AudioFileInfo
 Metadata describing an audio file's format and dimensions. More...
 
class  dspark::AudioFile
 Abstract base class for audio file readers and writers. More...
 

Namespaces

namespace  dspark
 Main namespace for the DSPark framework.
 

Detailed Description

Abstract interface for reading and writing audio files.

Defines a common contract for audio file I/O implementations (WAV, MP3, ...). Focuses on offline processing and buffer preparation.

Warning
DANGER: Disk I/O is non-deterministic and blocking. NEVER call any methods from this class inside the real-time audio thread. Do all file operations in a secondary thread or during the initialization phase.

Threading: owner-managed. One instance serves one file from one thread at a time; no internal synchronization is provided. Concurrent calls on the same instance (including close() racing a read) are not supported.

Dependencies: Core/AudioBuffer.h, Core/AudioSpec.h.

Definition in file AudioFile.h.