Skip to content

Commit 15c10fc

Browse files
committed
Add getSigNature API.
1 parent 6c680f2 commit 15c10fc

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

architecture/faust/dsp/libfaust-signal.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,15 @@ LIBFAUST_API Interval getSigInterval(Signal s);
192192
*/
193193
LIBFAUST_API void setSigInterval(Signal s, Interval& inter);
194194

195+
/**
196+
* Get the signal type.
197+
*
198+
* @param s - the signal
199+
*
200+
* @return the signal type
201+
*/
202+
LIBFAUST_API SType getSigNature(Signal s);
203+
195204
/**
196205
* Check if a signal is nil.
197206
*

compiler/box_signal_api.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,12 @@ LIBFAUST_API Tree sigFVar(SType type, const string& name, const string& file)
170170
return sigFVar(tree(type), tree(name), tree(file));
171171
}
172172

173+
LIBFAUST_API SType getSigNature(Tree s)
174+
{
175+
::Type type = getCertifiedSigType(s);
176+
return SType(type->nature());
177+
}
178+
173179
// User Interface
174180

175181
LIBFAUST_API Tree sigButton(const string& label)

0 commit comments

Comments
 (0)