22 releases

0.4.3 Jan 31, 2025
0.4.2 Jul 13, 2024
0.4.1 May 30, 2024
0.3.0 Apr 9, 2024
0.0.0 Sep 8, 2023

#320 in Audio

Download history 2/week @ 2024-10-28 9/week @ 2024-11-11 10/week @ 2024-11-18 1/week @ 2024-11-25 4/week @ 2024-12-02 9/week @ 2024-12-09 9/week @ 2024-12-16 140/week @ 2025-01-27 52/week @ 2025-02-03

192 downloads per month
Used in playdate

MIT/Apache

18MB
312K 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