Crates.io | kira-loaders |
lib.rs | kira-loaders |
version | 0.1.0-beta.3 |
source | src |
created_at | 2021-12-05 00:38:23.324572 |
updated_at | 2022-01-17 18:52:33.060729 |
description | Audio file loading and streaming for Kira |
homepage | |
repository | https://github.com/tesselode/kira |
max_upload_size | |
id | 492445 |
size | 56,405 |
kira-loaders
kira-loaders
provides support for loading and streaming sounds from audio
files in Kira.
use kira::{
manager::{backend::MockBackend, AudioManager, AudioManagerSettings},
sound::static_sound::StaticSoundSettings,
};
const SAMPLE_RATE: u32 = 48_000;
let mut manager = AudioManager::new(
MockBackend::new(SAMPLE_RATE),
AudioManagerSettings::default(),
)
.unwrap();
manager.play(kira_loaders::load(
"sound.ogg",
StaticSoundSettings::default(),
)?)?;
use kira::manager::{backend::MockBackend, AudioManager, AudioManagerSettings};
use kira_loaders::StreamingSoundSettings;
const SAMPLE_RATE: u32 = 48_000;
let mut manager = AudioManager::new(
MockBackend::new(SAMPLE_RATE),
AudioManagerSettings::default(),
)
.unwrap();
manager.play(kira_loaders::stream(
"sound.ogg",
StreamingSoundSettings::default(),
)?)?;
This project is licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in kira-loaders
by you, as defined in the Apache-2.0 license,
shall be dual licensed as above, without any additional terms or conditions.