FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
webaudio/src/cpp/audio-destination-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
/
audio-destination-node.cpp
Copy path
More file actions
More file actions
Latest commit
History
History
History
50 lines (35 loc) · 1.06 KB
Breadcrumbs
webaudio
/
src
/
cpp
/
audio-destination-node.cpp
Copy path
File metadata and controls
50 lines (35 loc) · 1.06 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
#
include
"
audio-destination-node.hpp
"
IMPLEMENT_ES5_CLASS
(AudioDestinationNode);
void
AudioDestinationNode::init
(Napi::Env env, Napi::Object exports) {
Napi::Function ctor =
wrap
(env);
JS_ASSIGN_GETTER
(maxChannelCount);
JS_ASSIGN_METHOD
(destroy);
exports.
Set
(
"
AudioDestinationNode
"
, ctor);
}
AudioDestinationNode::AudioDestinationNode
(
const
Napi::CallbackInfo &info)
: CommonNode(info.This(), "AudioDestinationNode") {
NAPI_ENV
;
Napi::Object context = info[
0
].
As
<Napi::Object>();
Napi::External<
void
> extNode = info[
1
].
As
<Napi::External<
void
>>();
NodePtr *node =
reinterpret_cast
<NodePtr *>(extNode.
Data
());
reset
(context, *node);
Napi::Value argv[] = { context, extNode };
super
(info,
2
, argv);
}
AudioDestinationNode::~AudioDestinationNode
() {
_destroy
();
}
void
AudioDestinationNode::_destroy
() {
DES_CHECK
;
CommonNode::_destroy
();
}
JS_IMPLEMENT_GETTER
(AudioDestinationNode, maxChannelCount) {
THIS_CHECK
;
RET_NUM
(_maxChannelCount);
}
JS_IMPLEMENT_METHOD
(AudioDestinationNode, destroy) {
THIS_CHECK
;
emit
(
"
destroy
"
);
_destroy
();
RET_UNDEFINED
;
}
Back
|
FazBrowse Home
|
New Git URL