-
Notifications
You must be signed in to change notification settings - Fork 470
Prototyping an API for getting the supported min and max buffersizes #401
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
Merged
mitchmindtree
merged 18 commits into
RustAudio:master
from
JoshuaBatty:buffersize_range
Jul 14, 2020
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
f762e5d
prototyping an API for getting min and max buffersize
JoshuaBatty 919722a
with_sample_rate_and_buffer_size sample_rate is set to self.max_sampl…
JoshuaBatty 7eb45bc
cargo fmt
JoshuaBatty 7081c3b
wip alsa buffersizes
JoshuaBatty d72b546
gets buffersize range and allows to set buffersize for alsa
JoshuaBatty 6edee6c
coreaudio buffersize wip
JoshuaBatty 9e660da
implemented buffersizes for asio
JoshuaBatty 4cd9d0b
finished implementing buffersizes for coreaudio
JoshuaBatty 935fa28
buffersizes api for wasapi
JoshuaBatty cf1a928
reset examples
JoshuaBatty 7c1adce
adds support for buffersizes in webaudio and emscripten
JoshuaBatty 9c85eec
cargo fmt fix
JoshuaBatty 10599ac
fixed coreaudio buffersize errors
JoshuaBatty 271cc34
cargo fmt fix for coreaudio
JoshuaBatty 4ce12a6
adds docs for BufferSize and fixes buffersize bugs in emscripten and …
JoshuaBatty f285389
fixed mismatched types in emscipten set_timeout
JoshuaBatty e854c4e
added in sniperrifle2004 code from PR 431
JoshuaBatty e739dbf
cargo fmt
JoshuaBatty File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
Oops, something went wrong.
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.
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.
This should probably be
set_buffer_size_near.Uh oh!
There was an error while loading. Please reload this page.
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 think using
set_buffer_sizeis the correct approach here. If the user has specified aFixedvalue and that exact value is unsupported, then we should return an error to the user to notify them.Perhaps we could open an issue to discuss adding a
Nearest(FrameCount)variant to theBufferSizeenum in a follow-up PR that aligns with the semantics ofset_buffer_size_near?Uh oh!
There was an error while loading. Please reload this page.
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.
The reason I suggested
set_buffer_size_nearis because finding theFixedvalues that actually work would pretty much rely on trial and error (Depending on the device). Especially since the possible range of buffer sizes is connected to the other hardware parameters. There are someFixedvalues that should work most of the time, but relying on it will come to bite you. I think the user would benefit more from being able to query the precise buffer size afterwards (If that actually matters. It might).Nearest(Framecount)would of course also work for that though leaving theFixedfor the case in which the user really has to have that precise buffer size.