Skip to content

Commit

Permalink
Better fix for build issue on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
OrcusCZ committed May 30, 2020
1 parent e90c467 commit 1efaba9
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions pyreaper/creaper.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ from libc.stdint cimport int16_t, int32_t

from reaper cimport reaper as _reaper

ctypedef int32_t * int32_t_ptr

cdef class Track:
cdef _reaper.Track * ptr

Expand Down Expand Up @@ -111,7 +109,7 @@ cdef class EpochTracker:
return True

cdef GetTrackVoicedFlags(self, _reaper.Track * track,
int32_t * voiced_flags):
np.ndarray[np.int32_t, ndim = 1, mode = "c"] voiced_flags):
cdef int32_t i
for i in range(0, track.num_frames()):
voiced_flags[i] = 1 if track.v(i) else 0
Expand Down Expand Up @@ -183,7 +181,7 @@ def reaper_internal(np.ndarray[np.int16_t, ndim=1, mode="c"] x, fs,
cdef np.ndarray[np.float32_t, ndim= 1, mode = "c"] pm_times \
= np.zeros(pN, dtype=np.float32)
et.GetTrackTimes(pm_track.ptr, & pm_times[0])
et.GetTrackVoicedFlags(pm_track.ptr, reinterpret_cast[int32_t_ptr](& pm[0]))
et.GetTrackVoicedFlags(pm_track.ptr, pm)

# Get f0 and correlations
f0_track = Track()
Expand Down

0 comments on commit 1efaba9

Please sign in to comment.