/** * Plays a sound through the audio API. */ protected void playNormalSound( AudioStream s ) { AudioPlayer ap = new AudioPlayer( s ); ap.run(); }
/** * Plays a sound through the audio API. */ protected void playNormalSound( AudioStream s ) { AudioPlayer ap = new AudioPlayer( s ); ap.run(); }
/** * Main method. * @param args */ public static void main( final String[] args ) { final InputStream is = AudioFromStream.class.getResourceAsStream( "/org/openimaj/demos/sandbox/audio/WelcomeToTheNews.wav" ); if( is != null ) { final XuggleAudio xa = new XuggleAudio( is ); final AudioPlayer ap = AudioPlayer.createAudioPlayer( xa ); ap.run(); } else System.out.println( "Stream not found." ); } }
/** * Main method. * @param args */ public static void main( final String[] args ) { final InputStream is = AudioFromStream.class.getResourceAsStream( "/org/openimaj/demos/sandbox/audio/WelcomeToTheNews.wav" ); if( is != null ) { final XuggleAudio xa = new XuggleAudio( is ); final AudioPlayer ap = AudioPlayer.createAudioPlayer( xa ); ap.run(); } else System.out.println( "Stream not found." ); } }
/** * Plays a processed sound through the audio API. */ protected void playProcessedSound( AudioStream s ) { VolumeAdjustProcessor vap = new VolumeAdjustProcessor( 0.4f, s ); AudioPlayer ap = new AudioPlayer( vap ); ap.run(); }
/** * Plays a processed sound through the audio API. */ protected void playProcessedSound( AudioStream s ) { VolumeAdjustProcessor vap = new VolumeAdjustProcessor( 0.4f, s ); AudioPlayer ap = new AudioPlayer( vap ); ap.run(); }
ap.run(); System.out.println( ap.getTime() ); Thread.sleep( 1500 );
ap.run(); System.out.println( ap.getTime() ); Thread.sleep( 1500 );
/** * Main * @param args CLAs */ public static void main( String[] args ) { double fc = 1000; // mid-point 1000Hz double q = 1600; // HPF @ 200Hz, LPF @ 1800Hz XuggleAudio s = new XuggleAudio( new File("videoplayback.mp4") ); EQFilter lpf = new EQFilter( s, EQType.LPF, fc+q/2 ); EQFilter hpf = new EQFilter( lpf, EQType.HPF, fc-q/2 ); // AudioSpectragram as = new AudioSpectragram( hpf ); // as.addListener( new SpectragramCompleteListener() // { // @Override // public void spectragramComplete( AudioSpectragram as ) // { // DisplayUtilities.display( as.getLastGeneratedView() ); // } // } ); // as.processStream(); AudioPlayer ap = new AudioPlayer( hpf ); ap.run(); } }
/** * Main * @param args CLAs */ public static void main( String[] args ) { double fc = 1000; // mid-point 1000Hz double q = 1600; // HPF @ 200Hz, LPF @ 1800Hz XuggleAudio s = new XuggleAudio( new File("videoplayback.mp4") ); EQFilter lpf = new EQFilter( s, EQType.LPF, fc+q/2 ); EQFilter hpf = new EQFilter( lpf, EQType.HPF, fc-q/2 ); // AudioSpectragram as = new AudioSpectragram( hpf ); // as.addListener( new SpectragramCompleteListener() // { // @Override // public void spectragramComplete( AudioSpectragram as ) // { // DisplayUtilities.display( as.getLastGeneratedView() ); // } // } ); // as.processStream(); AudioPlayer ap = new AudioPlayer( hpf ); ap.run(); } }
ap.run(); System.out.println( "1----------------------------------------- ");
ap.run(); System.out.println( "1----------------------------------------- ");
ap2.run(); System.out.println( "2----------------------------------------- ");
ap2.run(); System.out.println( "2----------------------------------------- ");