mirror of
https://github.com/vgmstream/vgmstream.git
synced 2024-11-24 15:00:11 +01:00
Tweak some logs
This commit is contained in:
parent
fef854ea87
commit
dd847f3041
@ -23,9 +23,10 @@ void render_vgmstream_flat(sample_t * buffer, int32_t sample_count, VGMSTREAM *
|
||||
samples_to_do = vgmstream_samples_to_do(samples_this_block, samples_per_frame, vgmstream);
|
||||
if (samples_to_do > sample_count - samples_written)
|
||||
samples_to_do = sample_count - samples_written;
|
||||
|
||||
|
||||
if (samples_to_do == 0) {
|
||||
VGM_LOG("layout_flat: wrong samples_to_do found\n");
|
||||
VGM_LOG("layout_flat: wrong samples_to_do 0 found\n"); /* could happen when calling render at EOF? */
|
||||
//VGM_LOG("layout_flat: tb=%i sib=%i, spf=%i\n", samples_this_block, vgmstream->samples_into_block, samples_per_frame);
|
||||
memset(buffer + samples_written*vgmstream->channels, 0, (sample_count - samples_written) * vgmstream->channels * sizeof(sample_t));
|
||||
break;
|
||||
}
|
||||
|
@ -87,11 +87,15 @@ int setup_layout_layered(layered_layout_data* data) {
|
||||
for (i = 0; i < data->layer_count; i++) {
|
||||
int layer_input_channels, layer_output_channels;
|
||||
|
||||
if (!data->layers[i])
|
||||
if (data->layers[i] == NULL) {
|
||||
VGM_LOG("layered: no vgmstream in %i\n", i);
|
||||
goto fail;
|
||||
}
|
||||
|
||||
if (data->layers[i]->num_samples <= 0)
|
||||
if (data->layers[i]->num_samples <= 0) {
|
||||
VGM_LOG("layered: no samples in %i\n", i);
|
||||
goto fail;
|
||||
}
|
||||
|
||||
/* different layers may have different input/output channels */
|
||||
mixing_info(data->layers[i], &layer_input_channels, &layer_output_channels);
|
||||
@ -103,12 +107,12 @@ int setup_layout_layered(layered_layout_data* data) {
|
||||
if (i > 0) {
|
||||
/* a bit weird, but no matter */
|
||||
if (data->layers[i]->sample_rate != data->layers[i-1]->sample_rate) {
|
||||
VGM_LOG("layered layout: layer %i has different sample rate\n", i);
|
||||
VGM_LOG("layered: layer %i has different sample rate\n", i);
|
||||
}
|
||||
|
||||
/* also weird */
|
||||
if (data->layers[i]->coding_type != data->layers[i-1]->coding_type) {
|
||||
VGM_LOG("layered layout: layer %i has different coding type\n", i);
|
||||
VGM_LOG("layered: layer %i has different coding type\n", i);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -135,15 +135,21 @@ int setup_layout_segmented(segmented_layout_data* data) {
|
||||
for (i = 0; i < data->segment_count; i++) {
|
||||
int segment_input_channels, segment_output_channels;
|
||||
|
||||
if (!data->segments[i])
|
||||
if (data->segments[i] == NULL) {
|
||||
VGM_LOG("segmented: no vgmstream in segment %i\n", i);
|
||||
goto fail;
|
||||
}
|
||||
|
||||
if (data->segments[i]->num_samples <= 0)
|
||||
|
||||
if (data->segments[i]->num_samples <= 0) {
|
||||
VGM_LOG("segmented: no samples in segment %i\n", i);
|
||||
goto fail;
|
||||
}
|
||||
|
||||
|
||||
/* disable so that looping is controlled by render_vgmstream_segmented */
|
||||
if (data->segments[i]->loop_flag != 0) {
|
||||
VGM_LOG("segmented layout: segment %i is looped\n", i);
|
||||
VGM_LOG("segmented: segment %i is looped\n", i);
|
||||
data->segments[i]->loop_flag = 0;
|
||||
}
|
||||
|
||||
@ -159,12 +165,14 @@ int setup_layout_segmented(segmented_layout_data* data) {
|
||||
int prev_output_channels;
|
||||
|
||||
mixing_info(data->segments[i-1], NULL, &prev_output_channels);
|
||||
if (segment_output_channels != prev_output_channels)
|
||||
if (segment_output_channels != prev_output_channels) {
|
||||
VGM_LOG("segmented: segment %i has wrong channels %i vs prev channels %i\n", i, segment_output_channels, prev_output_channels);
|
||||
goto fail;
|
||||
}
|
||||
|
||||
/* a bit weird, but no matter */
|
||||
if (data->segments[i]->sample_rate != data->segments[i-1]->sample_rate) {
|
||||
VGM_LOG("segmented layout: segment %i has different sample rate\n", i);
|
||||
VGM_LOG("segmented: segment %i has different sample rate\n", i);
|
||||
}
|
||||
|
||||
/* perfectly acceptable */
|
||||
|
@ -299,7 +299,8 @@ static int parse_awc_header(STREAMFILE* streamFile, awc_header* awc) {
|
||||
if ((awc->num_samples && !(awc->num_samples >= num_samples - 10 && awc->num_samples <= num_samples + 10)) ||
|
||||
(awc->sample_rate && awc->sample_rate != sample_rate) ||
|
||||
(awc->codec && awc->codec != codec)) {
|
||||
VGM_LOG("AWC: found header diffs between channels\n");
|
||||
VGM_LOG("AWC: found header diffs in channel %i, ns=%i vs %i, sr=%i vs %i, c=%i vs %i\n",
|
||||
ch, awc->num_samples, num_samples, awc->sample_rate, sample_rate, awc->codec, codec);
|
||||
goto fail;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user