-
Notifications
You must be signed in to change notification settings - Fork 110
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
ndk: Add missing API levels, use intra-links in AAudio docs #108
Conversation
A bunch of AAudio functions use api-level-28 but this feature did not exist. For convenience add the missing 27 and 25 as well, in case new wrappers are introduced that may also carry a bunch of functions introduced on these levels. Now the supported list is linear.
This is not the case currently. |
This seems to be rust-lang/rust#79792 |
This prevents ie. broken_intra_doc_links from ending up in the main branch.
@msiglreith Thanks! I wasn't aware of Should we add more documentation checking to the CI? I guess |
Nightly rustdoc warns/errors that these links are not converted to hyperlinks (and thus not clickable in the web pages). Note that the link to AudioTrack#write is broken; rustdoc rightfully converts `[]` to `%5B%5D`, but android.com does not resolve that to the right anchor.
@@ -92,7 +92,7 @@ pub enum AAudioFormat { | |||
/// Values outside that range may be clipped. | |||
/// | |||
/// See also 'floatData' at | |||
/// https://developer.android.com/reference/android/media/AudioTrack#write(float[],%20int,%20int,%20int) | |||
/// <https://developer.android.com/reference/android/media/AudioTrack#write(float[],%20int,%20int,%20int)> |
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.
Note that this link is broken; rustdoc rightfully converts []
to %5B%5D
, but android.com does not resolve that to the right anchor.
Some flukes in the CI, GH actions' virtual environments are still at 1.48 and |
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.
Thanks again!
CI support is nice and intra-doc links are really nice feature
Following the removal of
set_callback
in #107 this re-introduces the "proper" doc (according to NDK docs) toAudioStreamDataCallback
. At the same time the rest of the docs have been upgraded to use intra links (it is hard to resist: start cleaning up one line, but the rest can't be left behind; that'd be inconsistent).Some names were broken or renamed in Rust, again signifying the relevance of proper doc links. Not only is it useful for readers to click through to a reference, it also ensures that reference is valid at build time making sure the documentation is useful at all times (yeah - you always end up grepping for that one function in the docs, frustrated that it doesn't seem to exist anywhere).
More importantly this adds missing features for API level 25, 27 and 28. 28 is used by
AAudio
and had me wonder why certain functions didn't show up in the docs even withall
... 😬Final note: Links are a bit inconsistent; some use the name of an enum variant (ie.
[`Variant`](EnumType::Variant)
), others use the full path including type (ie.[`EnumType::Variant`]
). That should probably be cleaned up.