private void AudioReadingThread() { while (isReading) { int readCount = audioStream.Read(audioBuffer, 0, audioBuffer.Length); try { KServerPaquet sp = new KServerAudioStreamPaquet(audioBuffer, getIdSensor(sensor)); sp.send(ns); } catch (Exception e) { Console.WriteLine(e.Message); isReading = false; } } }