@@ -103,9 +103,6 @@ public final void write(int b) {
103103 public abstract void clear ();
104104
105105 public abstract void emptyBuffer ();
106-
107- @ NotNull
108- public abstract MixingOutput stream ();
109106 }
110107
111108 public class FirstOutputStream extends MixingOutput {
@@ -119,21 +116,21 @@ public void write(@NotNull byte[] b, int off, int len) {
119116 @ Override
120117 public void toggle (boolean enabled ) {
121118 if (enabled == fe ) return ;
122- if (enabled && (fout == null || fout != this )) throw new IllegalStateException () ;
119+ if (enabled && (fout == null || fout != this )) return ;
123120 fe = enabled ;
124121 LOGGER .trace ("Toggle first channel: " + enabled );
125122 }
126123
127124 @ Override
128125 public void gain (float gain ) {
129- if (fout == null || fout != this ) throw new IllegalStateException () ;
126+ if (fout == null || fout != this ) return ;
130127 fg = gain ;
131128 }
132129
133130 @ Override
134131 @ SuppressWarnings ("DuplicatedCode" )
135132 public void clear () {
136- if (fout == null || fout != this ) throw new IllegalStateException () ;
133+ if (fout == null || fout != this ) return ;
137134
138135 fg = 1 ;
139136 fe = false ;
@@ -145,15 +142,9 @@ public void clear() {
145142 }
146143 }
147144
148- @ Override
149- public @ NotNull MixingOutput stream () {
150- if (fout == null || fout != this ) throw new IllegalStateException ();
151- return this ;
152- }
153-
154145 @ Override
155146 public void emptyBuffer () {
156- if (fout == null || fout != this ) throw new IllegalStateException () ;
147+ if (fout == null || fout != this ) return ;
157148 fcb .empty ();
158149 }
159150 }
@@ -169,21 +160,21 @@ public void write(@NotNull byte[] b, int off, int len) {
169160 @ Override
170161 public void toggle (boolean enabled ) {
171162 if (enabled == se ) return ;
172- if (enabled && (sout == null || sout != this )) throw new IllegalStateException () ;
163+ if (enabled && (sout == null || sout != this )) return ;
173164 se = enabled ;
174165 LOGGER .trace ("Toggle second channel: " + enabled );
175166 }
176167
177168 @ Override
178169 public void gain (float gain ) {
179- if (sout == null || sout != this ) throw new IllegalStateException () ;
170+ if (sout == null || sout != this ) return ;
180171 sg = gain ;
181172 }
182173
183174 @ Override
184175 @ SuppressWarnings ("DuplicatedCode" )
185176 public void clear () {
186- if (sout == null || sout != this ) throw new IllegalStateException () ;
177+ if (sout == null || sout != this ) return ;
187178
188179 sg = 1 ;
189180 se = false ;
@@ -195,15 +186,9 @@ public void clear() {
195186 }
196187 }
197188
198- @ Override
199- public @ NotNull MixingOutput stream () {
200- if (sout == null || sout != this ) throw new IllegalStateException ();
201- return this ;
202- }
203-
204189 @ Override
205190 public void emptyBuffer () {
206- if (sout == null || sout != this ) throw new IllegalStateException () ;
191+ if (sout == null || sout != this ) return ;
207192 scb .empty ();
208193 }
209194 }
0 commit comments