FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
webaudio/src/cpp/iir-filter-node.cpp at master · node-3d/webaudio · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
node-3d
/
webaudio
Public
Notifications
You must be signed in to change notification settings
Fork
4
Star
20
Code
Issues
0
Pull requests
0
Actions
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Security and quality
Insights
Expand file tree
Breadcrumbs
webaudio
/
src
/
cpp
/
iir-filter-node.cpp
Copy path
More file actions
More file actions
Latest commit
History
History
History
84 lines (50 loc) · 1.46 KB
Breadcrumbs
webaudio
/
src
/
cpp
/
iir-filter-node.cpp
Copy path
File metadata and controls
84 lines (50 loc) · 1.46 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#
include
"
iir-filter-node.hpp
"
IIRFilterNode::IIRFilterNode
() : AudioNode() {
_isDestroyed =
false
;
}
IIRFilterNode::~IIRFilterNode
() {
_destroy
();
}
void
IIRFilterNode::_destroy
() {
DES_CHECK
;
_isDestroyed =
true
;
AudioNode::_destroy
();
}
//
------ Methods and props
JS_IMPLEMENT_METHOD
(IIRFilterNode, getFrequencyResponse) {
THIS_CHECK
;
REQ_OBJ_ARG
(
0
, frequencyHz);
REQ_OBJ_ARG
(
1
, magResponse);
REQ_OBJ_ARG
(
2
, phaseResponse);
//
TODO: do something?
RET_UNDEFINED
;
}
//
------ System methods and props for Napi::ObjectWrap
IMPLEMENT_ES5_CLASS
(IIRFilterNode);
void
IIRFilterNode::init
(Napi::Env env, Napi::Object exports) {
Napi::Function ctor =
wrap
(env);
JS_ASSIGN_METHOD
(getFrequencyResponse);
JS_ASSIGN_METHOD
(destroy);
JS_ASSIGN_GETTER
(isDestroyed);
exports.
Set
(
"
IIRFilterNode
"
, ctor);
}
bool
IIRFilterNode::isIIRFilterNode
(Napi::Object obj) {
return
obj.
InstanceOf
(_ctorEs5.
Value
());
}
Napi::Object
IIRFilterNode::getNew
() {
Napi::Function ctor =
Nan::New
(_constructor);
//
Napi::Value argv[] = { /* arg1, arg2, ... */ };
return
Nan::NewInstance
(ctor,
0
/*
argc
*/
,
nullptr
/*
argv
*/
).
ToLocalChecked
();
}
IIRFilterNode::IIRFilterNode
(
const
Napi::CallbackInfo &info) : Napi::ObjectWrap<IIRFilterNode>(info) {
IIRFilterNode *iIRFilterNode =
new
IIRFilterNode
();
}
JS_IMPLEMENT_METHOD
(IIRFilterNode, destroy) {
THIS_CHECK
;
emit
(
"
destroy
"
);
_destroy
();
}
JS_IMPLEMENT_GETTER
(IIRFilterNode, isDestroyed) {
NAPI_ENV
;
RET_BOOL
(_isDestroyed);
}
Back
|
FazBrowse Home
|
New Git URL