Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 4931387
Votes 0
Synopsis RFE: Add methods to MidiDevice to get list of Transmitters and Receivers
Category java:classes_sound
Reported Against tiger
Release Fixed 1.5(tiger-b26)
State 10-Fix Delivered, request for enhancement
Priority: 3-Medium
Related Bugs 4940822
Submit Date 02-OCT-2003
Description
Add methods to MidiDevice to get list of Transmitters and Receivers


the interface javax.sound.midi.MidiDevice provides methods for getting instances of Receiver and of Transmitter. Usually, each call to getReceiver() or getTransmitter() will return a new, open, instance of the respective interface. However, it is impossible to query the MidiDevice instance for the list of open Receivers/Transmitters. This would be very useful in order to be able to close some devices.

In our opinion, such methods are simply missing in the API. It is also inconsistent with the javax.sound.sampled package, where the equivalent interface Mixer provides methods such as getSourceLines() to query all lines open to the Mixer instance.

We propose the following new methods in MidiDevice:

/**
 * Returns all currently active, non-closed transmitters 
 * connected with this MidiDevice. 
 * A transmitter can be removed
 * from the device by closing it.
 * @return an unmodifiable list of the open transmitters
 */
List<Transmitter> getTransmitters();


/** 
 * Returns all currently active, non-closed receivers
 * connected with this MidiDevice. 
 * A receiver can be removed
 * from the device by closing it.
 * @return an unmodifiable list of the open receivers
 */
List<Receiver> getReceivers();

There is no need for separate removeReceiver and removeTransmitter methods, since closing a Receiver/Transmitter will remove it automatically from the list.



======================================================================
Work Around
N/A
Evaluation
 xxxxx@xxxxx  2003-10-02
	Important inconsistency. Minor addition of 2 methods. Should be fixed in tiger.
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang