annotate win64-msvc/include/rubberband/rubberband-c.h @ 53:e1712f7d74a4

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