Lines Matching +full:high +full:- +full:quality
2 * libmad - MPEG audio decoder library
3 * Copyright (C) 2000-2004 Underbit Technologies, Inc.
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
30 * This is perhaps the simplest example use of the MAD high-level API.
31 * Standard input is mapped into memory via mmap(), then the high-level API
33 * callback converts MAD's high-resolution PCM samples to 16 bits, then
34 * writes them to standard output in little-endian, stereo-interleaved
48 if (fstat(STDIN_FILENO, &stat) == -1 || in main()
58 if (munmap(fdm, stat.st_size) == -1) in main()
89 if (!buffer->length) in input()
92 mad_stream_buffer(stream, buffer->start, buffer->length); in input()
94 buffer->length = 0; in input()
101 * scaling of MAD's high-resolution samples down to 16 bits. It does not
103 * obtain any exceptional audio quality. It is therefore not recommended to
104 * use this routine if high-quality output is desired.
111 sample += (1L << (MAD_F_FRACBITS - 16)); in scale()
115 sample = MAD_F_ONE - 1; in scale()
116 else if (sample < -MAD_F_ONE) in scale()
117 sample = -MAD_F_ONE; in scale()
120 return sample >> (MAD_F_FRACBITS + 1 - 16); in scale()
137 /* pcm->samplerate contains the sampling frequency */ in output()
139 nchannels = pcm->channels; in output()
140 nsamples = pcm->length; in output()
141 left_ch = pcm->samples[0]; in output()
142 right_ch = pcm->samples[1]; in output()
144 while (nsamples--) { in output()
147 /* output sample(s) in 16-bit signed little-endian PCM */ in output()
165 * error occurs. The error is indicated by stream->error; the list of
178 stream->error, mad_stream_errorstr(stream), in error()
179 stream->this_frame - buffer->start); in error()