Hand in changed metadata to superclass.
[sonitus.git] / src / main / java / net / pterodactylus / sonitus / data / filter / OggVorbisDecoder.java
index d98abe1..93ff3aa 100644 (file)
@@ -25,7 +25,6 @@ import java.io.IOException;
 import net.pterodactylus.sonitus.data.Metadata;
 
 import com.google.common.collect.ImmutableList;
-import com.google.common.eventbus.EventBus;
 
 /**
  * Ogg Vorbis decoder that uses {@code oggdec} (from the {@code vorbis-tools}
@@ -44,13 +43,11 @@ public class OggVorbisDecoder extends ExternalFilter {
        /**
         * Creates a new Ogg Vorbis decoder.
         *
-        * @param eventBus
-        *              The event bus
         * @param binary
         *              The location of the binary
         */
-       public OggVorbisDecoder(EventBus eventBus, String binary) {
-               super(eventBus, "Ogg Vorbis Decoder");
+       public OggVorbisDecoder(String binary) {
+               super("Ogg Vorbis Decoder");
                this.binary = binary;
        }
 
@@ -71,16 +68,11 @@ public class OggVorbisDecoder extends ExternalFilter {
        //
 
        @Override
-       public Metadata metadata() {
-               return super.metadata().encoding("PCM");
-       }
-
-       @Override
        public void open(Metadata metadata) throws IOException {
                checkNotNull(metadata, "metadata must not be null");
                checkArgument(metadata.encoding().equalsIgnoreCase("Vorbis"), "source must be Vorbis-encoded");
 
-               super.open(metadata);
+               super.open(metadata.encoding("PCM"));
        }
 
        //