Reducing a channel from wav file using libsox
问题 I'm new to libsox programming, and I want to reduce a chennel from a stereo audio which named 'a.wav' then generate a mono audio 'b.wav' with the following code: sox_format_t * in, * out; sox_effects_chain_t * chain; sox_effect_t * e; char * args[10]; sox_init(); in = sox_open_read("E:\\a.wav", NULL, NULL, NULL); out = sox_open_write("E:\\b.wav", &in->signal, NULL, NULL, NULL, NULL); out->signal.channels = 1; chain = sox_create_effects_chain(&in->encoding, &out->encoding); e = sox_create