summaryrefslogtreecommitdiff
path: root/src/sound.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/sound.cpp')
-rw-r--r--src/sound.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/sound.cpp b/src/sound.cpp
index f792dfdff..4c7277852 100644
--- a/src/sound.cpp
+++ b/src/sound.cpp
@@ -218,11 +218,11 @@ static const byte _sound_idx[] = {
void SndCopyToPool()
{
+ SoundEntry *sound = AllocateSound(ORIGINAL_SAMPLE_COUNT);
for (uint i = 0; i < ORIGINAL_SAMPLE_COUNT; i++) {
- SoundEntry *sound = AllocateSound();
- *sound = _original_sounds[_sound_idx[i]];
- sound->volume = _sound_base_vol[i];
- sound->priority = 0;
+ sound[i] = _original_sounds[_sound_idx[i]];
+ sound[i].volume = _sound_base_vol[i];
+ sound[i].priority = 0;
}
}