annotate osx/include/rubberband/rubberband-c.h @ 169:223a55898ab9 tip default

Add null config files
author Chris Cannam <cannam@all-day-breakfast.com>
date Mon, 02 Mar 2020 14:03:47 +0000
parents 241db1b1eff2
children
rev   line source
matthiasmauch@114 1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
matthiasmauch@114 2
matthiasmauch@114 3 /*
matthiasmauch@114 4 Rubber Band Library
matthiasmauch@114 5 An audio time-stretching and pitch-shifting library.
matthiasmauch@114 6 Copyright 2007-2012 Particular Programs Ltd.
matthiasmauch@114 7
matthiasmauch@114 8 This program is free software; you can redistribute it and/or
matthiasmauch@114 9 modify it under the terms of the GNU General Public License as
matthiasmauch@114 10 published by the Free Software Foundation; either version 2 of the
matthiasmauch@114 11 License, or (at your option) any later version. See the file
matthiasmauch@114 12 COPYING included with this distribution for more information.
matthiasmauch@114 13
matthiasmauch@114 14 Alternatively, if you have a valid commercial licence for the
matthiasmauch@114 15 Rubber Band Library obtained by agreement with the copyright
matthiasmauch@114 16 holders, you may redistribute and/or modify it under the terms
matthiasmauch@114 17 described in that licence.
matthiasmauch@114 18
matthiasmauch@114 19 If you wish to distribute code using the Rubber Band Library
matthiasmauch@114 20 under terms other than those of the GNU General Public License,
matthiasmauch@114 21 you must obtain a valid commercial licence before doing so.
matthiasmauch@114 22 */
matthiasmauch@114 23
matthiasmauch@114 24 #ifndef _RUBBERBAND_C_API_H_
matthiasmauch@114 25 #define _RUBBERBAND_C_API_H_
matthiasmauch@114 26
matthiasmauch@114 27 #ifdef __cplusplus
matthiasmauch@114 28 extern "C" {
matthiasmauch@114 29 #endif
matthiasmauch@114 30
matthiasmauch@114 31 #define RUBBERBAND_VERSION "1.8.1"
matthiasmauch@114 32 #define RUBBERBAND_API_MAJOR_VERSION 2
matthiasmauch@114 33 #define RUBBERBAND_API_MINOR_VERSION 5
matthiasmauch@114 34
matthiasmauch@114 35 /**
matthiasmauch@114 36 * This is a C-linkage interface to the Rubber Band time stretcher.
matthiasmauch@114 37 *
matthiasmauch@114 38 * This is a wrapper interface: the primary interface is in C++ and is
matthiasmauch@114 39 * defined and documented in RubberBandStretcher.h. The library
matthiasmauch@114 40 * itself is implemented in C++, and requires C++ standard library
matthiasmauch@114 41 * support even when using the C-linkage API.
matthiasmauch@114 42 *
matthiasmauch@114 43 * Please see RubberBandStretcher.h for documentation.
matthiasmauch@114 44 *
matthiasmauch@114 45 * If you are writing to the C++ API, do not include this header.
matthiasmauch@114 46 */
matthiasmauch@114 47
matthiasmauch@114 48 enum RubberBandOption {
matthiasmauch@114 49
matthiasmauch@114 50 RubberBandOptionProcessOffline = 0x00000000,
matthiasmauch@114 51 RubberBandOptionProcessRealTime = 0x00000001,
matthiasmauch@114 52
matthiasmauch@114 53 RubberBandOptionStretchElastic = 0x00000000,
matthiasmauch@114 54 RubberBandOptionStretchPrecise = 0x00000010,
matthiasmauch@114 55
matthiasmauch@114 56 RubberBandOptionTransientsCrisp = 0x00000000,
matthiasmauch@114 57 RubberBandOptionTransientsMixed = 0x00000100,
matthiasmauch@114 58 RubberBandOptionTransientsSmooth = 0x00000200,
matthiasmauch@114 59
matthiasmauch@114 60 RubberBandOptionDetectorCompound = 0x00000000,
matthiasmauch@114 61 RubberBandOptionDetectorPercussive = 0x00000400,
matthiasmauch@114 62 RubberBandOptionDetectorSoft = 0x00000800,
matthiasmauch@114 63
matthiasmauch@114 64 RubberBandOptionPhaseLaminar = 0x00000000,
matthiasmauch@114 65 RubberBandOptionPhaseIndependent = 0x00002000,
matthiasmauch@114 66
matthiasmauch@114 67 RubberBandOptionThreadingAuto = 0x00000000,
matthiasmauch@114 68 RubberBandOptionThreadingNever = 0x00010000,
matthiasmauch@114 69 RubberBandOptionThreadingAlways = 0x00020000,
matthiasmauch@114 70
matthiasmauch@114 71 RubberBandOptionWindowStandard = 0x00000000,
matthiasmauch@114 72 RubberBandOptionWindowShort = 0x00100000,
matthiasmauch@114 73 RubberBandOptionWindowLong = 0x00200000,
matthiasmauch@114 74
matthiasmauch@114 75 RubberBandOptionSmoothingOff = 0x00000000,
matthiasmauch@114 76 RubberBandOptionSmoothingOn = 0x00800000,
matthiasmauch@114 77
matthiasmauch@114 78 RubberBandOptionFormantShifted = 0x00000000,
matthiasmauch@114 79 RubberBandOptionFormantPreserved = 0x01000000,
matthiasmauch@114 80
matthiasmauch@114 81 RubberBandOptionPitchHighQuality = 0x00000000,
matthiasmauch@114 82 RubberBandOptionPitchHighSpeed = 0x02000000,
matthiasmauch@114 83 RubberBandOptionPitchHighConsistency = 0x04000000,
matthiasmauch@114 84
matthiasmauch@114 85 RubberBandOptionChannelsApart = 0x00000000,
matthiasmauch@114 86 RubberBandOptionChannelsTogether = 0x10000000,
matthiasmauch@114 87 };
matthiasmauch@114 88
matthiasmauch@114 89 typedef int RubberBandOptions;
matthiasmauch@114 90
matthiasmauch@114 91 struct RubberBandState_;
matthiasmauch@114 92 typedef struct RubberBandState_ *RubberBandState;
matthiasmauch@114 93
matthiasmauch@114 94 extern RubberBandState rubberband_new(unsigned int sampleRate,
matthiasmauch@114 95 unsigned int channels,
matthiasmauch@114 96 RubberBandOptions options,
matthiasmauch@114 97 double initialTimeRatio,
matthiasmauch@114 98 double initialPitchScale);
matthiasmauch@114 99
matthiasmauch@114 100 extern void rubberband_delete(RubberBandState);
matthiasmauch@114 101
matthiasmauch@114 102 extern void rubberband_reset(RubberBandState);
matthiasmauch@114 103
matthiasmauch@114 104 extern void rubberband_set_time_ratio(RubberBandState, double ratio);
matthiasmauch@114 105 extern void rubberband_set_pitch_scale(RubberBandState, double scale);
matthiasmauch@114 106
matthiasmauch@114 107 extern double rubberband_get_time_ratio(const RubberBandState);
matthiasmauch@114 108 extern double rubberband_get_pitch_scale(const RubberBandState);
matthiasmauch@114 109
matthiasmauch@114 110 extern unsigned int rubberband_get_latency(const RubberBandState);
matthiasmauch@114 111
matthiasmauch@114 112 extern void rubberband_set_transients_option(RubberBandState, RubberBandOptions options);
matthiasmauch@114 113 extern void rubberband_set_detector_option(RubberBandState, RubberBandOptions options);
matthiasmauch@114 114 extern void rubberband_set_phase_option(RubberBandState, RubberBandOptions options);
matthiasmauch@114 115 extern void rubberband_set_formant_option(RubberBandState, RubberBandOptions options);
matthiasmauch@114 116 extern void rubberband_set_pitch_option(RubberBandState, RubberBandOptions options);
matthiasmauch@114 117
matthiasmauch@114 118 extern void rubberband_set_expected_input_duration(RubberBandState, unsigned int samples);
matthiasmauch@114 119
matthiasmauch@114 120 extern unsigned int rubberband_get_samples_required(const RubberBandState);
matthiasmauch@114 121
matthiasmauch@114 122 extern void rubberband_set_max_process_size(RubberBandState, unsigned int samples);
matthiasmauch@114 123 extern void rubberband_set_key_frame_map(RubberBandState, unsigned int keyframecount, unsigned int *from, unsigned int *to);
matthiasmauch@114 124
matthiasmauch@114 125 extern void rubberband_study(RubberBandState, const float *const *input, unsigned int samples, int final);
matthiasmauch@114 126 extern void rubberband_process(RubberBandState, const float *const *input, unsigned int samples, int final);
matthiasmauch@114 127
matthiasmauch@114 128 extern int rubberband_available(const RubberBandState);
matthiasmauch@114 129 extern unsigned int rubberband_retrieve(const RubberBandState, float *const *output, unsigned int samples);
matthiasmauch@114 130
matthiasmauch@114 131 extern unsigned int rubberband_get_channel_count(const RubberBandState);
matthiasmauch@114 132
matthiasmauch@114 133 extern void rubberband_calculate_stretch(RubberBandState);
matthiasmauch@114 134
matthiasmauch@114 135 extern void rubberband_set_debug_level(RubberBandState, int level);
matthiasmauch@114 136 extern void rubberband_set_default_debug_level(int level);
matthiasmauch@114 137
matthiasmauch@114 138 #ifdef __cplusplus
matthiasmauch@114 139 }
matthiasmauch@114 140 #endif
matthiasmauch@114 141
matthiasmauch@114 142 #endif