0 Replies Latest reply on Jun 8, 2009 5:13 AM by cambiata_jonas

    Manipulate video sound via PB?

    cambiata_jonas

      Hi!

       

      Is it possible to manipulate video sound via PB?

       

      I'm looking for a way to keep mp3 and video playback in sync, mainly for being able to live-mix 2 or more sound channels along with the video.

      Would it be possible to feed the video audio output from external audio channels via PB? (Something liket the same way that two or more mp3 channels can be feeding a sound object buffer, check code below..)

       

      Regards / Jonas

       

      <languageVersion : 1.0;>

       

      kernel sound
      <   namespace : "Jonas Nyström";
          vendor : "Cambiata";
          version : 1;
          description : "2 channel audio mixing kernel";
      >
      {
          input image4 src0;
          input image4 src1;
         
          output float4 dst;
         
          parameter float level0
          <      
              minValue:float(0);
              maxValue:float(1.0);
              defaultValue:float(1.0);
          >; 

       

         parameter float level1
          <      
              minValue:float(0);
              maxValue:float(1.0);
              defaultValue:float(1.0);
          >;

       

          void
          evaluatePixel()
          {
              float4 s0 = sampleNearest(src0, outCoord()) * level0;
              float4 s1 = sampleNearest(src1, outCoord()) * level1;
                     
              dst = s0 + s1;
             
          }
      }