Download presentation
Presentation is loading. Please wait.
Published byJasmine Dorsey Modified over 9 years ago
1
CS 290: VoIP Project By Rudy Sevile
2
Summary AudioRecord AudioTrack UDP TCP Eclipse and LogCat
3
AudioRecord Use this class to record your voice from the microphone. Use startRecording() to start the recording and then “pull” data from the microphone using read(byte[] buffer, int offsetInBytes, int sizeInBytes). Call stop() to stop the recorder and release() to release the resources.
4
AudioTrack Allows you to play audio. As with the AudioRecord, a buffer is set. Use play() to start playing and audio track, then send data to be played with write(byte[] buffer, int offsetInBytes, int sizeInBytes). Call stop() to stop the player and release() to release the resources.
5
UDP When implementing UDP, you can rely on the DatagramSocket class to make a connection. This class sends and receives DatagramPacket. Create a new socket using the DatagramSocket class then create a packet using the DatagramPacket class. The socket has a send() that takes a DatagramPacket as argument. The method receive() allows receiving DatagramPacket.
6
TCP Use the ServerSocket class to wait on TCP connection. Once a ServerSocket is created, use accept(). It will wait for an incoming connection and return a socket when one arrives. Use a Socket to establish a TCP connection. The connection can occur in the constructor if you pass enough parameters, or through the connect() method.
7
Eclipse and LogCat
8
References Some links that you may find useful: Hello World: http://developer.android.com/resources/tutorials/hello-world.html Android Library: http://developer.android.com/reference/packages.html Sample code examples: http://developer.android.com/resources/samples/index.html
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.