mirror of
https://github.com/vgmstream/vgmstream.git
synced 2025-01-29 19:37:30 +01:00
Clean RIFF/XNB PCM8 usage
This commit is contained in:
parent
0a9b07fe19
commit
4fac5e7d3e
@ -149,7 +149,7 @@ static int read_fmt(int big_endian, STREAMFILE * streamFile, off_t current_chunk
|
||||
fmt->interleave = 0x02;
|
||||
break;
|
||||
case 8:
|
||||
fmt->coding_type = coding_PCM8_U_int;
|
||||
fmt->coding_type = coding_PCM8_U;
|
||||
fmt->interleave = 0x01;
|
||||
break;
|
||||
default:
|
||||
@ -556,7 +556,7 @@ VGMSTREAM * init_vgmstream_riff(STREAMFILE *streamFile) {
|
||||
vgmstream->num_samples = pcm_bytes_to_samples(data_size, fmt.channel_count, 16);
|
||||
break;
|
||||
|
||||
case coding_PCM8_U_int:
|
||||
case coding_PCM8_U:
|
||||
vgmstream->num_samples = pcm_bytes_to_samples(data_size, vgmstream->channels, 8);
|
||||
break;
|
||||
|
||||
@ -899,7 +899,7 @@ VGMSTREAM * init_vgmstream_rifx(STREAMFILE *streamFile) {
|
||||
case coding_PCM16BE:
|
||||
vgmstream->num_samples = pcm_bytes_to_samples(data_size, vgmstream->channels, 16);
|
||||
break;
|
||||
case coding_PCM8_U_int:
|
||||
case coding_PCM8_U:
|
||||
vgmstream->num_samples = pcm_bytes_to_samples(data_size, vgmstream->channels, 8);
|
||||
break;
|
||||
default:
|
||||
|
@ -112,7 +112,7 @@ VGMSTREAM * init_vgmstream_xnb(STREAMFILE *streamFile) {
|
||||
if (!block_align)
|
||||
block_align = (bps == 8 ? 0x01 : 0x02) * channel_count;
|
||||
|
||||
vgmstream->coding_type = bps == 8 ? coding_PCM8_U_int : coding_PCM16LE;
|
||||
vgmstream->coding_type = bps == 8 ? coding_PCM8_U : coding_PCM16LE;
|
||||
vgmstream->layout_type = layout_interleave;
|
||||
vgmstream->interleave_block_size = block_align / channel_count;
|
||||
vgmstream->num_samples = pcm_bytes_to_samples(data_size, channel_count, bps);
|
||||
|
Loading…
x
Reference in New Issue
Block a user