Its not 16 bit alaw, i have to swap every 2 bytes, so i tell the audioconvert to get a sample of 16bits and swap it from 4321 to 1234. so the bytes (alaw samples) will be on the right position. I know its kinda odd, but my alaw file has the samples on the wrong order, so the bytes must be swaped, something like swap byte[0] with byte[1], byte[2] with byte[3]...and so goes on. I know i can make a element to do this, but i was trying to already use what is already done to acomplish the swaping.<br>
<br>Its not a endianess problem, its the alaw samples that are on the wrong order, i just use the audioconvert endianess to try to swap the samples for me.<br><br><div class="gmail_quote">On Mon, Jul 13, 2009 at 2:30 PM, Michael Smith <span dir="ltr">&lt;<a href="mailto:msmith@xiph.org">msmith@xiph.org</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">On Mon, Jul 13, 2009 at 8:54 AM, Tiago Katcipis&lt;<a href="mailto:katcipis@inf.ufsc.br">katcipis@inf.ufsc.br</a>&gt; wrote:<br>

&gt; I have a file that is alaw encoded, but the file has the bytes swaped, every<br>
&gt; two bytes must be swaped so the alaw decoder can decode properly. I started<br>
&gt; to try to build a pipe but i got stuck.<br>
&gt;<br>
&gt; The pipe:<br>
&gt;<br>
&gt; gst-launch -v filesrc location=alaw_inv.dat ! audio/x-raw-int,<br>
&gt; endianness=4321, channels=1, rate=8000, width=16, depth=16, signed=false !<br>
&gt; audioconvert ! audio/x-raw-int, endianess=1234, channels=1, rate=8000,<br>
&gt; width=16, depth=16, signed=false ! queue ! audio/x-alaw, rate=8000,<br>
&gt; channels=1 ! alawdec ! audioconvert ! wavenc ! filesink<br>
&gt; location=exemplo_convertido.<br>
&gt; wav<br>
<br>
</div>This won&#39;t work, because audioconvert won&#39;t just do byteswapping on<br>
unknown data, which is basically what you want.<br>
<br>
It also won&#39;t work because you seem to have 16 bit a-law? GStreamer&#39;s<br>
alaw decoder doesn&#39;t support that; I&#39;ve never heard of it being used -<br>
are you sure it&#39;s a-law? Regardless, you&#39;ll need a special decoder.<br>
<br>
Once you have written a decoder for this format, you can make that<br>
decoder accept the endianness your data is in, so you don&#39;t need to<br>
byteswap beforehand.<br>
<br>
Mike<br>
<br>
------------------------------------------------------------------------------<br>
Enter the BlackBerry Developer Challenge<br>
This is your chance to win up to $100,000 in prizes! For a limited time,<br>
vendors submitting new applications to BlackBerry App World(TM) will have<br>
the opportunity to enter the BlackBerry Developer Challenge. See full prize<br>
details at: <a href="http://p.sf.net/sfu/Challenge" target="_blank">http://p.sf.net/sfu/Challenge</a><br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.sourceforge.net">gstreamer-devel@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/gstreamer-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/gstreamer-devel</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>&quot;it might be a profitable thing to learn Java, but it has no intellectual value whatsoever&quot; Alexander Stepanov<br>