michael@0: /* michael@0: * Copyright © 2013 Mozilla Foundation michael@0: * michael@0: * This program is made available under an ISC-style license. See the michael@0: * accompanying file LICENSE for details. michael@0: */ michael@0: #if !defined(CUBEB_INTERNAL_0eb56756_4e20_4404_a76d_42bf88cd15a5) michael@0: #define CUBEB_INTERNAL_0eb56756_4e20_4404_a76d_42bf88cd15a5 michael@0: michael@0: #include "cubeb/cubeb.h" michael@0: michael@0: struct cubeb_ops { michael@0: int (* init)(cubeb ** context, char const * context_name); michael@0: char const * (* get_backend_id)(cubeb * context); michael@0: int (* get_max_channel_count)(cubeb * context, uint32_t * max_channels); michael@0: int (* get_min_latency)(cubeb * context, michael@0: cubeb_stream_params params, michael@0: uint32_t * latency_ms); michael@0: int (* get_preferred_sample_rate)(cubeb * context, uint32_t * rate); michael@0: void (* destroy)(cubeb * context); michael@0: int (* stream_init)(cubeb * context, cubeb_stream ** stream, char const * stream_name, michael@0: cubeb_stream_params stream_params, unsigned int latency, michael@0: cubeb_data_callback data_callback, michael@0: cubeb_state_callback state_callback, michael@0: void * user_ptr); michael@0: void (* stream_destroy)(cubeb_stream * stream); michael@0: int (* stream_start)(cubeb_stream * stream); michael@0: int (* stream_stop)(cubeb_stream * stream); michael@0: int (* stream_get_position)(cubeb_stream * stream, uint64_t * position); michael@0: int (* stream_get_latency)(cubeb_stream * stream, uint32_t * latency); michael@0: }; michael@0: michael@0: #endif /* CUBEB_INTERNAL_0eb56756_4e20_4404_a76d_42bf88cd15a5 */