2 * Copyright (C) 2013 nu774
3 * For conditions of distribution and use, see copyright notice in COPYING
14 WAV_UNSUPPORTED_FORMAT
17 typedef int (*wav_read_callback
)(void *cookie
, void *data
, uint32_t size
);
18 typedef int (*wav_seek_callback
)(void *cookie
, int64_t off
, int whence
);
20 typedef struct wav_io_context_t
{
21 wav_read_callback read
;
22 wav_seek_callback seek
;
25 typedef struct wav_reader_t wav_reader_t
;
27 wav_reader_t
*wav_open(wav_io_context_t
*io_ctx
, void *io_cookie
,
29 const pcm_sample_description_t
*wav_get_format(wav_reader_t
*reader
);
30 int wav_read_frames(wav_reader_t
*reader
, void *buffer
, unsigned nframes
);
31 int64_t wav_get_length(wav_reader_t
*reader
);
32 int64_t wav_get_position(wav_reader_t
*reader
);
33 void wav_teardown(wav_reader_t
**reader
);