#playdate #playdate-sdk #api #gamedev #sdk #api-bindings

nightly no-std playdate-sound

High-level sound API built on-top of Playdate API

18 releases

0.3.0 Apr 9, 2024
0.3.0-alpha.1 Mar 20, 2024
0.2.7 Sep 30, 2023
0.1.6 Sep 27, 2023
0.0.0 Sep 8, 2023

#360 in Audio

Download history 7/week @ 2024-02-15 68/week @ 2024-02-22 17/week @ 2024-02-29 19/week @ 2024-03-07 50/week @ 2024-03-14 46/week @ 2024-03-21 15/week @ 2024-03-28 131/week @ 2024-04-04 26/week @ 2024-04-11

164 downloads per month
Used in playdate

MIT/Apache

15MB
333K SLoC

Sound API for PlayDate

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

Covered parts of the sound API:

  • File Player
  • Sample Player
    • Sample
  • Sound Source
  • Headphones and microphone (incomplete)

Not covered things:

  • channel
  • synth
  • sequence
  • effect
  • lfo
  • envelope
  • callbacks

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

Prerequisites

  1. Rust nightly toolchain (rustup is optional)
  2. Playdate SDK
  3. Follow the official documentation
  4. Follow the instructions for playdate-sys

Usage

use playdate_sound::sample::*;
use playdate_sound::player::sp::*;
use playdate_sound::player::Repeat;

let player = Player::<api::Cache>::new()?;
let sample = Sample::new_from_file("game_main_theme.pda")?;

player.set_sample(&sample);
player.play(Repeat::LoopsEndlessly, 1.0);

See more in examples.


This software is not sponsored or supported by Panic.

Dependencies