Switches to the specific sound driver.
(String driverName)
| 92 | * Switches to the specific sound driver. |
| 93 | */ |
| 94 | public static void useDriver(String driverName) { |
| 95 | Sound driver = null; |
| 96 | int count = drivers.size(); |
| 97 | for (int i = 0; i < count; i++) { |
| 98 | driver = (Sound) drivers.get(i); |
| 99 | if (driver.getName().equals(driverName)) { |
| 100 | impl = driver; |
| 101 | return; |
| 102 | } |
| 103 | } |
| 104 | // if driver not found use dummy |
| 105 | impl = (Sound)drivers.lastElement(); |
| 106 | } |
| 107 | |
| 108 | /** |
| 109 | * Initializes the sound module. |