Fix spellings in sound

This commit is contained in:
Gwilym Kuiper 2022-11-17 21:14:38 +00:00
parent da0ea524d9
commit dce5f40c26
3 changed files with 6 additions and 6 deletions

View file

@ -22,8 +22,8 @@ const DMA2_SOURCE_ADDR: MemoryMapped<u32> = unsafe { MemoryMapped::new(dma_sourc
const DMA2_DEST_ADDR: MemoryMapped<u32> = unsafe { MemoryMapped::new(dma_dest_addr(2)) };
const DMA2_CONTROL: MemoryMapped<u16> = unsafe { MemoryMapped::new(dma_control_addr(2)) };
const FIFOA_DEST_ADDR: u32 = 0x0400_00a0;
const FIFOB_DEST_ADDR: u32 = 0x0400_00a4;
const FIFO_A_DEST_ADDR: u32 = 0x0400_00a0;
const FIFO_B_DEST_ADDR: u32 = 0x0400_00a4;
const SOUND_CONTROL: MemoryMapped<u16> = unsafe { MemoryMapped::new(0x0400_0082) };
const SOUND_CONTROL_X: MemoryMapped<u16> = unsafe { MemoryMapped::new(0x0400_0084) };
@ -56,14 +56,14 @@ pub(super) fn enable_dma_for_sound(sound_memory: &[i8], lr: LeftOrRight) {
fn enable_dma1_for_sound(sound_memory: &[i8]) {
DMA1_CONTROL.set(0);
DMA1_SOURCE_ADDR.set(sound_memory.as_ptr() as u32);
DMA1_DEST_ADDR.set(FIFOA_DEST_ADDR);
DMA1_DEST_ADDR.set(FIFO_A_DEST_ADDR);
DMA1_CONTROL.set(DMA_CONTROL_SETTING_FOR_SOUND);
}
fn enable_dma2_for_sound(sound_memory: &[i8]) {
DMA2_CONTROL.set(0);
DMA2_SOURCE_ADDR.set(sound_memory.as_ptr() as u32);
DMA2_DEST_ADDR.set(FIFOB_DEST_ADDR);
DMA2_DEST_ADDR.set(FIFO_B_DEST_ADDR);
DMA2_CONTROL.set(DMA_CONTROL_SETTING_FOR_SOUND);
}

View file

@ -306,7 +306,7 @@ impl SoundChannel {
/// Creates a new high priority [`SoundChannel`].
///
/// A high priority sound channel will override low priority ones if
/// the mixer runs out of channels. They will also never be overriden
/// the mixer runs out of channels. They will also never be overridden
/// by other high priority channels.
///
/// High priority channels are intended for background music and for

View file

@ -6,7 +6,7 @@
//! which allows for Game Boy and Game Boy Color style sound effects, or the mixer
//! which allows for more advanced sounds.
//!
//! The [`dmg`](crate::sound::dmg) module is very rudimentry and doesn't support most of the possible
//! The [`dmg`](crate::sound::dmg) module is very rudimentary and doesn't support most of the possible
//! sounds possible. However, it may be expanded in the future.
//!
//! The [`mixer`](crate::sound::mixer) module is high performance, and allows for playing wav files at