/* Copyright (c) 2022 Alex Diener This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. Alex Diener alex@ludobloom.com */ #ifndef __WaveModifier_timeValueTransform_H__ #define __WaveModifier_timeValueTransform_H__ #ifdef __cplusplus extern "C" { #endif typedef struct WaveModifier_timeValueTransform WaveModifier_timeValueTransform; #define WaveModifier_timeValueTransform_superclass WaveModifier #include "audiosynth/WaveModifier.h" #define WaveModifier_timeValueTransform_ivars \ WaveModifier_ivars \ \ float timeOffset; \ float timeScale; \ float valueOffset; \ float valueScale; #define WaveModifier_timeValueTransform_vtable(self_type) \ WaveModifier_vtable(self_type) stemobject_declare(WaveModifier_timeValueTransform) // Scale is applied after offset WaveModifier_timeValueTransform * WaveModifier_timeValueTransform_create(float timeOffset, float timeScale, float valueOffset, float valueScale); bool WaveModifier_timeValueTransform_init(WaveModifier_timeValueTransform * self, float timeOffset, float timeScale, float valueOffset, float valueScale); void WaveModifier_timeValueTransform_dispose(WaveModifier_timeValueTransform * self); WaveModifier_timeValueTransform * WaveModifier_timeValueTransform_copy(WaveModifier_timeValueTransform * self); bool WaveModifier_timeValueTransform_isEqual(WaveModifier_timeValueTransform * self, compat_type(WaveModifier_timeValueTransform *) compare); uint32_t WaveModifier_timeValueTransform_hash(WaveModifier_timeValueTransform * self, uint32_t initval); void WaveModifier_timeValueTransform_initCopy(WaveModifier_timeValueTransform * self, WaveModifier_timeValueTransform * original); unsigned int WaveModifier_timeValueTransform_getOwnPropertyCount(WaveModifier_timeValueTransform * self); SynthProperty * WaveModifier_timeValueTransform_getOwnProperties(WaveModifier_timeValueTransform * self); float WaveModifier_timeValueTransform_sample(WaveModifier_timeValueTransform * self, SamplerObject_state * state, float phase, float phaseDelta, float time, float timeDelta); #ifdef __cplusplus } #endif #endif