Skip to content

Commit

Permalink
Correct comment about effect IDs
Browse files Browse the repository at this point in the history
APE IDs are not in the place of builtin IDs. There's a special i32
before that.

And a minor language fix in another one.
  • Loading branch information
grandchild committed May 6, 2023
1 parent 3ce7961 commit 01385d3
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ fn scan_preset_file(

/// Recursively walk the preset tree and find any effects that have resources.
///
/// Return any resources found, or the empty set.
/// Return any resources found, or an empty set.
fn scan_components(
buf: &Vec<u8>,
mut pos: usize,
Expand Down Expand Up @@ -572,8 +572,10 @@ fn scan_components(

/// Decode the byte array at `pos` as an AVS effect ID and its serialized length.
///
/// Every preset starts with its ID (either a i32 or APE ID string, see [CompID] for
/// details) followed by the length of the effect's section in the preset file.
/// Every effect starts with its ID (an i32, either the builtin effect's ID or some
/// arbitrary number > [AVS_APE_SEPARATOR]). In APE effect sections the APE ID string
/// follows (see [CompID] for details). Next comes the length of the effect's section
/// in the preset file (an i32 again).
///
/// The distinction between builtin effect and APE is done by comparison with
/// [AVS_APE_SEPARATOR]. If the `ID >= AVS_APE_SEPARATOR` then the data starting after
Expand Down

0 comments on commit 01385d3

Please sign in to comment.