<blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">> For my small multimedia audio project i wanna use mplayer as external<br /> > decoder.<br /> > As usually via pipe , for example so<br /> > mplayer  -af resample=44100:0:1,channels=2,format=s16le  -ao<br /> > pcm:nowaveheader:file=/dev/stdout -quiet -really-quiet  'saund_file.ext'  |<br /> > nextprog -options ...<br /> <br /> you're just resampling and reformatting?<br /> <br /> > Is here another decoder progs/libs with easy-to-use C API ?<br /> <br /> sndfile-resample and sndfile-convert can both be given "-" as the name<br /> of their output or input. they are much simpler programs that mplayer<br /> and will also likely do a better job.<br /> <br /> --p</blockquote><br /><br /><span class="quoted">af resample=44100:0:1,channels=2,format=s16le </span><br />is not so imoprtant, because most  files already are 44k stereo S16LE<br />If some sound files are not 44k stereo S16LE, they are just forced -to-be- 44k stereo S16LE .<br /><br />Impotrant is gotta decoded RAW data (and only RAW data) to STDOUT,<br />and not any messages mixed with RAW data !<br />NEVER !<br /> <span class="quoted">mplayer  - -ao</span><span class="quoted"> pcm:nowaveheader:file=/dev/stdout -quiet -really-quiet  'saund_file.ext'  |</span> <span class="quoted"> nextprog -options ...</span><br /><br /> <div id="sig_lower">Problem is that ,for example mpg123 any messages put to stderr, so that with option -s we gotta pure RAW to stout,<br />but mplayer put all messages to stout<br /> <br /> A.K.<br /> <br /> ----</div>