Examples of AudioAttributes


Examples of com.volantis.mcs.papi.AudioAttributes

            BlockAttributes blockAttributes,
            VolantisProtocol protocol,
            MarinerPageContext pageContext)
            throws PAPIException {

        AudioAttributes attributes =
                (AudioAttributes) blockAttributes;

        // Nothing to do if the source cannot be generated.
        AssetResolver resolver = pageContext.getAssetResolver();
        String src = resolver.computeURLAsString(selected);
        if (src == null) {
            return;
        }

        aAttributes.setId(attributes.getId());
        aAttributes.setTitle(attributes.getTitle());
        aAttributes.setAssetURLSuffix(attributes.getAssetURLsuffix());
        aAttributes.setSrc(src);

        aAttributes.setTagName("audio");

        // Add any event attributes.
View Full Code Here

Examples of com.volantis.mcs.papi.AudioAttributes

        if (logger.isDebugEnabled()) {
            logger.debug("Volantis AudioElement elementEndImpl starts");
        }

        AudioAttributes attributes =
                (AudioAttributes) blockAttributes;

        MarinerPageContext pageContext
                = ContextInternals.getMarinerPageContext(context);

        String audioComponentName = attributes.getSrc();

        if (audioComponentName != null) {
            PolicyReferenceResolver resolver =
                    pageContext.getPolicyReferenceResolver();
View Full Code Here

Examples of com.volantis.mcs.protocols.AudioAttributes

    }

    public void testDoAudio() {
        privateSetUp();

        AudioAttributes attr = new AudioAttributes();
        attr.setSrc("testSource");
        protocol.doAudio(buffer, attr);
        String compare = "<audio src=\"testSource\"/>";
        assertTrue("Markup is incorrect: " + getMarkup(buffer),
                compare.equals(getMarkup(buffer)));
    }
View Full Code Here

Examples of it.sauronsoftware.jave.AudioAttributes

            }
            logger.info("midi2wav conversion took: " + (System.currentTimeMillis() - start) + " millis");
            start = System.currentTimeMillis();
            EncodingAttributes attrs = new EncodingAttributes();
            attrs.setFormat("mp3");
            AudioAttributes audio = new AudioAttributes();
//            audio.setBitRate(36000);
//            audio.setSamplingRate(20000);
            attrs.setAudioAttributes(audio);
            attrs.setThreads(1);
            File mp3 = File.createTempFile("gen", ".mp3");
View Full Code Here

Examples of it.sauronsoftware.jave.AudioAttributes

 
  static void copyFileToMP3(File source) throws IllegalArgumentException, InputFormatException, EncoderException{
    File target = new File(getDirByExtension("mp3"), changeExtension(getRelativePath(source), ".mp3"));
    if (target.exists()) return;
   
    AudioAttributes audio = new AudioAttributes();
    audio.setCodec("libmp3lame");
    audio.setBitRate(new Integer(64000));
    audio.setChannels(new Integer(2));
    audio.setSamplingRate(new Integer(22050));
   
    EncodingAttributes attrs = new EncodingAttributes();
    attrs.setFormat("mp3");
    attrs.setAudioAttributes(audio);
   
View Full Code Here

Examples of it.sauronsoftware.jave.AudioAttributes

 
  static void copyFileToOgg(File source) throws IllegalArgumentException, InputFormatException, EncoderException{
    File target = new File(getDirByExtension("ogg"), changeExtension(getRelativePath(source), ".ogg"));
    if (target.exists()) return;
   
    AudioAttributes audio = new AudioAttributes();
    audio.setCodec("libvorbis");
    audio.setBitRate(new Integer(64000));
    audio.setChannels(new Integer(2));
    audio.setSamplingRate(new Integer(22050));
   
    EncodingAttributes attrs = new EncodingAttributes();
    attrs.setFormat("ogg");
    attrs.setAudioAttributes(audio);
   
View Full Code Here

Examples of it.sauronsoftware.jave.AudioAttributes

  }
 
  static void copyFileToWav(File source) throws IllegalArgumentException, InputFormatException, EncoderException{
    File target = new File(getDirByExtension("wav"), changeExtension(getRelativePath(source), ".wav"));
    if (target.exists()) return;
    AudioAttributes audio = new AudioAttributes();
    audio.setCodec("pcm_s16le");
    audio.setBitRate(new Integer(128000));
    audio.setChannels(new Integer(2));
    audio.setSamplingRate(new Integer(44100));
    EncodingAttributes attrs = new EncodingAttributes();
    attrs.setFormat("wav");
    attrs.setAudioAttributes(audio);
    Encoder encoder = new Encoder(new Myffmpeg());
    encoder.encode(source, target, attrs);
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.