source: tests/src/io/test-sink_flac.c @ 17189b2

feature/crepe
Last change on this file since 17189b2 was 41d14b8, checked in by Paul Brossier <piem@piem.org>, 6 years ago

[tests] update test-sink_flac

  • Property mode set to 100644
File size: 1.8 KB
RevLine 
[9571000]1#define AUBIO_UNSTABLE 1
2#include <aubio.h>
3#include "utils_tests.h"
4
[41d14b8]5#define aubio_sink_custom "flac"
6
7#ifdef HAVE_FLAC
8// functions not exposed in the headers, declared here
[9571000]9typedef struct _aubio_sink_flac_t aubio_sink_flac_t;
10extern aubio_sink_flac_t * new_aubio_sink_flac(const char_t *uri,
11    uint_t samplerate);
12extern void del_aubio_sink_flac (aubio_sink_flac_t *s);
13extern uint_t aubio_sink_flac_open(aubio_sink_flac_t *s);
[41d14b8]14extern uint_t aubio_sink_flac_close(aubio_sink_flac_t *s);
[9571000]15extern uint_t aubio_sink_flac_preset_channels(aubio_sink_flac_t *s,
16    uint_t channels);
17extern uint_t aubio_sink_flac_preset_samplerate(aubio_sink_flac_t *s,
18    uint_t samplerate);
[41d14b8]19extern void aubio_sink_flac_do(aubio_sink_flac_t *s, fvec_t* write_data,
20    uint_t write);
21extern void aubio_sink_flac_do_multi(aubio_sink_flac_t *s,
22    fmat_t *write_data, uint_t write);
[9571000]23extern uint_t aubio_sink_flac_get_channels(aubio_sink_flac_t *s);
24extern uint_t aubio_sink_flac_get_samplerate(aubio_sink_flac_t *s);
25
[41d14b8]26#define HAVE_AUBIO_SINK_CUSTOM
27#define aubio_sink_custom_t aubio_sink_flac_t
28#define new_aubio_sink_custom new_aubio_sink_flac
29#define del_aubio_sink_custom del_aubio_sink_flac
30#define aubio_sink_custom_do aubio_sink_flac_do
31#define aubio_sink_custom_do_multi aubio_sink_flac_do_multi
32#define aubio_sink_custom_close aubio_sink_flac_close
33#define aubio_sink_custom_preset_samplerate aubio_sink_flac_preset_samplerate
34#define aubio_sink_custom_preset_channels aubio_sink_flac_preset_channels
35#define aubio_sink_custom_get_samplerate aubio_sink_flac_get_samplerate
36#define aubio_sink_custom_get_channels aubio_sink_flac_get_channels
37#endif /* HAVE_FLAC */
[9571000]38
[41d14b8]39#include "base-sink_custom.h"
[9571000]40
[41d14b8]41// this file uses the unstable aubio api, please use aubio_sink instead
42// see src/io/sink.h and tests/src/sink/test-sink.c
[9571000]43
[41d14b8]44int main (int argc, char **argv)
45{
46  return base_main(argc, argv);
[9571000]47}
Note: See TracBrowser for help on using the repository browser.