Package sun.audio

Examples of sun.audio.AudioStream


  public void reproduceAudio(Imagen imagen) {
    AudioPlayer.player.stop(as);
    InputStream in;
    try {
      in = new FileInputStream(imagen.getSonidoURL());
      as = new AudioStream(in);
      AudioPlayer.player.start(as);
    } catch (FileNotFoundException e) {
      System.out.println(Messages.getString("util.Audio.0")); //$NON-NLS-1$
    } catch (IOException e) {
      System.out.println(Messages.getString("util.Audio.1")); //$NON-NLS-1$
View Full Code Here


            // read the sound file form resource
            InputStream in = getClass().getResourceAsStream("notify.wav");

            // create an audio stream
            AudioStream audioStream = new AudioStream(in);

            // play
            AudioPlayer.player.start(audioStream);

        } catch (Exception ex) {
View Full Code Here

              {
                AudioPlayer.player.stop( nodeHitAudio );
              }
              if( new File( "audio/drum.wav" ).exists() )
              {
                nodeHitAudio = new AudioStream( new FileInputStream( "audio/drum.wav" ) );
                AudioPlayer.player.start( nodeHitAudio );
                playSound = true;
              }
            }
            catch( FileNotFoundException e )
View Full Code Here

    try
    {
      audioStreams.clear();
      for( int i = 0; i < audioFiles.length; i++ )
      {
        AudioStream tempAudioStream = new AudioStream( new FileInputStream( "audio/" + audioFiles[i] ) );
        audioStreams.add( tempAudioStream );
      }
    }
    catch( FileNotFoundException e )
    {
View Full Code Here

TOP

Related Classes of sun.audio.AudioStream

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.