Examples of encodeAudio()


Examples of com.xuggle.mediatool.IMediaWriter.encodeAudio()

      }

      // compute and encode the audio for the balls

      short[] samples = balls.getAudioFrame(sampleRate);
      writer.encodeAudio(audioStreamIndex, samples, clock,
        DEFAULT_TIME_UNIT);
      totalSampleCount += sampleCount;
    }

    // manually close the writer
View Full Code Here

Examples of com.xuggle.mediatool.MediaWriter.encodeAudio()

    generator.prepare(channelCount, sampleRate);

    // write some data, so that the media header will be written

    generator.fillNextSamples(samples, sampleCount);
    writer.encodeAudio(audioStreamIndex, samples);

    // now write some data on a different index

    generator.fillNextSamples(samples, sampleCount);
    writer.encodeAudio(audioStreamIndex+1, samples);
View Full Code Here

Examples of com.xuggle.mediatool.MediaWriter.encodeAudio()

    writer.encodeAudio(audioStreamIndex, samples);

    // now write some data on a different index

    generator.fillNextSamples(samples, sampleCount);
    writer.encodeAudio(audioStreamIndex+1, samples);

    // delete the output file so no broke media files persist after the
    // test
   
    file.delete();
View Full Code Here

Examples of com.xuggle.mediatool.MediaWriter.encodeAudio()

    int totalSamples = 0;
    while (totalSamples < sampleRate * totalSeconds)
    {
      generator.fillNextSamples(samples, sampleCount);
      writer.encodeAudio(audioStreamIndex, samples);
      totalSamples += samples.getNumSamples();
    }

    // close the writer

View Full Code Here

Examples of com.xuggle.mediatool.MediaWriter.encodeAudio()

    short[] javaSamples = new short[sampleCount*channelCount];
    while (totalSamples < sampleRate * totalSeconds)
    {
      generator.fillNextSamples(samples, sampleCount);
      samples.get(0, javaSamples, 0, javaSamples.length);
      writer.encodeAudio(streamIndex, javaSamples);
      totalSamples += samples.getNumSamples();
    }

    // close the writer

View Full Code Here

Examples of com.xuggle.mediatool.MediaWriter.encodeAudio()

      }

      // generate audio
     
      generator.fillNextSamples(samples, sampleCount);
      writer.encodeAudio(audioStreamIndex, samples);
      totalSamples += samples.getNumSamples();
    }

    // close the writer
View Full Code Here

Examples of com.xuggle.mediatool.MediaWriter.encodeAudio()

    generator.prepare(channelCount, sampleRate);

    // write some data, so that the media header will be written

    generator.fillNextSamples(samples, sampleCount);
    writer.encodeAudio(audioStreamIndex, samples);

    // re-delete the output file so no broke media files persist after
    // the test
   
    file.delete();
View Full Code Here

Examples of com.xuggle.mediatool.MediaWriter.encodeAudio()

    file.delete();

    // now write some data on a different index

    generator.fillNextSamples(samples, sampleCount);
    writer.encodeAudio(audioStreamIndex+1, samples);

    // should no get here

    assert(false);
  }
View Full Code Here

Examples of com.xuggle.mediatool.MediaWriter.encodeAudio()

    int totalSamples = 0;
    while (totalSamples < sampleRate * totalSeconds)
    {
      generator.fillNextSamples(samples, sampleCount);
      writer.encodeAudio(audioStreamIndex, samples);
      totalSamples += samples.getNumSamples();
    }

    // close the writer

View Full Code Here

Examples of com.xuggle.mediatool.MediaWriter.encodeAudio()

    short[] javaSamples = new short[sampleCount*channelCount];
    while (totalSamples < sampleRate * totalSeconds)
    {
      generator.fillNextSamples(samples, sampleCount);
      samples.get(0, javaSamples, 0, javaSamples.length);
      writer.encodeAudio(streamIndex, javaSamples);
      totalSamples += samples.getNumSamples();
    }

    // close the writer

View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.