Lines Matching full:channels
47 fprintf(stderr, "Usage: %s [-e] <application> <sampling rate (Hz)> <channels (1/2)> "
49 fprintf(stderr, " %s -d <sampling rate (Hz)> <channels (1/2)> "
200 static OpusEncoder *ms_opus_encoder_create(opus_int32 Fs, int channels, int application, int *error)
204 return (OpusEncoder *)opus_multistream_surround_encoder_create(Fs, channels, 1, &streams, &coupled_streams, mapping, application, error);
206 static OpusDecoder *ms_opus_decoder_create(opus_int32 Fs, int channels, int *error)
212 coupled_streams = channels==2;
213 return (OpusDecoder *)opus_multistream_decoder_create(Fs, channels, streams, coupled_streams, mapping, error);
226 int frame_size, channels;
323 channels = atoi(argv[args]);
326 if (channels < 1 || channels > 2)
328 fprintf(stderr, "Opus_demo supports only 1 or 2 channels.\n");
511 mode_switch_time = size/sizeof(short)/channels/nb_modes_in_list;
526 enc = opus_encoder_create(sampling_rate, channels, application, &err);
550 dec = opus_decoder_create(sampling_rate, channels, &err);
587 fprintf(stderr, "Decoding with %ld Hz output (%d channels)\n",
588 (long)sampling_rate, channels);
595 in = (short*)malloc(max_frame_size*channels*sizeof(short));
596 out = (short*)malloc(max_frame_size*channels*sizeof(short));
598 fbytes = (unsigned char*)malloc(max_frame_size*channels*sizeof(short));
691 num_read = fread(fbytes, sizeof(short)*channels, frame_size-remaining, fin);
694 for(i=0;i<curr_read*channels;i++)
699 in[i+remaining*channels]=s;
703 for (i=(curr_read+remaining)*channels;i<frame_size*channels;i++)
711 for(i=0;i<remaining*channels;i++)
712 in[i] = in[nb_encoded*channels+i];
805 for(i=0;i<(output_samples-skip)*channels;i++)
808 s=out[i+(skip*channels)];
812 if (fwrite(fbytes, sizeof(short)*channels, output_samples-skip, fout) != (unsigned)(output_samples-skip)){
854 for ( k = 0; k < frame_size * channels; k++ ) {
857 nrg /= frame_size * channels;