@@ -67,7 +67,7 @@ function get_samples_for_dio(fs::Real, len::Integer, period::Real)
67
67
(Cint, Cint, Cdouble), fs, len, period)
68
68
end
69
69
70
- function dio (x:: AbstractVector {Cdouble} , fs:: Real , opt:: DioOption = DioOption ())
70
+ function dio (x:: StridedVector {Cdouble} , fs:: Real , opt:: DioOption = DioOption ())
71
71
expectedlen = get_samples_for_dio (fs, length (x), opt. period)
72
72
f0 = Array (Cdouble, expectedlen)
73
73
timeaxis = Array (Cdouble, expectedlen)
@@ -78,9 +78,9 @@ function dio(x::AbstractVector{Cdouble}, fs::Real, opt::DioOption=DioOption())
78
78
f0, timeaxis
79
79
end
80
80
81
- function stonemask (x:: AbstractVector {Cdouble} , fs:: Integer ,
82
- timeaxis:: AbstractVector {Cdouble} ,
83
- f0:: AbstractVector {Cdouble} )
81
+ function stonemask (x:: StridedVector {Cdouble} , fs:: Integer ,
82
+ timeaxis:: StridedVector {Cdouble} ,
83
+ f0:: StridedVector {Cdouble} )
84
84
refinedF0 = Array (Cdouble, length (f0))
85
85
ccall ((:StoneMask , libworld), Void,
86
86
(Ptr{Cdouble}, Cint, Cint, Ptr{Cdouble}, Ptr{Cdouble}, Cint,
@@ -101,9 +101,9 @@ function get_fftsize_for_cheaptrick(fs::Integer)
101
101
convert (Int, fftsize)
102
102
end
103
103
104
- function cheaptrick (x:: AbstractVector {Cdouble} , fs:: Integer ,
105
- timeaxis:: AbstractVector {Cdouble} ,
106
- f0:: AbstractVector {Cdouble} )
104
+ function cheaptrick (x:: StridedVector {Cdouble} , fs:: Integer ,
105
+ timeaxis:: StridedVector {Cdouble} ,
106
+ f0:: StridedVector {Cdouble} )
107
107
freqbins = get_fftsize_for_cheaptrick (fs)>> 1 + 1
108
108
spectrogram = Array (Cdouble, freqbins, length (f0))
109
109
@@ -124,9 +124,9 @@ function cheaptrick(x::AbstractVector{Cdouble}, fs::Integer,
124
124
spectrogram
125
125
end
126
126
127
- function d4c (x:: AbstractVector {Cdouble} , fs:: Integer ,
128
- timeaxis:: AbstractVector {Cdouble} ,
129
- f0:: AbstractVector {Cdouble} )
127
+ function d4c (x:: StridedVector {Cdouble} , fs:: Integer ,
128
+ timeaxis:: StridedVector {Cdouble} ,
129
+ f0:: StridedVector {Cdouble} )
130
130
fftsize = get_fftsize_for_cheaptrick (fs)
131
131
freqbins = fftsize>> 1 + 1
132
132
aperiodicity = zeros (Cdouble, freqbins, length (f0))
@@ -148,9 +148,9 @@ function d4c(x::AbstractVector{Cdouble}, fs::Integer,
148
148
aperiodicity
149
149
end
150
150
151
- function synthesis (f0:: AbstractVector {Cdouble} ,
152
- spectrogram:: AbstractMatrix {Cdouble} ,
153
- aperiodicity:: AbstractMatrix {Cdouble} ,
151
+ function synthesis (f0:: StridedVector {Cdouble} ,
152
+ spectrogram:: StridedMatrix {Cdouble} ,
153
+ aperiodicity:: StridedMatrix {Cdouble} ,
154
154
period:: Real , fs:: Integer , len:: Integer )
155
155
fftsize = get_fftsize_for_cheaptrick (fs)
156
156
@@ -173,10 +173,10 @@ end
173
173
174
174
# matlabfunctions
175
175
176
- function interp1! (x:: AbstractVector {Cdouble} ,
177
- y:: AbstractVector {Cdouble} ,
178
- xi:: AbstractVector {Cdouble} ,
179
- yi:: AbstractVector {Cdouble} )
176
+ function interp1! (x:: StridedVector {Cdouble} ,
177
+ y:: StridedVector {Cdouble} ,
178
+ xi:: StridedVector {Cdouble} ,
179
+ yi:: StridedVector {Cdouble} )
180
180
@assert length (x) == length (y)
181
181
@assert length (xi) == length (yi)
182
182
ccall ((:interp1 , libworld), Void,
@@ -185,9 +185,9 @@ function interp1!(x::AbstractVector{Cdouble},
185
185
yi
186
186
end
187
187
188
- function interp1 (x:: AbstractVector {Cdouble} ,
189
- y:: AbstractVector {Cdouble} ,
190
- xi:: AbstractVector {Cdouble} )
188
+ function interp1 (x:: StridedVector {Cdouble} ,
189
+ y:: StridedVector {Cdouble} ,
190
+ xi:: StridedVector {Cdouble} )
191
191
yi = similar (xi)
192
192
interp1! (x, y, xi, yi)
193
193
end
0 commit comments