ple. Thus, if the frequency of capture is 11,025
Hz, the function is executed 11,025 times per sec-
ond. Furthermore, this function is implemented
with two SQRT calls and a multiplication using
floating point arithmetic. By joining different lin-
eal functions, a new, much less complex function
replaces the original one with minimum error.
4 AUDIO STREAMING
Audio streaming allows users to play audio without
previously downloading an audio file. They simply
listen to the audio data as they receive it.
A user can start a live streaming session by mak-
ing a RTSP
2
(Schulzrinne et al., 2002) request to the
streaming server for the required SDP file
3
. As soon
as the streaming server receives the request, the user
can begin to receive RTP packets sent by the PDA ap-
plication and listen to the audio.
4.1 Real-Time Transport Protocol
(RTP)
RTP (Schulzrinne et al., 1996) (Schulzrinne, 1996)
is suitable for real time transmissions, like audio or
video. It usually runs on top of UDP protocol, so
it does not guarantee quality delivery service. This
means packets can be lost or disordered, however it
does provide a way to detect these events.
RTP uses an auxiliary control protocol (RTCP),
which provides feedback about service quality, and
basic user information.
The application developed has a basic unicast im-
plementation, in order to consume the lowest cpu
power. As mentioned in Section 3, StrongARM cpu
power is poor. RTCP has also been implemented, but
seems to be unnecessary. RTCP allows the stream-
ing server to know whether a user is active; if a user
doesn’t send RTCP packets to the streaming server,
the server stops sending him RTP packets. However,
in this service the streaming server doesn’t actually
need to receive RTCP packets to know the encoder ap-
plication is active, because the streaming server is al-
ready receiving the RTP packets. As a result, the ser-
vice also works without sending RTCP packets. Fur-
thermore, RTCP packets sent by the streaming server
are also unnecessary (see (Schulzrinne et al., 1996)
for more details).
2
Real-Time Streaming Protocol
3
SDP files are used for live streaming sessions in Quick
Time Streaming Server and they are also compatible with
Real Helix Server.
4.2 Session Description Protocol
(SDP)
SDP (Handley and Jacobson, 9968) is necessary for
the streaming server to receive the audio packets and
reflect them to clients. It is also necessary in order for
the clients to be able to request from the streaming
server live streaming audio packets.
The application developed generates the SDP file
needed to start a live streaming session.
5 IMPLEMENTATION DETAILS
Fig. 4 shows how the service implementation works.
It has been simplified for better understanding. For
instance, it doesn’t show how it treats RTCP packets
or mp3 files.
The application is multithreaded and uses synchro-
nization between threads. First of all, there is a thread
that captures audio samples using API functions. It
saves blocks of samples in a buffer and signals an-
other thread which compresses the audio samples of
the shared buffer. When the audio compression fin-
ishes, it stores mp3 frames in another buffer, and sig-
nals a final thread whose task is to generate RTP pack-
ets containing the mp3 frames and send them to the
streaming server.
This behaviour corresponds to ideal conditions. If
conditions are degraded, such as a degradation of the
available bandwidth or CPU, then the buffers will
fill. At this point the auto-bitrate mode will start to
operate, if it is activated, changing the bitrate to a
lower value if a degradation appears. This has two
advantages, the mp3 compression is faster and the
bandwidth requirement descends. On the contrary, if
the buffers are nearly always empty, the auto-bitrate
mode will change the bitrate to a higher value in or-
der to get more audio quality. So, in fact, this option
provides the best audio quality for the available band-
width at all times.
Development for Pocket PC (Microsoft O.S. for
PDAs) (Grattan and Brain, ) is slower than for Win-
dows O.S. This is mainly because the source code is
written in the Embedded Visual Tools environment
and then the binaries are generated and downloaded
to the PDA. This process is necessary each time the
source code is changed in order to test the execution
in the PDA. There is also a Pocket PC emulator for
Windows, but is unable to emulate all the PDA func-
tions, for example some communication functions.
ICETE 2004 - WIRELESS COMMUNICATION SYSTEMS AND NETWORKS
348