From d3ab28bf3d751305328d02784d3a5eaf6b3ad81c Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Tue, 4 Jun 2013 21:13:57 +0200 Subject: [PATCH] Hand in changed metadata to superclass. --- .../net/pterodactylus/sonitus/data/filter/OggVorbisDecoder.java | 7 +------ .../net/pterodactylus/sonitus/data/filter/SoxResampleFilter.java | 7 +------ 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/src/main/java/net/pterodactylus/sonitus/data/filter/OggVorbisDecoder.java b/src/main/java/net/pterodactylus/sonitus/data/filter/OggVorbisDecoder.java index b142fdd..93ff3aa 100644 --- a/src/main/java/net/pterodactylus/sonitus/data/filter/OggVorbisDecoder.java +++ b/src/main/java/net/pterodactylus/sonitus/data/filter/OggVorbisDecoder.java @@ -68,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")); } // diff --git a/src/main/java/net/pterodactylus/sonitus/data/filter/SoxResampleFilter.java b/src/main/java/net/pterodactylus/sonitus/data/filter/SoxResampleFilter.java index 2415bbb..d412259 100644 --- a/src/main/java/net/pterodactylus/sonitus/data/filter/SoxResampleFilter.java +++ b/src/main/java/net/pterodactylus/sonitus/data/filter/SoxResampleFilter.java @@ -58,16 +58,11 @@ public class SoxResampleFilter extends ExternalFilter { // @Override - public Metadata metadata() { - return super.metadata().frequency(rate); - } - - @Override public void open(Metadata metadata) throws IOException { checkNotNull(metadata, "metadata must not be null"); checkArgument(metadata.encoding().equalsIgnoreCase("PCM"), "source must be PCM-encoded"); - super.open(metadata); + super.open(metadata.frequency(rate)); } // -- 2.7.4