{"id":16991837,"url":"https://github.com/akiyukiokayasu/pacmog","last_synced_at":"2025-03-17T09:30:42.819Z","repository":{"id":64509759,"uuid":"560767696","full_name":"AkiyukiOkayasu/pacmog","owner":"AkiyukiOkayasu","description":"PCM decoding library for embedded systems","archived":false,"fork":false,"pushed_at":"2023-06-08T06:07:32.000Z","size":329,"stargazers_count":6,"open_issues_count":9,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-04-25T20:22:15.562Z","etag":null,"topics":["adpcm","aiff","embedded","pcm","rust","wav"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AkiyukiOkayasu.png","metadata":{"files":{"readme":"README.md","changelog":null,"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}},"created_at":"2022-11-02T08:13:35.000Z","updated_at":"2024-08-09T05:23:40.053Z","dependencies_parsed_at":"2024-08-09T05:23:34.521Z","dependency_job_id":"bf932090-4c99-44df-b49e-b889226f8e21","html_url":"https://github.com/AkiyukiOkayasu/pacmog","commit_stats":{"total_commits":183,"total_committers":3,"mean_commits":61.0,"dds":"0.31693989071038253","last_synced_commit":"afa523eb7c5c1d7d6bb2b0abdd263f11f8ba030e"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AkiyukiOkayasu%2Fpacmog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AkiyukiOkayasu%2Fpacmog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AkiyukiOkayasu%2Fpacmog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AkiyukiOkayasu%2Fpacmog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AkiyukiOkayasu","download_url":"https://codeload.github.com/AkiyukiOkayasu/pacmog/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243858800,"owners_count":20359257,"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":["adpcm","aiff","embedded","pcm","rust","wav"],"created_at":"2024-10-14T03:27:30.106Z","updated_at":"2025-03-17T09:30:37.795Z","avatar_url":"https://github.com/AkiyukiOkayasu.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pacmog\n\n[![Cargo](https://img.shields.io/crates/v/pacmog.svg)](https://crates.io/crates/pacmog)  \n[![Documentation](https://docs.rs/pacmog/badge.svg)](https://docs.rs/pacmog)  \n![Tests](https://github.com/AkiyukiOkayasu/pacmog/actions/workflows/ci.yml/badge.svg)  \n\npacmog is a decoding library for the PCM file.  \nDesigned for use in playing the PCM file embedded in microcontroller firmware.  \nRust has an include_bytes! macro to embed the byte sequence in the program. Using it, PCM files can be embedded in firmware and used for playback.  \npacmog works with no_std by default.  \n\n| Format          | Status |\n| :---            | :---: |\n| WAV 16bit       | ✅ |\n| WAV 24bit       | ✅ |\n| WAV 32bit       | ✅ |\n| WAV 32bit float | ✅ |\n| WAV 64bit float | ✅ |\n| IMA ADPCM | ✅ |\n| AIFF 16bit | ✅ |\n| AIFF 24bit | ✅ |\n| AIFF 32bit | ✅ |\n| AIFF 32bit float | ✅ |\n| AIFF 64bit float | ✅ |\n\n## Example\n\n```bash\ncargo run --example beep\n```\n\nRead a sample WAV file.\n\n```Rust\nuse pacmog::PcmReader;\n\nlet wav = include_bytes!(\"../tests/resources/Sine440Hz_1ch_48000Hz_16.wav\");                        \nlet reader = PcmReader::new(wav);\nlet specs = reader.get_pcm_specs();\nlet num_samples = specs.num_samples;\nlet num_channels = specs.num_channels as u32;\n\nprintln!(\"PCM info: {:?}\", specs);\n\nfor sample in 0..num_samples {\n    for channel in 0..num_channels {\n        let sample_value = reader.read_sample(channel, sample).unwrap();\n        println!(\"{}\", sample_value);\n    }\n}\n```\n\n## Test\n\n```bash\ncargo test\n```\n\n## Benchmark\n\n```bash\ncargo criterion\n```\n\n## no_std\n\npacmog works with no_std by default.  \nNo setup is needed.  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakiyukiokayasu%2Fpacmog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fakiyukiokayasu%2Fpacmog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakiyukiokayasu%2Fpacmog/lists"}