# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2024"
name = "game-audio"
version = "0.5.1"
authors = ["p <p@p11c.xyz>"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Procedural game audio: generate tones, noise, and pattern-based music without audio files"
readme = "README.md"
license = "MIT OR Apache-2.0"
repository = "https://gitlab.com/porky11/game-audio"

[features]
export = [
    "hound",
    "mp3lame-encoder",
]

[lib]
name = "game_audio"
path = "src/lib.rs"

[[bin]]
name = "track-export"
path = "src/bin/track-export.rs"
required-features = ["export"]

[dependencies.hound]
version = "3.5"
optional = true

[dependencies.mp3lame-encoder]
version = "0.2.2"
optional = true

[dependencies.rodio]
version = "0.22"
default-features = false

[dependencies.thiserror]
version = "2.0"

[target.'cfg(not(target_arch = "wasm32"))'.dependencies.rodio]
version = "0.22"
features = [
    "playback",
    "flac",
    "mp3",
    "mp4",
    "vorbis",
    "wav",
    "dither",
]
default-features = false

[target.'cfg(target_arch = "wasm32")'.dependencies.wasm-bindgen]
version = "0.2"

[target.'cfg(target_arch = "wasm32")'.dependencies.web-sys]
version = "0.3"
features = [
    "AudioContext",
    "BaseAudioContext",
    "AudioBuffer",
    "AudioBufferSourceNode",
    "AudioScheduledSourceNode",
    "AudioNode",
    "AudioDestinationNode",
    "AudioParam",
    "GainNode",
]
