mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-25 01:01:34 +11:00
Add defines for freq32768
This commit is contained in:
parent
42d3455abf
commit
c709455e3d
|
@ -96,9 +96,9 @@ impl Mixer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// I've picked one frequency that works nicely. But there are others that work nicely
|
// These work perfectly with swapping the buffers every vblank
|
||||||
// which we may want to consider in the future: http://deku.gbadev.org/program/sound1.html
|
// list here: http://deku.gbadev.org/program/sound1.html
|
||||||
#[cfg(not(feature = "freq18157"))]
|
#[cfg(all(not(feature = "freq18157"), not(feature = "freq32768")))]
|
||||||
mod constants {
|
mod constants {
|
||||||
pub const SOUND_FREQUENCY: i32 = 10512;
|
pub const SOUND_FREQUENCY: i32 = 10512;
|
||||||
pub const SOUND_BUFFER_SIZE: usize = 176;
|
pub const SOUND_BUFFER_SIZE: usize = 176;
|
||||||
|
@ -110,6 +110,12 @@ mod constants {
|
||||||
pub const SOUND_BUFFER_SIZE: usize = 304;
|
pub const SOUND_BUFFER_SIZE: usize = 304;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "freq32768")]
|
||||||
|
mod constants {
|
||||||
|
pub const SOUND_FREQUENCY: i32 = 32768;
|
||||||
|
pub const SOUND_BUFFER_SIZE: usize = 549;
|
||||||
|
}
|
||||||
|
|
||||||
fn set_asm_buffer_size() {
|
fn set_asm_buffer_size() {
|
||||||
extern "C" {
|
extern "C" {
|
||||||
static mut agb_rs__buffer_size: usize;
|
static mut agb_rs__buffer_size: usize;
|
||||||
|
|
Loading…
Reference in a new issue