libmixed
Loading...
Searching...
No Matches
mixed.h
Go to the documentation of this file.
1#ifndef __LIBMIXED_H__
2#define __LIBMIXED_H__
3#ifdef __cplusplus
4extern "C" {
5#endif
6
7#if defined MIXED_STATIC
8# define MIXED_EXPORT
9#elif defined _MSC_VER
10# if defined MIXED_BUILD
11# define MIXED_EXPORT __declspec(dllexport)
12# else
13# define MIXED_EXPORT __declspec(dllimport)
14# endif
15#elif defined __GNUC__
16# if defined MIXED_BUILD
17# define MIXED_EXPORT __attribute__((visibility("default")))
18# else
19# define MIXED_EXPORT
20# endif
21#else
22# define MIXED_EXPORT
23#endif
24#include <stdint.h>
25#include <stdlib.h>
26#include <math.h>
27#include "mixed_encoding.h"
28
35
40
45
52
140
166
413 };
414
442
463
485
498
509
520
556
588
658
728
731 typedef uint8_t mixed_channel_t;
732
740
743 typedef float mixed_decibel_t;
744
747 typedef float mixed_duration_t;
748
757 float *_data;
758 uint32_t size;
759 uint32_t read;
760 uint32_t write;
761 uint32_t reserved;
765 };
766
779 unsigned char *_data;
780 uint32_t size;
781 uint32_t read;
782 uint32_t write;
783 uint32_t reserved;
792 uint32_t samplerate;
793 };
794
824
858
879 int (*free)(struct mixed_segment *segment);
880 int (*info)(struct mixed_segment_info *info, struct mixed_segment *segment);
881 int (*start)(struct mixed_segment *segment);
882 int (*mix)(struct mixed_segment *segment);
883 int (*end)(struct mixed_segment *segment);
884 int (*set_in)(uint32_t field, uint32_t location, void *value, struct mixed_segment *segment);
885 int (*set_out)(uint32_t field, uint32_t location, void *value, struct mixed_segment *segment);
886 int (*get_in)(uint32_t field, uint32_t location, void *value, struct mixed_segment *segment);
887 int (*get_out)(uint32_t field, uint32_t location, void *value, struct mixed_segment *segment);
888 int (*set)(uint32_t field, void *value, struct mixed_segment *segment);
889 int (*get)(uint32_t field, void *value, struct mixed_segment *segment);
892 void *data;
893 };
894
904 MIXED_EXPORT int mixed_make_pack(uint32_t frames, struct mixed_pack *pack);
905
909
913
917
921
924 MIXED_EXPORT int mixed_pack_request_write(void *restrict *area, uint32_t *size, struct mixed_pack *pack);
925
928 MIXED_EXPORT int mixed_pack_finish_write(uint32_t size, struct mixed_pack *pack);
929
932 MIXED_EXPORT int mixed_pack_request_read(void *restrict *area, uint32_t *size, struct mixed_pack *pack);
933
936 MIXED_EXPORT int mixed_pack_finish_read(uint32_t size, struct mixed_pack *pack);
937
940 MIXED_EXPORT int mixed_make_buffer(uint32_t size, struct mixed_buffer *buffer);
941
945
957 MIXED_EXPORT int mixed_buffer_from_pack(struct mixed_pack *in, struct mixed_buffer **outs, float *volume, float target_volume);
958
970 MIXED_EXPORT int mixed_buffer_to_pack(struct mixed_buffer **ins, struct mixed_pack *out, float *volume, float target_volume);
971
980
990
995
999
1003
1021 MIXED_EXPORT int mixed_buffer_request_write(float *restrict *area, uint32_t *size, struct mixed_buffer *buffer);
1022
1030 MIXED_EXPORT int mixed_buffer_finish_write(uint32_t size, struct mixed_buffer *buffer);
1031
1042 MIXED_EXPORT int mixed_buffer_request_read(float *restrict *area, uint32_t *size, struct mixed_buffer *buffer);
1043
1050 MIXED_EXPORT int mixed_buffer_finish_read(uint32_t size, struct mixed_buffer *buffer);
1051
1056 MIXED_EXPORT int mixed_buffer_resize(uint32_t size, struct mixed_buffer *buffer);
1057
1066#define with_mixed_buffer_transfer(i, samples, inv, in, outv, out, body){ \
1067 uint32_t samples = UINT32_MAX; \
1068 struct mixed_buffer *__in = in; \
1069 struct mixed_buffer *__out = out; \
1070 float *restrict inv, *restrict outv; \
1071 if(__in == __out){ \
1072 mixed_buffer_request_read(&inv, &samples, __in); \
1073 outv = inv; \
1074 for(uint32_t i=0; i<samples; ++i) \
1075 body; \
1076 }else{ \
1077 mixed_buffer_request_read(&inv, &samples, __in); \
1078 mixed_buffer_request_write(&outv, &samples, __out); \
1079 for(uint32_t i=0; i<samples; ++i) \
1080 body; \
1081 mixed_buffer_finish_read(samples, __in); \
1082 mixed_buffer_finish_write(samples, __out); \
1083 } \
1084 }
1085
1096
1102
1111
1117
1128 MIXED_EXPORT int mixed_segment_set_in(uint32_t field, uint32_t location, void *value, struct mixed_segment *segment);
1129
1140 MIXED_EXPORT int mixed_segment_set_out(uint32_t field, uint32_t location, void *value, struct mixed_segment *segment);
1141
1150 MIXED_EXPORT int mixed_segment_get_in(uint32_t field, uint32_t location, void *value, struct mixed_segment *segment);
1151
1160 MIXED_EXPORT int mixed_segment_get_out(uint32_t field, uint32_t location, void *value, struct mixed_segment *segment);
1161
1170
1183 MIXED_EXPORT int mixed_segment_set(uint32_t field, void *value, struct mixed_segment *segment);
1184
1197 MIXED_EXPORT int mixed_segment_get(uint32_t field, void *value, struct mixed_segment *segment);
1198
1203 MIXED_EXPORT int mixed_segment_print(char *str, size_t size, struct mixed_segment *segment);
1204
1215 MIXED_EXPORT int mixed_make_segment_unpacker(struct mixed_pack *packed, uint32_t samplerate, struct mixed_segment *segment);
1216
1227 MIXED_EXPORT int mixed_make_segment_packer(struct mixed_pack *packed, uint32_t samplerate, struct mixed_segment *segment);
1228
1247
1250 MIXED_EXPORT int mixed_make_segment_compressor(uint32_t samplerate, struct mixed_segment *segment);
1251
1261 MIXED_EXPORT int mixed_make_segment_volume_control(float volume, float pan, struct mixed_segment *segment);
1262
1278 MIXED_EXPORT int mixed_make_segment_fade(float from, float to, float time, enum mixed_fade_type type, uint32_t samplerate, struct mixed_segment *segment);
1279
1286 MIXED_EXPORT int mixed_make_segment_generator(enum mixed_generator_type type, uint32_t frequency, uint32_t samplerate, struct mixed_segment *segment);
1287
1334 MIXED_EXPORT int mixed_make_segment_ladspa(const char *file, uint32_t index, uint32_t samplerate, struct mixed_segment *segment);
1335
1365 MIXED_EXPORT int mixed_make_segment_space_mixer(uint32_t samplerate, struct mixed_segment *segment);
1366
1394 MIXED_EXPORT int mixed_make_segment_plane_mixer(uint32_t samplerate, struct mixed_segment *segment);
1395
1405 MIXED_EXPORT int mixed_make_segment_delay(float time, uint32_t samplerate, struct mixed_segment *segment);
1406
1415 MIXED_EXPORT int mixed_make_segment_repeat(float time, uint32_t samplerate, struct mixed_segment *segment);
1416
1423 MIXED_EXPORT int mixed_make_segment_pitch(float pitch, uint32_t samplerate, struct mixed_segment *segment);
1424
1433 MIXED_EXPORT int mixed_make_segment_gate(uint32_t samplerate, struct mixed_segment *segment);
1434
1439
1449 MIXED_EXPORT int mixed_make_segment_biquad_filter(enum mixed_biquad_filter type, float frequency, uint32_t samplerate, struct mixed_segment *segment);
1450
1457
1465
1478 MIXED_EXPORT int mixed_make_segment_fwd_fft(uint32_t samplerate, struct mixed_segment *segment);
1479
1490 MIXED_EXPORT int mixed_make_segment_inv_fft(uint32_t samplerate, struct mixed_segment *segment);
1491
1510
1516
1521
1526 MIXED_EXPORT int mixed_queue_remove_at(uint32_t pos, struct mixed_segment *queue);
1527
1530
1534
1538
1543 MIXED_EXPORT int mixed_make_segment_channel_convert(uint8_t in, uint8_t out, uint32_t samplerate, struct mixed_segment *segment);
1544
1549
1553 MIXED_EXPORT int mixed_make_segment_quantize(uint32_t steps, struct mixed_segment *segment);
1554
1559 MIXED_EXPORT int mixed_chain_add(struct mixed_segment *segment, struct mixed_segment *chain);
1560
1565 MIXED_EXPORT int mixed_chain_add_at(uint32_t i, struct mixed_segment *segment, struct mixed_segment *chain);
1566
1573 MIXED_EXPORT int mixed_chain_remove(struct mixed_segment *segment, struct mixed_segment *chain);
1574
1581 MIXED_EXPORT int mixed_chain_remove_at(uint32_t i, struct mixed_segment *chain);
1582
1593 MIXED_EXPORT int mixed_make_segment_convolution(uint16_t framesize, float *fir, uint32_t fir_size, uint32_t samplerate, struct mixed_segment *segment);
1594
1598 MIXED_EXPORT int mixed_make_segment_equalizer(float bands[8], uint32_t samplerate, struct mixed_segment *segment);
1599
1604 typedef int (*mixed_make_segment_function)(void *args, struct mixed_segment *segment);
1605
1610 typedef int (*mixed_register_segment_function)(const char *name, uint32_t argc, struct mixed_segment_field_info *args, mixed_make_segment_function function);
1611
1615 typedef int (*mixed_deregister_segment_function)(const char *name);
1616
1622
1628
1636 MIXED_EXPORT int mixed_load_plugin(const char *file);
1637
1643 MIXED_EXPORT int mixed_close_plugin(const char *file);
1644
1646#define MIXED_MAX_MAKE_ARG_COUNT 32
1648#define MIXED_MAX_SEGMENT_COUNT 1024
1650#define MIXED_MAX_SEGMENT_NAME_LENGTH 64
1651
1665 MIXED_EXPORT int mixed_register_segment(const char *name, uint32_t argc, struct mixed_segment_field_info *args, mixed_make_segment_function function);
1666
1671
1676 MIXED_EXPORT int mixed_list_segments(uint32_t *count, char **names);
1677
1683 MIXED_EXPORT int mixed_make_segment_info(const char *name, uint32_t *argc, const struct mixed_segment_field_info **args);
1684
1690 MIXED_EXPORT int mixed_make_segment(const char *name, void *args, struct mixed_segment *segment);
1691
1695
1699
1705
1711
1715
1725 typedef float (*mixed_transfer_function_from)(void *in, float *out, uint8_t stride, uint32_t samples, float volume, float target_volume);
1726
1736 typedef float (*mixed_transfer_function_to)(float *in, void *out, uint8_t stride, uint32_t samples, float volume, float target_volume);
1737
1742
1747
1754 MIXED_EXPORT int mixed_fwd_fft(uint16_t framesize, float *in, float *out);
1755
1762 MIXED_EXPORT int mixed_inv_fft(uint16_t framesize, float *in, float *out);
1763
1765 __attribute__((always_inline)) MIXED_EXPORT inline float mixed_from_db(mixed_decibel_t volume){
1766 return powf(10.0f, 0.05f * volume);
1767 }
1768
1770 __attribute__((always_inline)) MIXED_EXPORT inline mixed_decibel_t mixed_to_db(float volume){
1771 return 20.0f * log10f(volume);
1772 }
1773
1778 MIXED_EXPORT int mixed_error(void);
1779
1784 MIXED_EXPORT const char *mixed_error_string(int error_code);
1785
1788 MIXED_EXPORT const char *mixed_type_string(int code);
1789
1793
1797
1801
1804 MIXED_EXPORT const char *mixed_version(void);
1805
1807#ifdef MIXED_NO_CUSTOM_ALLOCATOR
1808#define mixed_calloc calloc
1809#define mixed_free free
1810#define mixed_realloc realloc
1811#else
1820 MIXED_EXPORT extern void *(*mixed_calloc)(size_t num, size_t size);
1821
1828 MIXED_EXPORT extern void (*mixed_free)(void *ptr);
1829
1843 MIXED_EXPORT extern void *(*mixed_realloc)(void *ptr, size_t size);
1844#endif
1845
1846#ifdef __cplusplus
1847}
1848#endif
1849#endif
MIXED_EXPORT int mixed_pack_finish_read(uint32_t size, struct mixed_pack *pack)
MIXED_EXPORT int mixed_segment_set_in(uint32_t field, uint32_t location, void *value, struct mixed_segment *segment)
MIXED_EXPORT int mixed_buffer_finish_read(uint32_t size, struct mixed_buffer *buffer)
MIXED_EXPORT int mixed_make_segment_inv_fft(uint32_t samplerate, struct mixed_segment *segment)
mixed_generator_type
Definition mixed.h:488
@ MIXED_SAWTOOTH
Generate a linear triangle wave with instant drop.
Definition mixed.h:496
@ MIXED_TRIANGLE
Generate a linear alternating triangle wave.
Definition mixed.h:494
@ MIXED_SINE
Generate an exact sine wave.
Definition mixed.h:490
@ MIXED_SQUARE
Generate a square wave with instant switches.
Definition mixed.h:492
__attribute__((always_inline)) MIXED_EXPORT inline float mixed_from_db(mixed_decibel_t volume)
Converts decibel to a linear volume multiplier.
Definition mixed.h:1765
MIXED_EXPORT int mixed_make_segment_compressor(uint32_t samplerate, struct mixed_segment *segment)
mixed_segment_info_flags
Definition mixed.h:559
@ MIXED_CLEARS_OUTPUT
Definition mixed.h:586
@ MIXED_SET
Definition mixed.h:579
@ MIXED_INPLACE
Definition mixed.h:563
@ MIXED_SEGMENT
Definition mixed.h:576
@ MIXED_OUT
Definition mixed.h:573
@ MIXED_GET
Definition mixed.h:582
@ MIXED_MODIFIES_INPUT
Definition mixed.h:567
@ MIXED_IN
Definition mixed.h:570
mixed_biquad_filter
Definition mixed.h:523
@ MIXED_LOWPASS
Definition mixed.h:527
@ MIXED_BANDPASS
Definition mixed.h:535
@ MIXED_LOWSHELF
Definition mixed.h:550
@ MIXED_PEAKING
Definition mixed.h:543
@ MIXED_NOTCH
Definition mixed.h:539
@ MIXED_ALLPASS
Definition mixed.h:546
@ MIXED_HIGHSHELF
Definition mixed.h:554
@ MIXED_HIGHPASS
Definition mixed.h:531
MIXED_EXPORT int mixed_make_segment_zero(struct mixed_segment *segment)
MIXED_EXPORT int mixed_make_segment_info(const char *name, uint32_t *argc, const struct mixed_segment_field_info **args)
mixed_repeat_mode
Definition mixed.h:512
@ MIXED_RECORD
Record the incoming audio stream into the buffer.
Definition mixed.h:514
@ MIXED_RECORD_ONCE
Record exactly once until the buffer is full then switch to play mode.
Definition mixed.h:518
@ MIXED_PLAY
Play the recorded buffer back to the output stream.
Definition mixed.h:516
MIXED_EXPORT int mixed_make_segment_volume_control(float volume, float pan, struct mixed_segment *segment)
MIXED_EXPORT int mixed_close_plugin(const char *file)
int(* mixed_deregister_segment_function)(const char *name)
Definition mixed.h:1615
MIXED_EXPORT int mixed_make_segment_distribute(struct mixed_segment *segment)
float(* mixed_transfer_function_from)(void *in, float *out, uint8_t stride, uint32_t samples, float volume, float target_volume)
Definition mixed.h:1725
MIXED_EXPORT int mixed_fwd_fft(uint16_t framesize, float *in, float *out)
MIXED_EXPORT int mixed_make_segment_space_mixer(uint32_t samplerate, struct mixed_segment *segment)
MIXED_EXPORT int mixed_buffer_from_pack(struct mixed_pack *in, struct mixed_buffer **outs, float *volume, float target_volume)
MIXED_EXPORT int mixed_make_segment_ladspa(const char *file, uint32_t index, uint32_t samplerate, struct mixed_segment *segment)
mixed_segment_field_type
Definition mixed.h:661
@ MIXED_FUNCTION
Definition mixed.h:684
@ MIXED_BOOL
Definition mixed.h:675
@ MIXED_SIZE_T
Definition mixed.h:678
@ MIXED_RESAMPLE_TYPE_ENUM
An enum mixed_resample_type.
Definition mixed.h:715
@ MIXED_GENERATOR_TYPE_ENUM
An enum mixed_generator_type.
Definition mixed.h:705
@ MIXED_NOISE_TYPE_ENUM
An enum mixed_noise_type.
Definition mixed.h:703
@ MIXED_STRING
Definition mixed.h:681
@ MIXED_SEGMENT_SEQUENCE_POINTER
A pointer to a mixed_segment_sequence.
Definition mixed.h:695
@ MIXED_ERROR_ENUM
An enum mixed_error.
Definition mixed.h:713
@ MIXED_REPEAT_MODE_ENUM
An enum mixed_repeat_mode.
Definition mixed.h:701
@ MIXED_POINTER
Definition mixed.h:687
@ MIXED_CHANNEL_T
Definition mixed.h:718
@ MIXED_LOCATION_ENUM
An enum mixed_location.
Definition mixed.h:697
@ MIXED_PACK_POINTER
A pointer to a mixed_pack.
Definition mixed.h:693
@ MIXED_DECIBEL_T
Definition mixed.h:721
@ MIXED_CHANNEL_CONFIGURATION_POINTER
A pointer to a mixed_channel_configuration.
Definition mixed.h:726
@ MIXED_SEGMENT_POINTER
A pointer to a mixed_segment.
Definition mixed.h:689
@ MIXED_FADE_TYPE_ENUM
An enum mixed_fade_type.
Definition mixed.h:707
@ MIXED_ATTENUATION_ENUM
An enum mixed_attenuation.
Definition mixed.h:709
@ MIXED_BUFFER_POINTER
A pointer to a mixed_buffer.
Definition mixed.h:691
@ MIXED_UNKNOWN
Definition mixed.h:662
@ MIXED_ENCODING_ENUM
An enum mixed_encoding.
Definition mixed.h:711
@ MIXED_BIQUAD_FILTER_ENUM
An enum mixed_biquad_filter.
Definition mixed.h:699
@ MIXED_DURATION_T
Definition mixed.h:724
MIXED_EXPORT int mixed_pack_request_write(void *restrict *area, uint32_t *size, struct mixed_pack *pack)
float(* mixed_transfer_function_to)(float *in, void *out, uint8_t stride, uint32_t samples, float volume, float target_volume)
Definition mixed.h:1736
MIXED_EXPORT int mixed_make_segment_void(struct mixed_segment *segment)
MIXED_EXPORT int mixed_make_segment_packer(struct mixed_pack *packed, uint32_t samplerate, struct mixed_segment *segment)
MIXED_EXPORT const char * mixed_location_string(int code)
float mixed_decibel_t
Definition mixed.h:743
MIXED_EXPORT int mixed_make_segment_basic_mixer(mixed_channel_t channels, struct mixed_segment *segment)
mixed_resample_type
Definition mixed.h:419
@ MIXED_SINC_BEST_QUALITY
Definition mixed.h:425
@ MIXED_SINC_MEDIUM_QUALITY
Definition mixed.h:430
@ MIXED_SINC_FASTEST
Definition mixed.h:433
@ MIXED_ZERO_ORDER_HOLD
Definition mixed.h:437
@ MIXED_LINEAR_INTERPOLATION
Definition mixed.h:440
MIXED_EXPORT int mixed_pack_finish_write(uint32_t size, struct mixed_pack *pack)
MIXED_EXPORT int mixed_buffer_transfer(struct mixed_buffer *from, struct mixed_buffer *to)
MIXED_EXPORT int mixed_make_segment_repeat(float time, uint32_t samplerate, struct mixed_segment *segment)
MIXED_EXPORT int mixed_queue_add(struct mixed_segment *news, struct mixed_segment *queue)
MIXED_EXPORT int mixed_register_segment(const char *name, uint32_t argc, struct mixed_segment_field_info *args, mixed_make_segment_function function)
MIXED_EXPORT int mixed_make_segment_chain(struct mixed_segment *segment)
MIXED_EXPORT int mixed_make_segment_gate(uint32_t samplerate, struct mixed_segment *segment)
MIXED_EXPORT uint32_t mixed_pack_available_write(struct mixed_pack *pack)
MIXED_EXPORT int mixed_chain_add(struct mixed_segment *segment, struct mixed_segment *chain)
MIXED_EXPORT uint8_t mixed_samplesize(enum mixed_encoding encoding)
MIXED_EXPORT int mixed_buffer_request_write(float *restrict *area, uint32_t *size, struct mixed_buffer *buffer)
MIXED_EXPORT const char * mixed_info_flag_string(int code)
MIXED_EXPORT int mixed_chain_remove(struct mixed_segment *segment, struct mixed_segment *chain)
MIXED_EXPORT int mixed_buffer_to_pack(struct mixed_buffer **ins, struct mixed_pack *out, float *volume, float target_volume)
mixed_encoding
Definition mixed.h:144
@ MIXED_DOUBLE
Corresponds to double (IEEE 754 double precision floating point)
Definition mixed.h:164
@ MIXED_INT24
Corresponds to int24_t (signed 24-bit integer)
Definition mixed.h:154
@ MIXED_UINT32
Corresponds to uint32_t (unsigned 32-bit integer)
Definition mixed.h:160
@ MIXED_UINT8
Corresponds to uint8_t (unsigned 8-bit integer)
Definition mixed.h:148
@ MIXED_INT16
Corresponds to int16_t (signed 16-bit integer)
Definition mixed.h:150
@ MIXED_UINT16
Corresponds to uint16_t (unsigned 16-bit integer)
Definition mixed.h:152
@ MIXED_UINT24
Corresponds to uint24_t (unsigned 24-bit integer)
Definition mixed.h:156
@ MIXED_FLOAT
Corresponds to float (IEEE 754 single precision floating point)
Definition mixed.h:162
@ MIXED_INT8
Corresponds to int8_t (signed 8-bit integer)
Definition mixed.h:146
@ MIXED_INT32
Corresponds to int32_t (signed 32-bit integer)
Definition mixed.h:158
MIXED_EXPORT uint32_t mixed_buffer_available_write(struct mixed_buffer *buffer)
MIXED_EXPORT int mixed_make_segment_equalizer(float bands[8], uint32_t samplerate, struct mixed_segment *segment)
MIXED_EXPORT int mixed_segment_get_in(uint32_t field, uint32_t location, void *value, struct mixed_segment *segment)
MIXED_EXPORT int mixed_make_segment_plane_mixer(uint32_t samplerate, struct mixed_segment *segment)
MIXED_EXPORT int mixed_chain_remove_at(uint32_t i, struct mixed_segment *chain)
MIXED_EXPORT const char * mixed_segment_field_string(int code)
float mixed_duration_t
Definition mixed.h:747
MIXED_EXPORT int mixed_make_segment_delay(float time, uint32_t samplerate, struct mixed_segment *segment)
uint8_t mixed_channel_t
Definition mixed.h:731
mixed_location
Definition mixed.h:593
@ MIXED_RIGHT_FRONT
The middle right front speaker in a 5.1 or similar setup.
Definition mixed.h:603
@ MIXED_RIGHT_SIDE_TOP
Definition mixed.h:637
@ MIXED_LEFT_FRONT
The middle left front speaker in a 5.1 or similar setup.
Definition mixed.h:601
@ MIXED_CENTER_REAR_TOP
Definition mixed.h:643
@ MIXED_RIGHT_FRONT_BOTTOM
The bottom front right speaker.
Definition mixed.h:615
@ MIXED_MONO
Signifies that the location is irrelevant and this is the only channel.
Definition mixed.h:595
@ MIXED_CENTER_FRONT_TOP
Definition mixed.h:642
@ MIXED_LEFT_SIDE
The left side speaker.
Definition mixed.h:623
@ MIXED_LEFT_REAR_TOP
The top rear left speaker.
Definition mixed.h:631
@ MIXED_LEFT_REAR_CENTER
Definition mixed.h:644
@ MIXED_LEFT_SIDE_TOP
Definition mixed.h:636
@ MIXED_CENTER_TOP
Definition mixed.h:641
@ MIXED_MAX_SPEAKER_COUNT
Definition mixed.h:656
@ MIXED_LEFT_FRONT_WIDE
Definition mixed.h:639
@ MIXED_SUBWOOFER_RIGHT
Definition mixed.h:647
@ MIXED_RIGHT_FRONT_TOP
The top front right speaker.
Definition mixed.h:629
@ MIXED_RIGHT_FRONT_HIGH
Definition mixed.h:649
@ MIXED_LEFT_FRONT_HIGH
Definition mixed.h:648
@ MIXED_LEFT_FRONT_TOP
The top front left speaker.
Definition mixed.h:627
@ MIXED_LEFT_REAR
The middle left rear speaker in a 5.1 or similar setup.
Definition mixed.h:605
@ MIXED_RIGHT_CENTER_BOTTOM
Definition mixed.h:653
@ MIXED_RIGHT_REAR_BOTTOM
The bottom rear right speaker.
Definition mixed.h:619
@ MIXED_CENTER_REAR
The rear center speaker.
Definition mixed.h:635
@ MIXED_RIGHT_FRONT_WIDE
Definition mixed.h:640
@ MIXED_CENTER_FRONT
The front center speaker.
Definition mixed.h:621
@ MIXED_RIGHT_REAR_CENTER
Definition mixed.h:645
@ MIXED_RIGHT_REAR_TOP
The top rear right speaker.
Definition mixed.h:633
@ MIXED_LEFT_FRONT_CENTER_TOP
Definition mixed.h:654
@ MIXED_LEFT
The left speaker in a stereo setup.
Definition mixed.h:597
@ MIXED_RIGHT_SIDE
The rigth side speaker.
Definition mixed.h:625
@ MIXED_CENTER_BOTTOM
Definition mixed.h:651
@ MIXED_LEFT_CENTER_BOTTOM
Definition mixed.h:652
@ MIXED_CENTER_FRONT_HIGH
Definition mixed.h:650
@ MIXED_LEFT_REAR_BOTTOM
The bottom rear left speaker.
Definition mixed.h:617
@ MIXED_SUBWOOFER_LEFT
Definition mixed.h:646
@ MIXED_SUBWOOFER
The subwoofer.
Definition mixed.h:611
@ MIXED_RIGHT_FRONT_CENTER_BOTTOM
Definition mixed.h:655
@ MIXED_RIGHT
The right speaker in a stereo setup.
Definition mixed.h:599
@ MIXED_LEFT_FRONT_BOTTOM
The bottom front left speaker.
Definition mixed.h:613
@ MIXED_SUBWOOFER_2
Definition mixed.h:638
@ MIXED_RIGHT_REAR
The middle right rear speaker in a 5.1 or similar setup.
Definition mixed.h:607
@ MIXED_CENTER
The middle front center speaker in a 5.1 or similar setup.
Definition mixed.h:609
MIXED_EXPORT int mixed_make_buffer(uint32_t size, struct mixed_buffer *buffer)
MIXED_EXPORT int mixed_make_segment_fade(float from, float to, float time, enum mixed_fade_type type, uint32_t samplerate, struct mixed_segment *segment)
MIXED_EXPORT int mixed_deregister_segment(const char *name)
MIXED_EXPORT void mixed_free_pack(struct mixed_pack *pack)
MIXED_EXPORT int mixed_make_segment_noise(enum mixed_noise_type type, struct mixed_segment *segment)
MIXED_EXPORT int mixed_load_plugin(const char *file)
MIXED_EXPORT int mixed_buffer_request_read(float *restrict *area, uint32_t *size, struct mixed_buffer *buffer)
MIXED_EXPORT const char * mixed_version(void)
MIXED_EXPORT int mixed_list_segments(uint32_t *count, char **names)
MIXED_EXPORT int mixed_make_segment_convolution(uint16_t framesize, float *fir, uint32_t fir_size, uint32_t samplerate, struct mixed_segment *segment)
MIXED_EXPORT int mixed_make_segment_unpacker(struct mixed_pack *packed, uint32_t samplerate, struct mixed_segment *segment)
mixed_attenuation
Definition mixed.h:445
@ MIXED_EXPONENTIAL_ATTENUATION
Definition mixed.h:461
@ MIXED_INVERSE_ATTENUATION
Definition mixed.h:453
@ MIXED_LINEAR_ATTENUATION
Definition mixed.h:457
@ MIXED_NO_ATTENUATION
Definition mixed.h:449
MIXED_EXPORT int mixed_pack_request_read(void *restrict *area, uint32_t *size, struct mixed_pack *pack)
mixed_error
Definition mixed.h:55
@ MIXED_BAD_NAME
A name was too long or malformed.
Definition mixed.h:134
@ MIXED_DUPLICATE_SEGMENT
Definition mixed.h:127
@ MIXED_INVALID_LOCATION
Definition mixed.h:76
@ MIXED_BUFFER_ALLOCATED
Definition mixed.h:121
@ MIXED_MIXING_FAILED
Definition mixed.h:67
@ MIXED_LADSPA_INSTANTIATION_FAILED
Definition mixed.h:100
@ MIXED_NOT_INITIALIZED
Definition mixed.h:73
@ MIXED_BUFFER_FULL
Definition mixed.h:109
@ MIXED_NO_ERROR
Definition mixed.h:58
@ MIXED_BAD_DYNAMIC_LIBRARY
Definition mixed.h:94
@ MIXED_UNKNOWN_ENCODING
Definition mixed.h:64
@ MIXED_SEGMENT_ALREADY_STARTED
Definition mixed.h:85
@ MIXED_OUT_OF_MEMORY
Definition mixed.h:61
@ MIXED_BUFFER_MISSING
Definition mixed.h:124
@ MIXED_BUFFER_EMPTY
Definition mixed.h:106
@ MIXED_RESAMPLE_FAILED
Definition mixed.h:103
@ MIXED_BAD_SEGMENT
Definition mixed.h:130
@ MIXED_BAD_ARGUMENT_COUNT
A function was specified with a bad number of arguments.
Definition mixed.h:132
@ MIXED_LADSPA_NO_PLUGIN_AT_INDEX
Definition mixed.h:97
@ MIXED_NOT_IMPLEMENTED
Definition mixed.h:70
@ MIXED_DYNAMIC_OPEN_FAILED
Definition mixed.h:91
@ MIXED_INTERNAL_ERROR
An error was encountered that really should not be possible to hit.
Definition mixed.h:138
@ MIXED_BUFFER_TOO_SMALL
A buffer is too small.
Definition mixed.h:136
@ MIXED_BUFFER_OVERCOMMIT
Definition mixed.h:112
@ MIXED_BAD_RESAMPLE_FACTOR
Definition mixed.h:115
@ MIXED_SEGMENT_ALREADY_ENDED
Definition mixed.h:88
@ MIXED_INVALID_VALUE
Definition mixed.h:82
@ MIXED_BAD_CHANNEL_CONFIGURATION
Definition mixed.h:118
@ MIXED_INVALID_FIELD
Definition mixed.h:79
MIXED_EXPORT int mixed_make_segment_fwd_fft(uint32_t samplerate, struct mixed_segment *segment)
MIXED_EXPORT uint32_t mixed_pack_available_read(struct mixed_pack *pack)
MIXED_EXPORT int mixed_buffer_finish_write(uint32_t size, struct mixed_buffer *buffer)
MIXED_EXPORT int mixed_chain_add_at(uint32_t i, struct mixed_segment *segment, struct mixed_segment *chain)
MIXED_EXPORT int mixed_segment_get(uint32_t field, void *value, struct mixed_segment *segment)
MIXED_EXPORT int mixed_segment_start(struct mixed_segment *segment)
MIXED_EXPORT void mixed_free_buffer(struct mixed_buffer *buffer)
MIXED_EXPORT int mixed_configuration_is_surround(struct mixed_channel_configuration const *configuration)
MIXED_EXPORT int mixed_make_segment_pitch(float pitch, uint32_t samplerate, struct mixed_segment *segment)
MIXED_EXPORT uint32_t mixed_buffer_available_read(struct mixed_buffer *buffer)
MIXED_EXPORT int mixed_make_segment_generator(enum mixed_generator_type type, uint32_t frequency, uint32_t samplerate, struct mixed_segment *segment)
mixed_noise_type
Definition mixed.h:501
@ MIXED_PINK_NOISE
Generate pink fractal noise.
Definition mixed.h:505
@ MIXED_BROWN_NOISE
Generate Brownian noise.
Definition mixed.h:507
@ MIXED_WHITE_NOISE
Generate purely random white noise.
Definition mixed.h:503
int(* mixed_free_plugin_function)(mixed_deregister_segment_function registrar)
Definition mixed.h:1627
MIXED_EXPORT int mixed_segment_mix(struct mixed_segment *segment)
MIXED_EXPORT int mixed_make_segment_channel_convert(uint8_t in, uint8_t out, uint32_t samplerate, struct mixed_segment *segment)
MIXED_EXPORT int mixed_segment_set(uint32_t field, void *value, struct mixed_segment *segment)
MIXED_EXPORT int mixed_make_segment_quantize(uint32_t steps, struct mixed_segment *segment)
MIXED_EXPORT mixed_transfer_function_to mixed_translator_to(enum mixed_encoding encoding)
MIXED_EXPORT int mixed_default_speaker_position(float position[3], mixed_channel_t channel)
MIXED_EXPORT const char * mixed_type_string(int code)
MIXED_EXPORT struct mixed_channel_configuration const * mixed_default_channel_configuration(mixed_channel_t channel_count)
MIXED_EXPORT int mixed_free_segment(struct mixed_segment *segment)
MIXED_EXPORT int mixed_make_segment(const char *name, void *args, struct mixed_segment *segment)
MIXED_EXPORT int mixed_make_pack(uint32_t frames, struct mixed_pack *pack)
MIXED_EXPORT int mixed_buffer_clear(struct mixed_buffer *buffer)
MIXED_EXPORT int mixed_queue_remove_at(uint32_t pos, struct mixed_segment *queue)
MIXED_EXPORT int mixed_make_segment_biquad_filter(enum mixed_biquad_filter type, float frequency, uint32_t samplerate, struct mixed_segment *segment)
MIXED_EXPORT void(* mixed_free)(void *ptr)
MIXED_EXPORT int mixed_queue_clear(struct mixed_segment *queue)
Remove all segments from the queue.
MIXED_EXPORT mixed_transfer_function_from mixed_translator_from(enum mixed_encoding encoding)
MIXED_EXPORT int mixed_make_segment_queue(struct mixed_segment *segment)
MIXED_EXPORT int mixed_segment_get_out(uint32_t field, uint32_t location, void *value, struct mixed_segment *segment)
MIXED_EXPORT int mixed_segment_end(struct mixed_segment *segment)
MIXED_EXPORT int mixed_segment_set_out(uint32_t field, uint32_t location, void *value, struct mixed_segment *segment)
mixed_segment_fields
Definition mixed.h:169
@ MIXED_IN_COUNT
Definition mixed.h:320
@ MIXED_COMPRESSOR_PREDELAY
Definition mixed.h:369
@ MIXED_REPEAT_POSITION
Definition mixed.h:388
@ MIXED_CHANNEL_CONFIGURATION
Definition mixed.h:409
@ MIXED_SPACE_MIN_DISTANCE
Definition mixed.h:242
@ MIXED_REPEAT_MODE
Definition mixed.h:304
@ MIXED_GATE_HOLD
Definition mixed.h:291
@ MIXED_MIX
Definition mixed.h:340
@ MIXED_GAIN
Definition mixed.h:313
@ MIXED_SPACE_ROLLOFF
Definition mixed.h:252
@ MIXED_FADE_TO
Definition mixed.h:197
@ MIXED_BYPASS
Definition mixed.h:175
@ MIXED_COMPRESSOR_RATIO
Definition mixed.h:360
@ MIXED_GATE_ATTACK
Definition mixed.h:287
@ MIXED_GATE_RELEASE
Definition mixed.h:295
@ MIXED_Q
Definition mixed.h:316
@ MIXED_RESAMPLE_TYPE
Definition mixed.h:187
@ MIXED_BUFFER_SIZE_HINT
Definition mixed.h:400
@ MIXED_DELAY_TIME
Definition mixed.h:272
@ MIXED_PITCH_SHIFT
Definition mixed.h:275
@ MIXED_VOLUME_CONTROL_PAN
Definition mixed.h:191
@ MIXED_GENERATOR_FREQUENCY
Definition mixed.h:206
@ MIXED_COMPRESSOR_ATTACK
Definition mixed.h:363
@ MIXED_PLANE_VELOCITY
Definition mixed.h:348
@ MIXED_FADE_TYPE
Definition mixed.h:203
@ MIXED_FADE_FROM
Definition mixed.h:194
@ MIXED_SPACE_LOCATION
Definition mixed.h:214
@ MIXED_COMPRESSOR_PREGAIN
Definition mixed.h:351
@ MIXED_OVERSAMPLING
Definition mixed.h:394
@ MIXED_SPACE_DOPPLER_FACTOR
Definition mixed.h:237
@ MIXED_SPACE_ATTENUATION
Definition mixed.h:269
@ MIXED_PLANE_LOCATION
Definition mixed.h:344
@ MIXED_SAMPLERATE
Definition mixed.h:178
@ MIXED_SPACE_MAX_DISTANCE
Definition mixed.h:247
@ MIXED_COMPRESSOR_GAIN
Definition mixed.h:379
@ MIXED_QUANTIZE_STEPS
Definition mixed.h:333
@ MIXED_CHANNEL_COUNT_IN
Definition mixed.h:382
@ MIXED_FREQUENCY
Definition mixed.h:307
@ MIXED_BUFFER
Definition mixed.h:172
@ MIXED_FIR
Definition mixed.h:406
@ MIXED_GATE_OPEN_THRESHOLD
Definition mixed.h:279
@ MIXED_SPACE_UP
Definition mixed.h:226
@ MIXED_OUT_COUNT
Definition mixed.h:324
@ MIXED_NOISE_TYPE
Definition mixed.h:298
@ MIXED_SPACE_VELOCITY
Definition mixed.h:222
@ MIXED_COMPRESSOR_RELEASE
Definition mixed.h:366
@ MIXED_COMPRESSOR_KNEE
Definition mixed.h:357
@ MIXED_FRAMESIZE
Definition mixed.h:391
@ MIXED_REPEAT_TIME
Definition mixed.h:301
@ MIXED_GENERATOR_TYPE
Definition mixed.h:210
@ MIXED_CHANNEL_COUNT_OUT
Definition mixed.h:385
@ MIXED_VOLUME
Definition mixed.h:183
@ MIXED_COMPRESSOR_POSTGAIN
Definition mixed.h:376
@ MIXED_FADE_TIME
Definition mixed.h:200
@ MIXED_GATE_CLOSE_THRESHOLD
Definition mixed.h:283
@ MIXED_CURRENT_SEGMENT
Definition mixed.h:327
@ MIXED_BIQUAD_FILTER
Definition mixed.h:310
@ MIXED_COMPRESSOR_THRESHOLD
Definition mixed.h:354
@ MIXED_SPACE_SOUNDSPEED
Definition mixed.h:232
@ MIXED_COMPRESSOR_RELEASEZONE
Definition mixed.h:373
@ MIXED_SPEED_FACTOR
Definition mixed.h:330
@ MIXED_EQUALIZER_BAND
Definition mixed.h:412
@ MIXED_SPACE_DIRECTION
Definition mixed.h:218
MIXED_EXPORT int mixed_pack_clear(struct mixed_pack *pack)
#define MIXED_EXPORT
Definition mixed.h:22
MIXED_EXPORT int mixed_segment_print(char *str, size_t size, struct mixed_segment *segment)
MIXED_EXPORT int mixed_queue_remove(struct mixed_segment *old, struct mixed_segment *queue)
mixed_fade_type
Definition mixed.h:466
@ MIXED_CUBIC_IN_OUT
Definition mixed.h:483
@ MIXED_CUBIC_OUT
Definition mixed.h:478
@ MIXED_LINEAR
Definition mixed.h:470
@ MIXED_CUBIC_IN
Definition mixed.h:474
MIXED_EXPORT int mixed_buffer_resize(uint32_t size, struct mixed_buffer *buffer)
int(* mixed_make_plugin_function)(mixed_register_segment_function registrar)
Definition mixed.h:1621
MIXED_EXPORT uint8_t mixed_byte_stride(mixed_channel_t channels, enum mixed_encoding encoding)
MIXED_EXPORT const char * mixed_error_string(int error_code)
int(* mixed_register_segment_function)(const char *name, uint32_t argc, struct mixed_segment_field_info *args, mixed_make_segment_function function)
Definition mixed.h:1610
MIXED_EXPORT int mixed_inv_fft(uint16_t framesize, float *in, float *out)
MIXED_EXPORT int mixed_make_segment_speed_change(double speed, struct mixed_segment *segment)
int(* mixed_make_segment_function)(void *args, struct mixed_segment *segment)
Definition mixed.h:1604
MIXED_EXPORT int mixed_buffer_copy(struct mixed_buffer *from, struct mixed_buffer *to)
Definition mixed.h:756
char is_virtual
Definition mixed.h:764
float * _data
Definition mixed.h:757
uint32_t read
Definition mixed.h:759
uint32_t reserved
Definition mixed.h:761
uint32_t size
Definition mixed.h:758
uint32_t write
Definition mixed.h:760
Definition mixed.h:736
mixed_channel_t count
Definition mixed.h:737
mixed_channel_t positions[MIXED_MAX_SPEAKER_COUNT]
Definition mixed.h:738
Definition mixed.h:776
uint32_t reserved
Definition mixed.h:783
mixed_channel_t channels
Definition mixed.h:789
uint32_t write
Definition mixed.h:782
unsigned char * _data
Definition mixed.h:779
enum mixed_encoding encoding
Definition mixed.h:786
uint32_t read
Definition mixed.h:781
uint32_t samplerate
Definition mixed.h:792
uint32_t size
Definition mixed.h:780
Definition mixed.h:800
uint32_t field
Definition mixed.h:805
const char * description
Definition mixed.h:808
enum mixed_segment_field_type type
Definition mixed.h:819
enum mixed_segment_info_flags flags
Definition mixed.h:813
uint32_t type_count
Definition mixed.h:822
Definition mixed.h:831
const char * name
Definition mixed.h:834
enum mixed_segment_info_flags flags
Definition mixed.h:840
uint32_t min_inputs
Definition mixed.h:843
uint32_t outputs
Definition mixed.h:849
const char * description
Definition mixed.h:837
uint32_t max_inputs
Definition mixed.h:846
struct mixed_segment_field_info fields[32]
Definition mixed.h:856
Definition mixed.h:878
int(* mix)(struct mixed_segment *segment)
Definition mixed.h:882
int(* get_out)(uint32_t field, uint32_t location, void *value, struct mixed_segment *segment)
Definition mixed.h:887
int(* end)(struct mixed_segment *segment)
Definition mixed.h:883
int(* free)(struct mixed_segment *segment)
Definition mixed.h:879
int(* start)(struct mixed_segment *segment)
Definition mixed.h:881
int(* set)(uint32_t field, void *value, struct mixed_segment *segment)
Definition mixed.h:888
int(* info)(struct mixed_segment_info *info, struct mixed_segment *segment)
Definition mixed.h:880
void * data
Definition mixed.h:892
int(* get_in)(uint32_t field, uint32_t location, void *value, struct mixed_segment *segment)
Definition mixed.h:886
int(* set_out)(uint32_t field, uint32_t location, void *value, struct mixed_segment *segment)
Definition mixed.h:885
int(* set_in)(uint32_t field, uint32_t location, void *value, struct mixed_segment *segment)
Definition mixed.h:884
int(* get)(uint32_t field, void *value, struct mixed_segment *segment)
Definition mixed.h:889