On Sun systems, the audio device is treated more or less like a Unix file, i.e., open() and close() are used. See man audio for the audio API. On SGI machines, you need to link with -laudio.
Information on SGI audio is available via man ALopenport; for Sun, with man -s 7 audio.
Information on Linux audio can be found at http://sunsite.unc.edu/mdw/HOWTO/Sound-HOWTO.html
Older SPARCstations (IPX, SS2, etc.) are equipped with 8-bit audio, newer SPARCstations (SS5, SS10, SS20, Ultra, etc.) with 8/16-bit audio. The plugs are in the back of the unit, with the following symbols:
You can connect your personal electronic device such as a radio, cassette or CD player to the line input. Normal "Walkman"-style headphones will work in the headphone jack. A cable with two male 1/8" (3.5 mm) stereo headphone jacks, e.g., Radio Shack part 42-2387 for about $3.99, can be used to connect the headphone jack of a PED to the line-input jack of the workstation
On SPARCstations, the program /usr/openwin/bin/audiocontrol or /usr/demo/SOUND/bin/gaintool allows you to choose ports and set volume. On SGI workstations, /usr/sbin/apanel may be used.
Your radio only needs to understand PCMU (mu-law) RTP packets with a sampling rate of 8000 Hz. Packets can contain up to 800 samples. All packets come from a single network source (SSRC) and thus, no mixing of audio samples is required.
In the next assignment, your program will be turned into an Internet telephone, so you should structure your program to be able to receive events and input from several sources (network, audio input, control channel).
Your program does not have to implement volume control or switching of output ports. No graphical user interface is required. The program must deal gracefully with a reset of the timestamp and sequence number, since the same program material will be repeated again and again.
The program should be invoked as
radio address port [any other options]
Your program should display the RTP SDES information (details see lecture 8) transmitted by the radio station when it changes.
For each 1000 packets starting with a sequence number divisible by 1000, your program should output the accumulated number of packets lost due to being late and the average playout delay. The average playout delay is the average delay between packet arrival and when the content of the packet is handed to the audio device.
There will be a ``radio station'' playing a voice segment on multicast address address 224.2.0.25, port 1234. The voice segment was recorded by rtpdump in Berlin after transmission from Columbia University. If you are off campus, you can play back this sample by creating a loop such as
# while (1) rtpplay -T -b 32.3 -e 73 -f sample.rtp 224.2.0.25/1234/16 end
If you prefer, you can also direct the output of rtpplay to a unicast address.
Additional information about RTP for this assignment is on a separate page.
You might find the following two papers helpful:
The last sender reports for each of the flows contained the following information: for SSRC=1, NTP=123456.4829, RTP-TS=11582265 and for SSRC=2, NTP=123452.2439, RTP-TS=11169321.
You want to playback the two RTP packets with minimum delay so that the two streams are lip-synced. In which order do you need to play them back? What is their playback times and what is the time interval between the two playback times? Draw a time axis with the respective position of the packets.
Note: RTP profiles for audio and video are defined in RFC1890