Skip to content

Commit

Permalink
update signatures to latest dev
Browse files Browse the repository at this point in the history
  • Loading branch information
dromer committed Jan 29, 2025
1 parent 4306e62 commit e59499e
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions hvcc/generators/ir2c/SignalRFFT.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@

from .HeavyObject import HeavyObject

from hvcc.types.IR import IRSignalList


class SignalRFFT(HeavyObject):

Expand All @@ -33,7 +35,7 @@ def get_C_file_set(cls) -> set:
return {"HvSignalRFFT.h", "HvSignalRFFT.c", "pffft.h", "pffft.c"}

@classmethod
def get_C_init(cls, obj_type: str, obj_id: int, args: Dict) -> List[str]:
def get_C_init(cls, obj_type: str, obj_id: str, args: Dict) -> List[str]:
return [
"sRFFT_init(&sRFFT_{0}, &hTable_{1}, {2});".format(
obj_id,
Expand All @@ -42,31 +44,31 @@ def get_C_init(cls, obj_type: str, obj_id: int, args: Dict) -> List[str]:
]

@classmethod
def get_C_onMessage(cls, obj_type: str, obj_id: int, inlet_index: int, args: Dict) -> List[str]:
def get_C_onMessage(cls, obj_type: str, obj_id: str, inlet_index: int, args: Dict) -> List[str]:
return [
"sRFFT_onMessage(_c, &Context(_c)->sRFFT_{0}, {1}, m, NULL);".format(
obj_id,
inlet_index)
]

@classmethod
def get_C_process(cls, process_dict: Dict, obj_type: str, obj_id: int, args: Dict) -> List[str]:
def get_C_process(cls, process_dict: IRSignalList, obj_type: str, obj_id: str, args: Dict) -> List[str]:
if obj_type == "__rfft~f":
return [
"__hv_rfft_f(&sRFFT_{0}, VIf({1}), VOf({2}), VOf({3}));".format(
process_dict["id"],
cls._c_buffer(process_dict["inputBuffers"][0]),
cls._c_buffer(process_dict["outputBuffers"][0]),
cls._c_buffer(process_dict["outputBuffers"][1])
process_dict.id,
cls._c_buffer(process_dict.inputBuffers[0]),
cls._c_buffer(process_dict.outputBuffers[0]),
cls._c_buffer(process_dict.outputBuffers[1])
)
]
elif obj_type == "__rifft~f":
return [
"__hv_rifft_f(&sRFFT_{0}, VIf({1}), VIf({2}), VOf({3}));".format(
process_dict["id"],
cls._c_buffer(process_dict["inputBuffers"][0]),
cls._c_buffer(process_dict["inputBuffers"][1]),
cls._c_buffer(process_dict["outputBuffers"][0])
process_dict.id,
cls._c_buffer(process_dict.inputBuffers[0]),
cls._c_buffer(process_dict.inputBuffers[1]),
cls._c_buffer(process_dict.outputBuffers[0])
)
]
else:
Expand Down

0 comments on commit e59499e

Please sign in to comment.