Package jm.audio.io

Examples of jm.audio.io.AudioFileIn


    // Audio
    //----------------------------------------------

    public static float[] audio(String fileName) {
        System.out.println("-------------------- Reading Audio File ---------------------");
        AudioFileIn afi = new AudioFileIn(fileName);
        float[] sampleData = afi.getSampleData();
        System.out.println("File '" + fileName + "' read in. Details:");
        System.out.println("Channels = " + afi.getChannels()
                + " Samples per channel = " + afi.getDuration() / afi.getChannels()
                + " Sample rate = " + afi.getSampleRate()
                + " Bit depth = " + afi.getSampleBitDepth());
        System.out.println("-------------------------------------------------------------");
        return sampleData;
    }
View Full Code Here


        return sampleData;
    }

    public static void audio(float[] sampleData, String fileName) {
        System.out.println("-------------------- Reading Audio File ---------------------");
        AudioFileIn afi = new AudioFileIn(fileName);
        sampleData = afi.getSampleData();
        System.out.println("Audio file '" + fileName + "' read in. Details:");
        System.out.println("Channels = " + afi.getChannels()
                + " Samples per channel = " + afi.getDuration() / afi.getChannels()
                + " Sample rate = " + afi.getSampleRate()
                + " Bit depth = " + afi.getSampleBitDepth());
        System.out.println("-------------------------------------------------------------");
    }
View Full Code Here

    // Audio
    //----------------------------------------------
   
    public static float[] audio(String fileName) {
        System.out.println("-------------------- Reading Audio File ---------------------");
        AudioFileIn afi = new AudioFileIn(fileName);
        float[] sampleData = afi.getSampleData();
        System.out.println("File '"+fileName+"' read in. Details:");
        System.out.println("Channels = " + afi.getChannels()
                           + " Samples per channel = " + afi.getDuration() / afi.getChannels()
                           +" Sample rate = " + afi.getSampleRate()
                           + " Bit depth = " + afi.getSampleBitDepth());
        System.out.println("-------------------------------------------------------------");
        return sampleData;
    }
View Full Code Here

        return sampleData;
    }
       
    public static void audio(float[] sampleData, String fileName) {
        System.out.println("-------------------- Reading Audio File ---------------------");
        AudioFileIn afi = new AudioFileIn(fileName);
        sampleData = afi.getSampleData();
        System.out.println("Audio file '"+fileName+"' read in. Details:");
         System.out.println("Channels = " + afi.getChannels()
                            + " Samples per channel = " + afi.getDuration() / afi.getChannels()
                            +" Sample rate = " + afi.getSampleRate()
                            + " Bit depth = " + afi.getSampleBitDepth());
        System.out.println("-------------------------------------------------------------");
    }
View Full Code Here

TOP

Related Classes of jm.audio.io.AudioFileIn

Copyright © 2018 www.massapicom. 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.