code: public static synchronized <A extends Audio> A loadAudio(Media media, Class<A> type)
      {
          Check.notNull(media);
          Check.notNull(type);
  
          final String extension = UtilFile.getExtension(media.getPath());
          try
          {
              return type.cast(Optional.ofNullable(FACTORIES.get(extension))
                                       .orElseThrow(() -> new LionEngineException(media, ERROR_FORMAT))
                                       .loadAudio(media));
          }
          catch (final ClassCastException exception)
          {
              throw new LionEngineException(exception, media, ERROR_FORMAT);
          }
      }
docs: Load an audio file and prepare it to be played.
  
  @param <A> The audio type.
  @param media The audio media (must not be <code>null</code>).
  @param type The expected audio type (must not be <code>null</code>).
  @return The loaded audio.
  @throws LionEngineException If invalid arguments or invalid audio.