Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void run() {
- //Cria um pacote (UDP) , e um array de bytes para a passagem do audio.
- DatagramPacket sendPacket;
- byte[] buffer = new byte[bufferSize];
- buffer[0] = 19;
- this.line.start();
- try {
- while (true) {
- buffer[0] = (byte) ((++buffer[0]) % 20);
- this.line.read(buffer, 1, this.bufferSize - 1);
- sendPacket = new DatagramPacket(buffer, bufferSize,
- this.clientIP, this.port);
- this.serverSocket.send(sendPacket);
- }
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
Add Comment
Please, Sign In to add comment