< prev index next >

src/java.desktop/share/classes/com/sun/media/sound/AbstractLine.java

Print this page

190     }
191 
192     /**
193      * Return the frame position in a long value
194      * This implementation returns AudioSystem.NOT_SPECIFIED.
195      */
196     public long getLongFramePosition() {
197         return AudioSystem.NOT_SPECIFIED;
198     }
199 
200     // $$kk: 06.03.99: returns the mixer used in construction.
201     // this is a hold-over from when there was a public method like
202     // this on line and should be fixed!!
203     final AbstractMixer getMixer() {
204         return mixer;
205     }
206 
207     final EventDispatcher getEventDispatcher() {
208         // create and start the global event thread
209         //TODO  need a way to stop this thread when the engine is done

210         final ThreadGroup tg = Thread.currentThread().getThreadGroup();
211         synchronized (dispatchers) {
212             EventDispatcher eventDispatcher = dispatchers.get(tg);
213             if (eventDispatcher == null) {
214                 eventDispatcher = new EventDispatcher();
215                 dispatchers.put(tg, eventDispatcher);
216                 eventDispatcher.start();
217             }
218             return eventDispatcher;
219         }
220     }
221 
222     @Override
223     public abstract void open() throws LineUnavailableException;
224     @Override
225     public abstract void close();
226 }

190     }
191 
192     /**
193      * Return the frame position in a long value
194      * This implementation returns AudioSystem.NOT_SPECIFIED.
195      */
196     public long getLongFramePosition() {
197         return AudioSystem.NOT_SPECIFIED;
198     }
199 
200     // $$kk: 06.03.99: returns the mixer used in construction.
201     // this is a hold-over from when there was a public method like
202     // this on line and should be fixed!!
203     final AbstractMixer getMixer() {
204         return mixer;
205     }
206 
207     final EventDispatcher getEventDispatcher() {
208         // create and start the global event thread
209         //TODO  need a way to stop this thread when the engine is done
210         @SuppressWarnings("deprecation")
211         final ThreadGroup tg = Thread.currentThread().getThreadGroup();
212         synchronized (dispatchers) {
213             EventDispatcher eventDispatcher = dispatchers.get(tg);
214             if (eventDispatcher == null) {
215                 eventDispatcher = new EventDispatcher();
216                 dispatchers.put(tg, eventDispatcher);
217                 eventDispatcher.start();
218             }
219             return eventDispatcher;
220         }
221     }
222 
223     @Override
224     public abstract void open() throws LineUnavailableException;
225     @Override
226     public abstract void close();
227 }
< prev index next >