fn from_field(field: u8) -> Mixer {

        let mut mixer = Mixer { sounds: [false; 4] };

        for i in 0..4 {
            mixer.sounds[i] = (field & (1 << i)) != 0;
        }

        mixer
    }
/// Build a mixer from the NR51 4bit field
Build a mixer from the NR51 4bit field
Build a mixer from the NR51 4bit field
fn from_field(field: u8) -> Mixer {
        let mut mixer = Mixer { sounds: [false; 4] };
        for i in 0..4 {
            mixer.sounds[i] = (field & (1 << i)) != 0;
        }
        mixer
    }
fn from_field ( field : u8 ) -> Mixer { let mut mixer = Mixer { sounds : [ false ; 4 ] } ; for i in 0 .. 4 { mixer . sounds [ i ] = ( field & ( 1 << i ) ) != 0 ; } mixer }
Build a mixer from the NR51 4bit field
Build a mixer from the NR51 4bit field
field
u8
field
u8