/* */ package NET.worlds.console; /* */ /* */ import NET.worlds.scape.WavSoundPlayer; /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ public class GammaPhoneMonitor /* */ extends Thread /* */ { /* */ public static final int GA_FAILEDCONNECT = 100; /* */ public static final int GPE_WHATEVER = 0; /* */ public static final int GPE_OUT_OF_MEM = 1; /* */ public static final int GPE_WEIRD = 2; /* */ public static final int GPE_SOCKET = 3; /* */ public static final int GPE_COMM = 4; /* */ public static final int GPE_HOST = 5; /* */ public static final int GPE_FILE = 6; /* */ public static final int GPE_CRYPTO = 7; /* */ public static final int GPE_MULTICAST = 8; /* */ public static final int GPE_RECORD = 9; /* */ public static final int GPE_WAVE_INPUT = 10; /* */ public static final int GPE_PLAY = 11; /* */ public static final int GPE_WAVE_OUTPUT = 12; /* */ public static final int GPE_PORT = 13; /* */ public static final int GPE_SOCKETS_VERSION = 14; /* */ public static final int GPE_HALF_DUPLEX = 15; /* */ public static final int GPE_USAGE = 16; /* */ public static final int GPE_IS_HALF_DUPLEX = 17; /* */ public static final int GPE_IS_FULL_DUPLEX = 18; /* */ public static final int GPE_LWL = 19; /* */ public static final int GPE_TIMEOUT = 20; /* */ public static final int GPE_WAVE_IN_USE = 21; /* */ public static final int GPE_CONNECTION_LOST = 22; /* */ public static final int GPE_SUCCESS = 900; /* */ public static final int GPE_STARTUP = 901; /* */ public static final int GPE_SHUTDOWN = 902; /* 82 */ private VoiceChat _vc = null; /* */ /* */ public GammaPhoneMonitor(VoiceChat v) { /* 85 */ this._vc = v; /* */ } /* */ /* */ /* */ /* */ /* */ /* */ /* */ public void run() /* */ { /* 95 */ int m = 0; /* */ /* 97 */ Window w = Window.getMainWindow(); /* */ /* */ /* */ /* */ try /* */ { /* */ for (;;) /* */ { /* 105 */ if ((m = Window.getVoiceChatWParam()) != 0) { /* 106 */ processMessage(Window.getVoiceChatWParam(), /* 107 */ Window.getVoiceChatLParam()); /* 108 */ Window.resetVoiceChatMsg(); /* */ } /* 110 */ Thread.sleep(1000L); /* */ } /* */ } catch (InterruptedException e) { /* 113 */ stop(); /* */ } /* */ } /* */ /* */ /* */ private void processMessage(int wParam, int lParam) /* */ { /* 120 */ switch (wParam) { /* */ case 0: /* 122 */ this._vc.inform(wParam, "whatever "); /* 123 */ break; /* */ case 1: /* 125 */ this._vc.inform(wParam, "out of memory "); /* 126 */ break; /* */ case 2: /* 128 */ this._vc.inform(wParam, "! "); /* 129 */ break; /* */ case 3: /* 131 */ this._vc.inform(wParam, /* 132 */ "An error occurred while setting up the socket for Voice Chat."); /* 133 */ break; /* */ case 4: /* 135 */ this._vc.inform(wParam, "communications "); /* 136 */ break; /* */ case 5: /* 138 */ this._vc.inform(wParam, "can't find host "); /* 139 */ break; /* */ case 6: /* 141 */ this._vc.inform(wParam, "can't open/read/write file "); /* 142 */ break; /* */ case 7: /* 144 */ this._vc.inform(wParam, "we don't even use this! "); /* 145 */ break; /* */ case 8: /* 147 */ this._vc.inform(wParam, "we don't even use this! "); /* 148 */ break; /* */ case 9: /* 150 */ this._vc.inform(wParam, "can't record at 8000 or 11200 samp/sec"); /* 151 */ break; /* */ case 10: /* 153 */ this._vc.inform(wParam, "error opening wave input device "); /* 154 */ break; /* */ case 11: /* 156 */ this._vc.inform(wParam, "sound card can't play at 8000 or 11200"); /* 157 */ break; /* */ case 12: /* 159 */ this._vc.inform(wParam, "error opening wave output device "); /* 160 */ break; /* */ case 13: /* 162 */ this._vc.inform(wParam, "invalid port number specified "); /* 163 */ break; /* */ case 14: /* 165 */ this._vc.inform(wParam, "incompatible (old) sockets library "); /* 166 */ break; /* */ case 15: /* 168 */ this._vc.inform(wParam, "sound drivers can't support full duplex"); /* 169 */ break; /* */ case 16: /* 171 */ this._vc.inform(wParam, "command line syntax error "); /* 172 */ break; /* */ case 17: /* 174 */ this._vc.inform(wParam, "response to isFullDuplex command "); /* 175 */ break; /* */ case 18: /* 177 */ this._vc.inform(wParam, "response to isFullDuplex command "); /* 178 */ break; /* */ case 19: /* 180 */ this._vc.inform(wParam, " -Look Who's Listening- error, weird! "); /* 181 */ break; /* */ case 20: /* 183 */ this._vc.inform(wParam, "Never heard back. "); /* 184 */ break; /* */ /* */ case 21: /* 187 */ this._vc.inform(wParam, "VoiceChat failed because a wav device is in use."); /* */ /* 189 */ break; /* */ /* */ case 22: /* 192 */ this._vc.inform(wParam, "VoiceChat has lost its connection."); /* 193 */ break; /* */ /* */ case 900: /* 196 */ this._vc.inform(wParam, "It worked o.k. "); /* 197 */ break; /* */ /* */ case 901: /* 200 */ this._vc.registerProcess(lParam); /* 201 */ break; /* */ /* */ case 902: /* 204 */ WavSoundPlayer.resumeSystem(); /* */ /* 206 */ break; /* */ /* */ case 100: /* 209 */ Console.println(Console.message("Voice-failed")); /* 210 */ break; /* */ /* */ default: /* 213 */ Console.println(Console.message("Unrec-message") + wParam); /* */ } /* */ } /* */ } /* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\console\GammaPhoneMonitor.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */