XMV: Minor tweaks

This commit is contained in:
NicknineTheEagle 2019-12-22 22:03:35 +03:00
parent e37e593316
commit 4bb51c57a5

View File

@ -35,6 +35,9 @@ VGMSTREAM *init_vgmstream_xbox_hlwav(STREAMFILE *streamFile) {
default: goto fail;
}
if (channels > 2) /* Source only supports mono and stereo */
goto fail;
loop_flag = (loop_start != -1);
/* build the VGMSTREAM */
@ -73,7 +76,7 @@ fail:
return NULL;
}
/* .360.WAV, .PS3.WAV - from Valve games running on Source Engine, evolution of Xbox .WAV format */
/* .360.WAV, .PS3.WAV - from Valve games running on Source Engine, evolution of Xbox .WAV format seen above */
/* [The Orange Box (X360), Portal 2 (PS3/X360), Counter-Strike: Global Offensive (PS3/X360)] */
VGMSTREAM *init_vgmstream_xmv_valve(STREAMFILE *streamFile) {
VGMSTREAM *vgmstream = NULL;
@ -116,6 +119,9 @@ VGMSTREAM *init_vgmstream_xmv_valve(STREAMFILE *streamFile) {
default: goto fail;
}
if (channels > 2) /* Source only supports mono and stereo */
goto fail;
loop_flag = (loop_start != -1);
/* build the VGMSTREAM */
@ -163,6 +169,9 @@ VGMSTREAM *init_vgmstream_xmv_valve(STREAMFILE *streamFile) {
mpeg_codec_data *mpeg_data;
coding_t mpeg_coding;
if (loop_flag) /* should never happen, Source cannot loop MP3 */
goto fail;
mpeg_data = init_mpeg(streamFile, start_offset, &mpeg_coding, channels);
if (!mpeg_data) goto fail;