private static Playback createPlayback ( Media media , Align alignment , int volume ) throws IOException { final AudioInputStream input = openStream ( media ) ; final SourceDataLine dataLine = getDataLine ( input ) ; dataLine . start ( ) ; updateAlignment ( dataLine , alignment ) ; updateVolume ( dataLine , volume ) ; return new Playback ( input , dataLine ) ; }
Play a sound .