How can we convert a byte array to stream or stream to array of byte? So How can we change the size of stream? Can we change the stream lenght(or size) bigger? I thank you very much for your answers.
bahman2000b
Posts
-
How to convert array of byte to stream? -
Ho to detect Sound Device?How can I detect the sound device? Which "namespace" is required? and what type is its input and output? is it binary? Thank you too much. Bahman
-
Thread taking maximum CPU time-See in a method which is working with thread if we have a loop we must use some code to stop the loop. for example i wrote the following code which passes to ThreadStart:
for(;;) { bytesRcvd = client.Receive(rcvBuffer, 0, rcvBuffer.Length, SocketFlags.None); msg1 = Encoding.UTF8.GetString(rcvBuffer); msg3 = "\0"; msg1 = msg1.Trim(msg3.ToCharArray()); Array.Clear(rcvBuffer, 0, rcvBuffer.Length); }
the thread is await until the data received if we wrote a code in loop that has no stopping, CPU will be busy by 100%. Bahman -
Detect Sound Device in C#How can I detect the sound device? Which namespace is required? and what type is its input and output? is it binary? Thanks for answer. Bahman
-
how to change sound to byte and byte to sound?I've designed a udp connection using socket and threading. I want to know how I can change sound to an array of byte and change an array of byte to sound. So how can I set received sound to speaker and give output sound from its device like microphone? What should I do? Thanks a lot for your answers. Bahman