MCPcopy Create free account
hub / github.com/demoth/jake2 / useDriver

Method useDriver

client/src/main/java/jake2/client/sound/S.java:94–106  ·  view source on GitHub ↗

Switches to the specific sound driver.

(String driverName)

Source from the content-addressed store, hash-verified

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.

Callers 2

SClass · 0.95
InitMethod · 0.95

Calls 4

getNameMethod · 0.95
sizeMethod · 0.80
getMethod · 0.45
equalsMethod · 0.45

Tested by

no test coverage detected