1
0
Fork 0
mirror of https://github.com/doukutsu-rs/doukutsu-rs synced 2025-01-14 14:56:40 +00:00
doukutsu-rs/Cargo.toml
biroder b748a662bf Add a restart of the audio stream when the device is disconnected
Instead of creating the stream in `SoundManager`, it is now created in another thread called 'audio watchdog'. This thread restarts the stream when the audio device is disconnected. All information about the stream (such as the speed or volume of the music) is stored in `AudioContext` structure, which is inside `SoundManager`.

So even if the watchdog thread is destroyed for some reason, the sound manager will restart it and playback will continue. But this hasn't been tested, so maybe the application will just crash:)
2024-12-04 17:37:49 +02:00

119 lines
4.2 KiB
TOML

[package]
name = "doukutsu-rs"
description = "A re-implementation of Cave Story (Doukutsu Monogatari) engine"
version = "0.101.0"
authors = ["Alula", "dawnDus"]
edition = "2021"
rust-version = "1.65"
[lib]
crate-type = ["lib"]
[[bin]]
name = "doukutsu-rs"
path = "src/main.rs"
test = false
bench = false
required-features = ["exe"]
[profile.release]
lto = "off"
panic = "abort"
codegen-units = 256
incremental = true
split-debuginfo = "packed"
[profile.dev.package."*"]
opt-level = 3
overflow-checks = false
codegen-units = 256
[package.metadata.bundle]
name = "doukutsu-rs"
identifier = "io.github.doukutsu_rs"
version = "0.101.0"
resources = ["data"]
copyright = "Copyright (c) 2020-2023 doukutsu-rs contributors"
category = "Game"
osx_minimum_system_version = "10.12"
[features]
default = ["default-base", "backend-sdl", "render-opengl", "exe", "webbrowser", "discord-rpc"]
default-base = ["ogg-playback"]
ogg-playback = ["lewton"]
backend-sdl = ["sdl2", "sdl2-sys"]
backend-glutin = ["winit", "glutin", "render-opengl"]
backend-horizon = []
render-opengl = []
discord-rpc = ["discord-rich-presence"]
netplay = ["serde_cbor"]
editor = []
exe = []
android = []
[dependencies]
#glutin = { path = "./3rdparty/glutin/glutin", optional = true }
#winit = { path = "./3rdparty/winit", optional = true, default_features = false, features = ["x11"] }
#sdl2 = { path = "./3rdparty/rust-sdl2", optional = true, features = ["unsafe_textures", "bundled", "static-link"] }
#sdl2-sys = { path = "./3rdparty/rust-sdl2/sdl2-sys", optional = true, features = ["bundled", "static-link"] }
#cpal = { path = "./3rdparty/cpal" }
byteorder = "1.4"
case_insensitive_hashmap = "1.0.0"
chrono = { version = "0.4", default-features = false, features = ["clock", "std"] }
cpal = { git = "https://github.com/doukutsu-rs/cpal", rev = "9d269d8724102404e73a61e9def0c0cbc921b676" }
crossbeam-channel = "0.5"
directories = "3"
discord-rich-presence = { version = "0.2", optional = true }
downcast = "0.11"
encoding_rs = "0.8.33"
fern = "0.6.2"
glutin = { git = "https://github.com/doukutsu-rs/glutin.git", rev = "2dd95f042e6e090d36f577cbea125560dd99bd27", optional = true, default_features = false, features = ["x11"] }
imgui = { git = "https://github.com/imgui-rs/imgui-rs.git", rev = "5d771a83b82c5cc3dd58cca3f969d900369262e6" }
image = { version = "0.24", default-features = false, features = ["png", "bmp"] }
itertools = "0.10"
lazy_static = "1.4"
lewton = { version = "0.10", optional = true }
log = "0.4"
num-derive = "0.3"
num-traits = "0.2"
open = "3.2"
paste = "1.0"
pelite = { version = ">=0.9.2", default-features = false, features = ["std"] }
sdl2 = { git = "https://github.com/doukutsu-rs/rust-sdl2.git", rev = "f2f1e29a416bcc22f2faf411866db2c8d9536308", optional = true, features = ["unsafe_textures", "bundled", "static-link"] }
sdl2-sys = { git = "https://github.com/doukutsu-rs/rust-sdl2.git", rev = "f2f1e29a416bcc22f2faf411866db2c8d9536308", optional = true, features = ["bundled", "static-link"] }
rc-box = "1.2.0"
serde = { version = "1", features = ["derive"] }
serde_derive = "1"
serde_cbor = { version = "0.11", optional = true }
serde_json = "1.0"
strum = "0.24"
strum_macros = "0.24"
# remove and replace when extract_if is in stable
vec_mut_scan = "0.4"
webbrowser = { version = "0.8.6", optional = true }
winit = { git = "https://github.com/doukutsu-rs/winit.git", rev = "878f206d19af01b0977277929eee5e32667453c0", optional = true, default_features = false, features = ["x11"] }
xmltree = "0.10"
#hack to not link SDL_image on Windows(causes a linker error)
[target.'cfg(not(target_os = "windows"))'.dependencies]
sdl2 = { git = "https://github.com/doukutsu-rs/rust-sdl2.git", rev = "f2f1e29a416bcc22f2faf411866db2c8d9536308", optional = true, features = ["image", "unsafe_textures", "bundled", "static-link"] }
[target.'cfg(target_os = "windows")'.dependencies]
winapi = { version = "0.3", features = ["winuser"] }
[target.'cfg(target_os = "windows")'.build-dependencies]
winres = "0.1"
[target.'cfg(target_os = "macos")'.dependencies]
objc = "0.2"
[target.'cfg(target_os = "android")'.dependencies]
ndk = "0.7"
ndk-glue = "0.7"
ndk-sys = "0.4"
jni = "0.20"
[target.'cfg(target_os = "horizon")'.dependencies]
#deko3d = { path = "./3rdparty/deko3d" }
deko3d = { git = "https://github.com/doukutsu-rs/deko3d-rs", branch = "master" }