audio/supported_file.h file

Supported file info.

Contents

Classes

struct SupportedFile
Metadata for a supported file.

Enums

enum FileType { FILE_TYPE_MIDI, FILE_TYPE_MP3, FILE_TYPE_FLAC, FILE_TYPE_OGG, FILE_TYPE_WAV, FILE_TYPE_DIR, FILE_TYPE_OTHER, NUM_FILE_TYPES }
File type.

Typedefs

using FileType = enum FileType
File type.
using SupportedFile = struct SupportedFile
Metadata for a supported file.

Functions

auto supported_file_new_from_path(const char* path) -> SupportedFile*
Creates a new SupportedFile from the given absolute path.
auto supported_file_type_get_description(FileType type) -> char*
Returns a human readable description of the given file type.
auto supported_file_clone(SupportedFile* src) -> SupportedFile*
Clones the given SupportedFile.
auto supported_file_type_is_supported(FileType type) -> int
Returns if the given type is supported.
auto supported_file_type_is_audio(FileType type) -> int
Returns if the SupportedFile is an audio file.
auto supported_file_type_is_midi(FileType type) -> int
Returns if the SupportedFile is a midi file.
auto supported_file_type_get_ext(FileType type) -> const char*
Returns the most common extension for the given filetype.
auto supported_file_get_type(const char* file) -> FileType
Returns the file type of the given file path.
void supported_file_free(SupportedFile* self)
Frees the instance and all its members.

Function documentation

char* supported_file_type_get_description(FileType type)

Returns a human readable description of the given file type.

Example: wav -> "Wave file".