<html>
<head>
</head>
<body>
<br>
<br>
<br>
<br>
 Christian Klippel wrote:<br>
<blockquote type="cite" cite="mid:200302231955.35385.ck@mamalala.de">
  <pre wrap="">hi,<br><br>Am Sonntag, 23. Februar 2003 19:36 schrieb Yves Degoyon:<br></pre>
  <blockquote type="cite">
    <pre wrap="">btw, haven't you noticed that the sound<br>is played at a weird speed ( faster that regular<br>but not resampled ?? ), i still wonder where<br>this might come from.... mm .... work ahead.<br></pre>
    </blockquote>
    <pre wrap=""><!----><br>mostly this is because the soundcard has _not_ exactly the samplerate you <br>request it to have. for example, if you want 44.100 hz, you can get 44.116 hz <br>instead. this is because most soundcards have an independant oscillator.<br>it is even possible for two soundcards of the same brand &amp; type to have <br>different samplerates.<br><br>that is, btw, the reason why you cant simply get multichannel sound by using <br>multiple soundcards .....</pre>
    </blockquote>
 mm, i was not thinking of a soundcard problem,<br>
 since other way of playing sound files are ok,<br>
 palying at the right speed. <br>
 it's only the pdp_live~ object which produces <br>
 this effect.<br>
    <blockquote type="cite" cite="mid:200302231955.35385.ck@mamalala.de">
      <pre wrap=""><br><br>another reason might be due to the framerate of the video. samples per second <br>divided by frames per second must give a non-fractional result. otherwise you <br>would have a different number of samples each frame. most of the time this <br>doesnt bother, but some weird ntsc timing (with that 29.xxx fps) can cause <br>that too.</pre>
      </blockquote>
      <blockquote type="cite" cite="mid:200302231955.35385.ck@mamalala.de">
        <pre wrap=""><br><br>best (and most used) solution is to split one _video_frame_ of audio into <br>several chunks (for example. pd's dsp size) and play them either seamlessy, <br>overlapping or by repeating the last &amp; first sample to fit the needed time <br>(some kind of very cheap granular synthesis)  for one frame in corrospondance <br>with the soundcards samplerate.<br><br>with no corrections to audio playback you will _always_ get out of sync to the <br>picture soon.<br></pre>
        </blockquote>
        <br>
 yes, i do agree on these remarks, but as the decoded audio frames<br>
 are decoded into a buffer before being played, and not played at once,<br>
 this means the audio data __within__ the buffer is already at the wong speed 
?? <br>
 how could i debug that is the real question right now....<br>
        <br>
 thanks for your hints anyway,<br>
        <br>
 cheers,<br>
        <br>
 sevy/yves<br>
        <br>
        <br>
        </body>
        </html>