Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions crates/kira/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ features = ["wasm-bindgen"]
[target.'cfg(target_arch = "wasm32")'.dependencies]
send_wrapper = "0.6.0"

[target.'cfg(not(target_has_atomic = "64"))'.dependencies]
portable-atomic = "1"

[features]
default = ["cpal", "mp3", "ogg", "flac", "wav"]
mp3 = ["symphonia", "symphonia/mp3"]
Expand Down
7 changes: 6 additions & 1 deletion crates/kira/src/backend/cpal/desktop/stream_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,16 @@ mod send_on_drop;
use std::{
sync::{
Arc, Mutex,
atomic::{AtomicBool, AtomicU64, Ordering},
atomic::{AtomicBool, Ordering},
},
time::Duration,
};

#[cfg(target_has_atomic = "64")]
use std::sync::atomic::AtomicU64;
#[cfg(not(target_has_atomic = "64"))]
use portable_atomic::AtomicU64;

use super::renderer_with_cpu_usage::RendererWithCpuUsage;
use cpal::{
BufferSize, Device, Stream, StreamConfig, StreamError,
Expand Down
7 changes: 6 additions & 1 deletion crates/kira/src/clock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,14 @@ pub use time::*;

use std::sync::{
Arc,
atomic::{AtomicBool, AtomicU64, Ordering},
atomic::{AtomicBool, Ordering},
};

#[cfg(target_has_atomic = "64")]
use std::sync::atomic::AtomicU64;
#[cfg(not(target_has_atomic = "64"))]
use portable_atomic::AtomicU64;

use crate::{
Parameter, Value,
command::{ValueChangeCommand, read_commands_into_parameters},
Expand Down
7 changes: 6 additions & 1 deletion crates/kira/src/sound/static_sound/sound.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,14 @@ mod test;

use std::sync::{
Arc,
atomic::{AtomicU8, AtomicU64, Ordering},
atomic::{AtomicU8, Ordering},
};

#[cfg(target_has_atomic = "64")]
use std::sync::atomic::AtomicU64;
#[cfg(not(target_has_atomic = "64"))]
use portable_atomic::AtomicU64;

use crate::{
Decibels, Panning, Parameter, PlaybackRate, StartTime, Tween,
command::read_commands_into_parameters,
Expand Down
7 changes: 6 additions & 1 deletion crates/kira/src/sound/streaming/sound.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,14 @@ mod test;

use std::sync::{
Arc,
atomic::{AtomicBool, AtomicU8, AtomicU64, Ordering},
atomic::{AtomicBool, AtomicU8, Ordering},
};

#[cfg(target_has_atomic = "64")]
use std::sync::atomic::AtomicU64;
#[cfg(not(target_has_atomic = "64"))]
use portable_atomic::AtomicU64;

use crate::{
Decibels, Panning, Parameter, PlaybackRate, StartTime, Tween,
command::read_commands_into_parameters,
Expand Down