Use boost spsc_queue for ringbuffer instead of internals of portaudio library#97
Open
kskalski wants to merge 187 commits intoKitt-AI:masterfrom
Open
Use boost spsc_queue for ringbuffer instead of internals of portaudio library#97kskalski wants to merge 187 commits intoKitt-AI:masterfrom
kskalski wants to merge 187 commits intoKitt-AI:masterfrom
Conversation
…plify the code and set-up by using spsc_queue from boost.
Conflicts: examples/C++/demo.mk
…plify the code and set-up by using spsc_queue from boost.
Collaborator
|
@kskalski Kamil could you let me know why you changed it to use the the ringbuffer from boost? Is it because you'd like to use the system level portaudio which was installed without the patch? I'm still concerned about the boost dependency, and if we can avoid I'd like to avoid it. |
Author
|
It's primarily for readability and simplicity - since this is just an
example code I guess its goal is to quickly get user up to speed on the API
with smallest possible snippet of code.
When I was analyzing the example the use of PA_RingBuffer really did strike
me as something sophisticated and tricky to do. Only then I realized that
it could as well just be an queue with lock complexity comes from 1)
minimizing locks / perf optimization 2) use of specific PA structure to do
that.
Not using PA's internal-only datastructures and avoiding the download /
patch machinery is clearly a big bonus too. At least it seems like a bigger
burden and surprise than having to install one additional system package.
|
Collaborator
|
Thanks @kskalski . I'll leave this open for a while and see if we get opinions form other people as well. Personally I feel adding boost is too much, but if we get a lot of up-votes from other developers, I'll merge this. Thanks for the effort! |
Code clean-up
…resource from the resources directory.
…he current working directory.
Perl wrapper and sample code modifications as per @chenguoguo
Update the documentation for `SnowboyDetect::RunDetection()` to specify that the length of the array should be given in samples, not bytes.
…g idiom Signed-off-by: deadprogram <ron@hybridgroup.com>
Signed-off-by: deadprogram <ron@hybridgroup.com>
This will require you to re-run this publish script on the Pi Build OSX and Linux binaries for node 8.x
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.