code: private void play(Media media, Align alignment)
      {
          try (Playback playback = createPlayback(media, alignment, volume))
          {
              if (opened.containsKey(media))
              {
                  opened.get(media).close();
              }
              opened.put(media, playback);
  
              final AudioInputStream input = openStream(media);
              final SourceDataLine dataLine = playback.getDataLine();
              dataLine.start();
              readSound(input, dataLine);
              close(input, dataLine);
          }
          catch (final IOException exception)
          {
              if (last == null || !exception.getMessage().equals(last.getMessage()))
              {
                  Verbose.exception(exception, media.toString());
                  last = exception;
              }
          }
      }
docs: Play sound.
  
  @param media The sound media.
  @param alignment The sound alignment.