Skip to content

Commit

Permalink
update readme for snd & fs
Browse files Browse the repository at this point in the history
  • Loading branch information
boozook committed Sep 28, 2023
1 parent c50884b commit e6c1ae8
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 27 deletions.
20 changes: 10 additions & 10 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion api/fs/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "playdate-fs"
version = "0.2.0"
version = "0.2.1"
readme = "README.md"
description = "High-level file-system API built on-top of Playdate API"
keywords = ["playdate", "sdk", "api", "gamedev"]
Expand Down
2 changes: 1 addition & 1 deletion api/fs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

High-level interface to file-system on-top of `playdate-sys` crate.

⚠️ Until the version `0.3` API is unstable and can be changed partially.
⚠️ Prior to the version `0.3` API is unstable and can be changed without deprecation period.



Expand Down
2 changes: 1 addition & 1 deletion api/sound/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "playdate-sound"
version = "0.2.2"
version = "0.2.3"
readme = "README.md"
description = "High-level sound API built on-top of Playdate API"
keywords = ["playdate", "sdk", "api", "gamedev"]
Expand Down
9 changes: 4 additions & 5 deletions api/sound/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@

High-level sound API built on-top of [playdate-sys][].

Covered parts the sound API:
Covered parts of the sound API:
- File Player
- Sample Player
- Sample
- Sound Source
- Headphones and microphone (incomplete) 🤏

⚠️ __Incomplete__, WiP.
- Headphones and microphone (incomplete)

Not covered things:
- channel
Expand All @@ -20,7 +18,7 @@ Not covered things:
- envelope
- callbacks

Before the version `0.3` API is unstable and can be changed.
⚠️ Prior to the version `0.3` API is unstable and can be changed without deprecation period.


## Prerequisites
Expand All @@ -33,6 +31,7 @@ Before the version `0.3` API is unstable and can be changed.
[sdk]: https://play.date/dev/#cardSDK
[doc-prerequisites]: https://sdk.play.date/Inside%20Playdate%20with%20C.html#_prerequisites


## Usage

```rust
Expand Down
10 changes: 1 addition & 9 deletions api/sound/src/sample.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,7 @@ impl<Api: api::Api> Sample<Api> {
pub fn new_for_file_with<P: AsRef<Path>>(api: Api, path: P) -> Result<Self, ApiError> {
let size = match fs::metadata(path) {
Ok(stats) => stats.size,
Err(err) => {
return match err {
fs::error::ApiError::Api(err) => Err(ApiError::Api(err.into())),
fs::error::ApiError::Utf8(err) => Err(ApiError::Utf8(err)),
fs::error::ApiError::FromUtf8(err) => Err(ApiError::FromUtf8(err)),
fs::error::ApiError::CStr(err) => Err(ApiError::CStr(err)),
fs::error::ApiError::NullPtr(_) => Err(ApiError::NullPtr(sys::error::NullPtrError)),
}
}, // Err(err) => return Err(ApiError::from_err(err)),
Err(err) => return Err(ApiError::from_err(err)),
};

Self::new_with_size_with(api, size as _).map_err(Into::into)
Expand Down

0 comments on commit e6c1ae8

Please sign in to comment.