Hi,<br><br>Thank you for providing valuable information. I will put some code here:<br><br> while ( 1 )<br> {<br> for ( int i = 0; i < frames; i++ )<br> {<br> float t = 0;<br> if ( left ) //for left channel<br>
{<br> t = *((float*)&(fbuffer[pos+i*4])); //4 bytes each frame<br> t*=2;<br> //printf("%f ",t);<br> for ( int j = 0; j < 4; j++ )<br>
buffer[i*8+j] = ((char*)&t)[j]; //8 bytes for 2 channels<br> }<br><br> rc = snd_pcm_writei ( handle, buffer, frames );<br> pos += frames * 4; <br> }<br><br>I think the value is not out of [-1.0,1.0]. BTW, what does it mean when a value is negative?<br>
<br><br>Best,<br>Dripstone<br><br><div class="gmail_quote">2009/10/26 Jörn Nettingsmeier <span dir="ltr"><<a href="mailto:nettings@folkwang-hochschule.de">nettings@folkwang-hochschule.de</a>></span><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 10/26/2009 11:38 AM, Victor Lazzarini wrote:<br>
> Well if the audio was clipped, there would probably be some audible<br>
> distortion.<br>
> Perhaps if a code fragment was posted we could give a more informed<br>
> opinion.<br>
<br>
</div>i was thinking of operating on files, where clamping can be done with<br>
perfect fidelity. but i may have misunderstood the OP.<br>
<div><div></div><div class="h5"><br>
_______________________________________________<br>
Linux-audio-dev mailing list<br>
<a href="mailto:Linux-audio-dev@lists.linuxaudio.org">Linux-audio-dev@lists.linuxaudio.org</a><br>
<a href="http://lists.linuxaudio.org/mailman/listinfo/linux-audio-dev" target="_blank">http://lists.linuxaudio.org/mailman/listinfo/linux-audio-dev</a><br>
</div></div></blockquote></div><br>