Priya Kubher

Greenhorn
+ Follow
since Jan 07, 2003
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Priya Kubher

So there is no way I can measure elapsed time in microseconds as things stand now!!!

Thanks for the info. It saves me hours trying to find the right code.
Maybe I will try and use Native interface to c.
18 years ago
Hi all.
I am wondering how to get time in microseconds in Java. Can someone please help me out.
Thanks a lot.
Priya
18 years ago
Hi how do i set the path and classpath in solaris sparc 8.
I have downloaded j2sdk1.4.1_01 to a folder called Java.Please advise
18 years ago
Hi,
iam trying to record from microphone to a buffer like
byte []buffer;
The recording part works. Kannan I followed your advise and used java.sound.sampled package.
and then trying to send it over the net using udp.
I trying the the following code at client side
ds = new DatagramSocket(serverPort);
InetAddress Addr1 = InetAddress.getByName("c1635229-a");
ds.send(new DatagramPacket(abBuffer,pos,Addr1,clientPort));
and this code at server side
DatagramPacket p = new DatagramPacket(buffer, buffer.length);
ds.receive(p);
abBuffer = p.getData();
This code worked fine when i was using to read and write from command line....but does not work for sound, My program does not deliver the sound to the server side. Also I am using TargetDataLine to read into the buffer and iam sending abBuffer to SourceDataLine to write output to the speakers.
Please tell me what I am doing wrong...
Thanks a million
18 years ago
Hi iam trying to record from microphone to a buffer like
byte []buffer;
and then trying to send it over the net using udp.
I trying the the following code at client side
ds = new DatagramSocket(serverPort);
InetAddress Addr1 = InetAddress.getByName("c1635229-a");
ds.send(new DatagramPacket(abBuffer,pos,Addr1,clientPort));
and this code at server side
DatagramPacket p = new DatagramPacket(buffer, buffer.length);
ds.receive(p);
abBuffer = p.getData();
This code worked fine when i was using to read and write from command line....but does not work for sound, My program does not deliver the sound to the server side. Also I am using TargetDataLine to read into the buffer and iam sending abBuffer to SourceDataLine to write output to the speakers.
Please tell me what I am doing wrong...
Thanks a million
Hi iam trying to set up a client server in udp. So far my program sends messages if both client and server are run on the same machine. How do i get it to work if they run on different machines. Do advise.
Sorry to dump this many lines of code but i think iam missing something important here. Thank you for all your help

my client code:
import java.net.*;
class ucVoipClient
{
public static int serverPort = 666;
public static int clientPort =999;
public static int buffer_size = 1024;
public static DatagramSocket ds;
public static byte buffer[] = new byte[buffer_size];
public static void TheClient( ) throws Exception
{
while(true)
{
DatagramPacket p = new DatagramPacket(buffer, buffer.length);
ds.receive(p);
System.out.println(new String(p.getData(),0,p.getLength( )));
}
}
public static void main (String args[]) throws Exception
{
ds = new DatagramSocket(clientPort);
TheClient();
}
}

server code is:
import java.net.*;
class ucVoipServer
{
public static int serverPort = 666;
public static int clientPort =999;
public static int buffer_size = 1024;
public static DatagramSocket ds;
public static byte buffer[] = new byte[buffer_size];
public static void TheServer() throws Exception
{
int pos =0;
while(true)
{
int i = System.in.read();

switch(i)
{
case -1:
System.out.println( "Server Exits");
return;
case '\t':
break;

case '\n':
ds.send(new DatagramPacket(buffer,pos,InetAddress.getLocalHost(),clientPort));
pos=0;
break;

default:
buffer[pos++] =(byte) i;
}
}
}
public static void main (String args[]) throws Exception
{

ds = new DatagramSocket(serverPort);
TheServer();
}
}
Well I want to record with a microphone and transfer it into digital and then send it to another computer for playback. Which api should I use.
Please advise. I appreciate all help.
18 years ago
I need to send audio from one computer to another in java. Which api will have the stuff that can help me out. Please advise and where would i go to get information about that api.
Thank you
18 years ago
Hi iam trying to download 1.3 version in solaris 5.8 and iam not able to. How should I go about it and what are the class path variables that I need to set. Please advise
18 years ago
Hi I want to know if I need any special hardware to used JTAPI? Do I need to do anything more than just downloading it?
Please advise. Thanks
18 years ago