summaryrefslogtreecommitdiff
path: root/src/mixer/audio.h
blob: 6e52f1ad03da57a28b030c7c78811e1a54550621 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#pragma once

#include <al/str.h>

#include "../codec/codec.h"

struct camu_audio {
    bool (*init)(struct camu_audio *, str *);

    void (*pick_format)(struct camu_audio *, struct camu_resampler_format *);
    bool (*configure_stream)(struct camu_audio *, void *);

    u64 (*get_latency)(struct camu_audio *);

    void (*start)(struct camu_audio *);
    void (*stop)(struct camu_audio *);

    void (*free)(struct camu_audio **);

    s32 (*data_callback)(void *, u8 *, s32, bool *);
    void *userdata;
};