FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
webaudio/src/cpp/periodic-wave.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
/
periodic-wave.cpp
Copy path
More file actions
More file actions
Latest commit
History
History
History
71 lines (41 loc) · 1.2 KB
Breadcrumbs
webaudio
/
src
/
cpp
/
periodic-wave.cpp
Copy path
File metadata and controls
71 lines (41 loc) · 1.2 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
#
include
"
periodic-wave.hpp
"
#
include
"
common.hpp
"
//
------ Constructor and Destructor
PeriodicWave::PeriodicWave
() {
_isDestroyed =
false
;
}
PeriodicWave::~PeriodicWave
() {
_destroy
();
}
void
PeriodicWave::_destroy
() {
DES_CHECK
;
_isDestroyed =
true
;
}
//
------ Methods and props
//
------ System methods and props for Napi::ObjectWrap
IMPLEMENT_ES5_CLASS
(PeriodicWave);
void
PeriodicWave::init
(Napi::Env env, Napi::Object exports) {
Napi::Function ctor =
wrap
(env);
JS_ASSIGN_METHOD
(destroy);
JS_ASSIGN_GETTER
(isDestroyed);
exports.
Set
(
"
PeriodicWave
"
, ctor);
}
bool
PeriodicWave::isPeriodicWave
(Napi::Object obj) {
return
obj.
InstanceOf
(_ctorEs5.
Value
());
}
Napi::Object
PeriodicWave::getNew
() {
Napi::Function ctor =
Nan::New
(_constructor);
//
Napi::Value argv[] = { /* arg1, arg2, ... */ };
return
Nan::NewInstance
(ctor,
0
/*
argc
*/
,
nullptr
/*
argv
*/
).
ToLocalChecked
();
}
PeriodicWave::PeriodicWave
(
const
Napi::CallbackInfo &info) : Napi::ObjectWrap<PeriodicWave>(info) {
PeriodicWave *periodicWave =
new
PeriodicWave
();
}
JS_IMPLEMENT_METHOD
(PeriodicWave, destroy) {
THIS_CHECK
;
_destroy
();
}
JS_IMPLEMENT_GETTER
(PeriodicWave, isDestroyed) {
NAPI_ENV
;
RET_BOOL
(_isDestroyed);
}
Back
|
FazBrowse Home
|
New Git URL