CS 290: VoIP Project By Rudy Sevile. Summary AudioRecord AudioTrack UDP TCP Eclipse and LogCat.
-
Upload
jasmine-dorsey -
Category
Documents
-
view
212 -
download
0
Transcript of CS 290: VoIP Project By Rudy Sevile. Summary AudioRecord AudioTrack UDP TCP Eclipse and LogCat.
![Page 1: CS 290: VoIP Project By Rudy Sevile. Summary AudioRecord AudioTrack UDP TCP Eclipse and LogCat.](https://reader036.fdocuments.us/reader036/viewer/2022083006/56649f395503460f94c55fda/html5/thumbnails/1.jpg)
CS 290: VoIP Project
By Rudy Sevile
![Page 2: CS 290: VoIP Project By Rudy Sevile. Summary AudioRecord AudioTrack UDP TCP Eclipse and LogCat.](https://reader036.fdocuments.us/reader036/viewer/2022083006/56649f395503460f94c55fda/html5/thumbnails/2.jpg)
Summary
• AudioRecord
• AudioTrack
• UDP
• TCP
• Eclipse and LogCat
![Page 3: CS 290: VoIP Project By Rudy Sevile. Summary AudioRecord AudioTrack UDP TCP Eclipse and LogCat.](https://reader036.fdocuments.us/reader036/viewer/2022083006/56649f395503460f94c55fda/html5/thumbnails/3.jpg)
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.
![Page 4: CS 290: VoIP Project By Rudy Sevile. Summary AudioRecord AudioTrack UDP TCP Eclipse and LogCat.](https://reader036.fdocuments.us/reader036/viewer/2022083006/56649f395503460f94c55fda/html5/thumbnails/4.jpg)
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.
![Page 5: CS 290: VoIP Project By Rudy Sevile. Summary AudioRecord AudioTrack UDP TCP Eclipse and LogCat.](https://reader036.fdocuments.us/reader036/viewer/2022083006/56649f395503460f94c55fda/html5/thumbnails/5.jpg)
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.
![Page 6: CS 290: VoIP Project By Rudy Sevile. Summary AudioRecord AudioTrack UDP TCP Eclipse and LogCat.](https://reader036.fdocuments.us/reader036/viewer/2022083006/56649f395503460f94c55fda/html5/thumbnails/6.jpg)
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.
![Page 7: CS 290: VoIP Project By Rudy Sevile. Summary AudioRecord AudioTrack UDP TCP Eclipse and LogCat.](https://reader036.fdocuments.us/reader036/viewer/2022083006/56649f395503460f94c55fda/html5/thumbnails/7.jpg)
Eclipse and LogCat
![Page 8: CS 290: VoIP Project By Rudy Sevile. Summary AudioRecord AudioTrack UDP TCP Eclipse and LogCat.](https://reader036.fdocuments.us/reader036/viewer/2022083006/56649f395503460f94c55fda/html5/thumbnails/8.jpg)
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