SwiftUI port of the Android app with the desktop feature set; built on Linux, linked and signed on a jailbroken iPhone. History imported from the standalone repo. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
15 lines
586 B
C
15 lines
586 B
C
// Minimal FFmpeg audio decoder for Mulberry: any input -> 48 kHz stereo float (planar).
|
|
#pragma once
|
|
#include <stdint.h>
|
|
|
|
typedef struct ff_dec ff_dec;
|
|
|
|
/// Opens a file; returns NULL if FFmpeg can't decode it.
|
|
ff_dec *ff_open(const char *path);
|
|
/// Total length in 48 kHz frames (0 when unknown).
|
|
int64_t ff_frames(ff_dec *d);
|
|
/// Reads up to `max` frames into left/right; returns frames written, 0 at end, <0 on error.
|
|
int ff_read(ff_dec *d, float *left, float *right, int max);
|
|
/// Seeks to a 48 kHz frame position.
|
|
void ff_seek(ff_dec *d, int64_t frame);
|
|
void ff_close(ff_dec *d);
|