{"id":20721505,"url":"https://github.com/cleancut/rusty_audio","last_synced_at":"2025-04-23T15:20:30.864Z","repository":{"id":36261416,"uuid":"214270817","full_name":"CleanCut/rusty_audio","owner":"CleanCut","description":"Fun \u0026 easy audio playback library.","archived":false,"fork":false,"pushed_at":"2023-04-10T17:56:25.000Z","size":60,"stargazers_count":9,"open_issues_count":2,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-30T00:51:12.570Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CleanCut.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"license/APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["cleancut"],"patreon":"nathanstocks"}},"created_at":"2019-10-10T19:41:11.000Z","updated_at":"2024-10-22T02:42:56.000Z","dependencies_parsed_at":"2024-11-17T03:28:17.740Z","dependency_job_id":"12920814-389f-4ac7-b97a-cae6f28d45e3","html_url":"https://github.com/CleanCut/rusty_audio","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CleanCut%2Frusty_audio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CleanCut%2Frusty_audio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CleanCut%2Frusty_audio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CleanCut%2Frusty_audio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CleanCut","download_url":"https://codeload.github.com/CleanCut/rusty_audio/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250457778,"owners_count":21433734,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-17T03:28:10.127Z","updated_at":"2025-04-23T15:20:30.843Z","avatar_url":"https://github.com/CleanCut.png","language":"Rust","funding_links":["https://github.com/sponsors/cleancut","https://patreon.com/nathanstocks","https://github.com/sponsors/CleanCut"],"categories":[],"sub_categories":[],"readme":"[![Crates.io Version](https://img.shields.io/crates/v/rusty_audio.svg)](https://crates.io/crates/rusty_audio)\n[![Crates.io Downloads](https://img.shields.io/crates/d/rusty_audio.svg)](https://crates.io/crates/rusty_audio)\n[![Build Status](https://github.com/cleancut/rusty_audio/workflows/CI/badge.svg)](https://github.com/cleancut/rusty_audio/actions)\n\n\n# Rusty Audio Playback Library\n\n`rusty_audio` is a fun and easy audio playback library that provides a 4-track audio system to\nload/decode audio files and play them, perfect for small projects.  It is also well-suited for\ntraining purposes, and is featured in the [Ultimate Rust Crash Course] on Udemy.\n\n- Formats: MP3, WAV, Vorbis and Flac.\n- Platforms: Supports macOS, Windows, and iOS out of the box. Linux requires installation of\n  [extra dependencies](#dependencies-on-linux).\n\nThis library uses the [rodio] audio playback library under the hood, which you should\nconsider using directly if your needs are more complex.\n\n### Example\n\n```toml\n# Add this to your [dependencies] section in Cargo.toml\nrusty_audio = \"1.4.1\"\n```\n\n```rust\n// main.rs\nuse rusty_audio::Audio;\n\nfn main() {\n    let mut audio = Audio::new();\n    audio.add(\"startup\", \"my_sound_file.mp3\"); // Load the sound, give it a name\n    audio.play(\"startup\"); // Execution continues while playback occurs in another thread.\n    audio.wait(); // Block until sounds finish playing\n}\n```\n\n### Built-in Example\n\nYou can run the built-in example by cloning this repository, and then running:\n\n```shell\n$ cargo run --example play\n```\n\n### Dependencies on Linux\n\nFor Linux, the [CPAL] package that is used under the hood\nrequires the *alsa* development libraries to be installed.\n\n**CentOS**\n\n```bash\nsudo yum install -y alsa-lib-devel\n```\n\n**Debian/Ubuntu**\n\n```bash\nsudo apt install libasound2-dev\n```\n\n## Contribution\n\nAll contributions are assumed to be dual-licensed under MIT/Apache-2.\n\n## License\n\nDistributed under the terms of both the MIT license and the Apache License (Version 2.0).\n\nSee [license/APACHE](license/APACHE) and [license/MIT](license/MIT).\n\n## Sponsor\n\nIf you like Rusty Audio, please consider [sponsoring me] on GitHub. 💖\n\n[CPAL]: https://github.com/RustAudio/cpal\n[rodio]: https://github.com/RustAudio/rodio\n[sponsoring me]: https://github.com/sponsors/CleanCut\n[Ultimate Rust Crash Course]: https://agileperception.com/ultimate_rust_crash_course\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcleancut%2Frusty_audio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcleancut%2Frusty_audio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcleancut%2Frusty_audio/lists"}