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 AudioDecoderService {
9
10 /**
11 * Whether this decoder supports reading from 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 decoder. It can also contain parameters which have nothing to do with
18 * audio decoding. Such parameters must be ignored.
19 */
20 Optional<AudioDecoder> newDecoder(Map<String,String> params);
21
22 }