FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
webaudio/src/cpp/wave-shaper-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
/
wave-shaper-node.cpp
Copy path
More file actions
More file actions
Latest commit
History
History
History
61 lines (39 loc) · 1.05 KB
Breadcrumbs
webaudio
/
src
/
cpp
/
wave-shaper-node.cpp
Copy path
File metadata and controls
61 lines (39 loc) · 1.05 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
#
include
"
wave-shaper-node.hpp
"
IMPLEMENT_ES5_CLASS
(WaveShaperNode);
void
WaveShaperNode::init
(Napi::Env env, Napi::Object exports) {
Napi::Function ctor =
wrap
(env);
JS_ASSIGN_SETTER
(oversample);
JS_ASSIGN_SETTER
(curve);
JS_ASSIGN_METHOD
(destroy);
JS_ASSIGN_GETTER
(isDestroyed);
exports.
Set
(
"
WaveShaperNode
"
, ctor);
}
WaveShaperNode::WaveShaperNode
(
const
Napi::CallbackInfo &info) : AudioNode() {
_isDestroyed =
false
;
}
//
------ Methods and props
JS_IMPLEMENT_GETTER
(WaveShaperNode, curve) {
THIS_CHECK
;
RET_VALUE
(_curve.
Value
());
}
JS_IMPLEMENT_SETTER
(WaveShaperNode, curve) {
THIS_SETTER_CHECK
;
SETTER_OBJ_ARG
;
if
(
Nan::New
(_curve) == v) {
return
;
}
_curve.
Reset
(v,
1
);
//
TODO: may be additional actions on change?
emit
(
"
curve
"
,
1
, &value);
}
JS_IMPLEMENT_GETTER
(WaveShaperNode, oversample) {
THIS_CHECK
;
RET_STR
(_oversample);
}
JS_IMPLEMENT_SETTER
(WaveShaperNode, oversample) {
THIS_SETTER_CHECK
;
SETTER_STR_ARG
;
CACHE_CAS
(_oversample, v)
//
TODO: may be additional actions on change?
emit
(
"
oversample
"
,
1
, &value);
}
Back
|
FazBrowse Home
|
New Git URL