@@ -44,6 +44,8 @@ inline float sig_clamp(float value, float min, float max) {
44
44
return sig_fminf (sig_fmaxf (value , min ), max );
45
45
}
46
46
47
+ // TODO: Implement a fast fmodf
48
+ // See: https://github.com/electro-smith/DaisySP/blob/0cc02b37579e3619efde73be49a1fa01ffee5cf6/Source/Utility/dsp.h#L89-L95
47
49
// TODO: Unit tests
48
50
inline float sig_flooredfmodf (float numer , float denom ) {
49
51
float remain = fmodf (numer , denom );
@@ -1789,10 +1791,10 @@ void sig_dsp_TimedGate_destroy(struct sig_Allocator* allocator,
1789
1791
}
1790
1792
1791
1793
1792
- struct cc_sig_DustGate * cc_sig_DustGate_new (struct sig_Allocator * allocator ,
1794
+ struct sig_dsp_DustGate * sig_dsp_DustGate_new (struct sig_Allocator * allocator ,
1793
1795
struct sig_SignalContext * context ) {
1794
- struct cc_sig_DustGate * self = sig_MALLOC (allocator ,
1795
- struct cc_sig_DustGate );
1796
+ struct sig_dsp_DustGate * self = sig_MALLOC (allocator ,
1797
+ struct sig_dsp_DustGate );
1796
1798
1797
1799
self -> reciprocalDensity = sig_dsp_Div_new (allocator , context );
1798
1800
self -> reciprocalDensity -> inputs .left = context -> unity -> outputs .main ;
@@ -1808,22 +1810,22 @@ struct cc_sig_DustGate* cc_sig_DustGate_new(struct sig_Allocator* allocator,
1808
1810
self -> gate -> inputs .duration =
1809
1811
self -> densityDurationMultiplier -> outputs .main ;
1810
1812
1811
- cc_sig_DustGate_init (self , context );
1813
+ sig_dsp_DustGate_init (self , context );
1812
1814
self -> outputs .main = self -> gate -> outputs .main ;
1813
1815
1814
1816
return self ;
1815
1817
}
1816
1818
1817
1819
1818
- void cc_sig_DustGate_init (struct cc_sig_DustGate * self ,
1820
+ void sig_dsp_DustGate_init (struct sig_dsp_DustGate * self ,
1819
1821
struct sig_SignalContext * context ) {
1820
- sig_dsp_Signal_init (self , context , * cc_sig_DustGate_generate );
1822
+ sig_dsp_Signal_init (self , context , * sig_dsp_DustGate_generate );
1821
1823
sig_CONNECT_TO_SILENCE (self , density , context );
1822
1824
sig_CONNECT_TO_SILENCE (self , durationPercentage , context );
1823
1825
};
1824
1826
1825
- void cc_sig_DustGate_generate (void * signal ) {
1826
- struct cc_sig_DustGate * self = (struct cc_sig_DustGate * ) signal ;
1827
+ void sig_dsp_DustGate_generate (void * signal ) {
1828
+ struct sig_dsp_DustGate * self = (struct sig_dsp_DustGate * ) signal ;
1827
1829
1828
1830
// Bind all parameters (remove this when we have change events).
1829
1831
self -> dust -> inputs .density = self -> inputs .density ;
@@ -1842,8 +1844,8 @@ void cc_sig_DustGate_generate(void* signal) {
1842
1844
}
1843
1845
1844
1846
1845
- void cc_sig_DustGate_destroy (struct sig_Allocator * allocator ,
1846
- struct cc_sig_DustGate * self ) {
1847
+ void sig_dsp_DustGate_destroy (struct sig_Allocator * allocator ,
1848
+ struct sig_dsp_DustGate * self ) {
1847
1849
sig_dsp_TimedGate_destroy (allocator , self -> gate );
1848
1850
1849
1851
sig_dsp_Mul_destroy (allocator , self -> densityDurationMultiplier );
0 commit comments