test/run_convert: allow the out format to be a mask
This commit is contained in:
parent
396e97fc94
commit
777e1cabc5
@ -76,13 +76,17 @@ int main(int argc, char **argv)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!audio_format_parse(&out_audio_format, argv[2],
|
struct audio_format out_audio_format_mask;
|
||||||
false, &error)) {
|
if (!audio_format_parse(&out_audio_format_mask, argv[2],
|
||||||
|
true, &error)) {
|
||||||
g_printerr("Failed to parse audio format: %s\n",
|
g_printerr("Failed to parse audio format: %s\n",
|
||||||
error->message);
|
error->message);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
out_audio_format = in_audio_format;
|
||||||
|
audio_format_mask_apply(&out_audio_format, &out_audio_format_mask);
|
||||||
|
|
||||||
const size_t in_frame_size = audio_format_frame_size(&in_audio_format);
|
const size_t in_frame_size = audio_format_frame_size(&in_audio_format);
|
||||||
|
|
||||||
pcm_convert_init(&state);
|
pcm_convert_init(&state);
|
||||||
|
Loading…
Reference in New Issue
Block a user