Skip to content

Commit a0951b1

Browse files
authored
Fix -skipsec not initializing snd_samplerate for viddumps (#738)
1 parent 401a8a5 commit a0951b1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

prboom2/src/SDL/i_sound.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ static snd_data_t *GetSndData(int sfxid, const unsigned char *data, size_t len)
246246
if (ConvertAudioFormat(&sampledata, &sample, &samplelen) == NULL)
247247
{
248248
Z_Free(sampledata);
249-
return NULL;
249+
return NULL;
250250
}
251251
}
252252

@@ -872,6 +872,8 @@ void I_InitSound(void)
872872
int audio_channels;
873873
int audio_buffers;
874874

875+
I_InitSoundParams();
876+
875877
if (sound_was_initialized || (nomusicparm && nosfxparm))
876878
return;
877879

@@ -886,8 +888,6 @@ void I_InitSound(void)
886888
// Secure and configure sound device first.
887889
lprintf(LO_DEBUG, "I_InitSound: ");
888890

889-
I_InitSoundParams();
890-
891891
audio_rate = snd_samplerate;
892892
audio_channels = 2;
893893
audio_buffers = getSliceSize();

0 commit comments

Comments
 (0)