-
-
Notifications
You must be signed in to change notification settings - Fork 23
new setup for custom processor #562
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
target_sources(${CMAKE_PROJECT_NAME} PRIVATE | ||
${ROOT}/shared/NativeAudioProcessingModule.cpp | ||
${ROOT}/shared/MyProcessorNode.cpp | ||
${ROOT}/shared/MyProcessorNodeHostObject.cpp | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
highlight? :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I used highlight to indicate changes when comparing with generated files, I think it could be misleading if I would highlight only this part. Also highlighting whole file is a no go for me.
} | ||
const oscillator = audioContextRef.current.createOscillator(); | ||
// constructor is put in global scope | ||
const processor = new MyProcessorNode(audioContextRef.current, global.createCustomProcessorNode(audioContextRef.current.context)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm, would it make sense to wrap the call to global.create in a function exported somewhere? :)
import { createCustomProcessorNode } from './creator';
const processor = createCustomProcessorNode(audioContextRef.current);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also you're using most of the nodes through useRef, while the processor is used directly, either do not use the refs at all or use it for the processor too. (The first option is preferred)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with a wrapper, but for the sake of simplicity and minimal code example, would this be needed? To me it would introduce unnecessary overhead.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
1f6af72
to
7bc81ca
Compare
Closes RNAA-173, RNAA-138, RNAA-175
Introduced changes
Checklist