mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-23 08:11:33 +11:00
Extract iterator to a variable
This commit is contained in:
parent
38868cb269
commit
3b35061a3a
|
@ -422,8 +422,7 @@ impl MixerBuffer {
|
|||
) {
|
||||
working_buffer.fill(0.into());
|
||||
|
||||
for (channel, playback_speed) in
|
||||
channels
|
||||
let channels = channels
|
||||
.filter(|channel| !channel.is_done)
|
||||
.filter_map(|channel| {
|
||||
let playback_speed = if channel.is_stereo {
|
||||
|
@ -445,8 +444,9 @@ impl MixerBuffer {
|
|||
}
|
||||
|
||||
Some((channel, playback_speed))
|
||||
})
|
||||
{
|
||||
});
|
||||
|
||||
for (channel, playback_speed) in channels {
|
||||
if channel.volume != 0.into() {
|
||||
if channel.is_stereo {
|
||||
unsafe {
|
||||
|
|
Loading…
Reference in a new issue