Lines Matching defs:channels
586 static FLAC__bool generate_raw(const char *filename, unsigned channels, unsigned bytes_per_sample, unsigned samples)
600 for(j = 0; j < channels; j++) {
615 static FLAC__bool generate_aiff(const char *filename, unsigned sample_rate, unsigned channels, unsigned bps, unsigned samples)
618 const unsigned true_size = channels * bytes_per_sample * samples;
637 if(!write_big_endian_uint16(f, (FLAC__uint16)channels))
653 for(j = 0; j < channels; j++) {
671 static FLAC__bool generate_wav(const char *filename, unsigned sample_rate, unsigned channels, unsigned bps, unsigned samples, FLAC__bool strict)
673 const FLAC__bool waveformatextensible = strict && (channels > 2 || (bps%8));
679 const unsigned true_size = channels * bytes_per_sample * samples;
702 if(!write_little_endian_uint16(f, (FLAC__uint16)channels))
706 if(!write_little_endian_uint32(f, sample_rate * channels * bytes_per_sample))
708 if(!write_little_endian_uint16(f, (FLAC__uint16)(channels * bytes_per_sample))) /* block align */
729 for(j = 0; j < channels; j++) {
787 unsigned channels;
901 for(channels = 1; channels <= 8; channels++) {
909 sprintf(fn, "rt-%u-%u-%u.aiff", channels, bits_per_sample, nsamples[samples]);
910 if(!generate_aiff(fn, 44100, channels, bits_per_sample, nsamples[samples]))
913 sprintf(fn, "rt-%u-%u-%u.wav", channels, bits_per_sample, nsamples[samples]);
914 if(!generate_wav(fn, 44100, channels, bits_per_sample, nsamples[samples], /*strict=*/true))
918 sprintf(fn, "rt-%u-%u-%u.raw", channels, bits_per_sample, nsamples[samples]);
919 if(!generate_raw(fn, channels, bits_per_sample/8, nsamples[samples]))