mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-23 16:21:33 +11:00
Add new frequency option
This commit is contained in:
parent
0a9a3fdf1d
commit
73d6dc448f
|
@ -19,6 +19,7 @@ proc-macro = true
|
|||
|
||||
[features]
|
||||
freq18157 = []
|
||||
freq32768 = []
|
||||
|
||||
[dependencies]
|
||||
hound = "3.4"
|
||||
|
|
|
@ -12,10 +12,14 @@ use std::{
|
|||
};
|
||||
use syn::parse_macro_input;
|
||||
|
||||
#[cfg(not(feature = "freq18157"))]
|
||||
#[cfg(all(not(feature = "freq18157"), not(feature = "freq32768")))]
|
||||
const FREQUENCY: u32 = 10512;
|
||||
#[cfg(feature = "freq18157")]
|
||||
const FREQUENCY: u32 = 18157;
|
||||
#[cfg(feature = "freq32768")]
|
||||
const FREQUENCY: u32 = 32768;
|
||||
#[cfg(all(feature = "freq18157", feature = "freq32768"))]
|
||||
compile_error!("Must have at most one of freq18157 or freq32768 features enabled");
|
||||
|
||||
#[proc_macro]
|
||||
pub fn include_wav(input: TokenStream) -> TokenStream {
|
||||
|
|
|
@ -17,6 +17,7 @@ debug = true
|
|||
[features]
|
||||
default = []
|
||||
freq18157 = ["agb_sound_converter/freq18157"]
|
||||
freq32768 = ["agb_sound_converter/freq32768"]
|
||||
|
||||
[dependencies]
|
||||
bitflags = "1"
|
||||
|
|
Loading…
Reference in a new issue