1   package org.daisy.pipeline.audio;
2   
3   import java.util.Map;
4   import java.util.Optional;
5   
6   import javax.sound.sampled.AudioFileFormat;
7   
8   public interface AudioEncoderService {
9   
10  	/**
11  	 * Whether this encoder supports encoding to a certain file format.
12  	 */
13  	boolean supportsFileType(AudioFileFormat.Type fileType);
14  
15  	/**
16  	 * @param params contains various key-value pairs. Some of them might be parameters for the
17  	 *               audio encoder. It can also contain parameters which have nothing to do with
18  	 *               audio encoding. Such parameters must be ignored.
19  	 */
20  	Optional<AudioEncoder> newEncoder(Map<String,String> params);
21  
22  }