Commit Graph

115 Commits

Author SHA1 Message Date
Branden Archer
6901745d5b Pass received audio samples to the AudioPlayer for processing
Whenever a sample is received from the socket, pass it to
the AudioPlayer thread via a blocking queue. The AudioPlayer
thread will then play the sample and wait for more input.
2015-12-26 17:51:22 -05:00
Branden Archer
8bcfe2af67 Add AudioPlayer thread for playing audio samples from a queue
This thread will be used for playing audio samples. The samples
will be provided by a blocking queue.

It is assumed that the configuration of the passed AudioTrack and
the samples from the blocking queue are compatible.
2015-12-26 17:51:22 -05:00
Branden Archer
936410e851 Receive audio from ProtectBabyMonitor, discarding it
When connected to a ProtectBabyMonitor service, accept
audio over the network. However, for now, discard the audio
instead of playing it.
2015-12-26 17:51:21 -05:00
Branden Archer
00049d4b2f Allow launch of ListenActivity from found ProtectBabyMonitor service
If any ProtectBabyMonitor services are found on the network, clicking
on one will start a ListenActivity with information on the service.
2015-12-26 17:51:21 -05:00
Branden Archer
2e164c0fb2 Add ListenActivity for playing audio from ProtectBabyMonitor services
This activity will eventually receive audio from the MonitorActivity
of another Android device and play it.
2015-12-26 17:51:21 -05:00
Branden Archer
1f7f6f04fe Populate list with ProtectBabyMonitor providers 2015-12-26 17:51:21 -05:00
Branden Archer
8d448d0ecc Discover ProtectBabyMonitor service providers on the network
Attempt to discover any providers of the ProtectBabyMonitor
service on the local network, resolving any which are found.
For now nothing is done with the information on found
providers.
2015-12-26 17:51:21 -05:00
Branden Archer
eb9cd75c3a Add DiscoverActivity - lists of baby monitors on the network
This is the stub of the DiscoverActivity, which is responsible for
discovering all available ProtectBabyMonitor services on the
local network.
2015-12-26 17:51:21 -05:00
Branden Archer
4635a78574 Set the TCP send buffer size to avoid buffering audio
If the send buffer size is large and the receiver is unable
to keep up, then audio samples will collect on the monitor
and lag will accumulate. As only the most recent sample is
important, reduce the send buffer size to the minimum
AudioRecord buffer size.
2015-12-26 17:51:16 -05:00
Branden Archer
828e6a16f6 Stream audio data to connected clients
While connected, send packets of audio data to connected clients.
2015-12-26 17:50:33 -05:00
Branden Archer
7819c31275 Stub for servicing connection to ProtectBabyMonitor service
If a client connects to the advertised ProtectBabyMonitor service,
attempt to service the connection.

For now, simply close the connection instead of sending data.
2015-12-26 15:49:17 -05:00
Branden Archer
716d82dc1c Register ProtectBabyMonitor service via mDNS
When the MonitorActivity is started it will create a ServerSocket.
The assigned port is then advertised over mDNS for a
"ProtectBabyMonitor" service.

Eventually, when something connects to the ServerSocket audio
data will be streamed out.
2015-12-26 15:49:17 -05:00
Branden Archer
11bf3822b6 Add MonitorActivity - for registering on network and sending audio
This commit adds the shell of the MonitorActivity. This activity
will register its service on the local network, wait for a connection,
then send audio data.
2015-12-26 15:49:12 -05:00
Branden Archer
7bd19f2325 Add StartActivity - landing page of baby monitor
The StartActivity is the first activity which will be launched
in the baby monitor, and in the future will list the two main
options: become a monitor or a listener.
2015-12-26 15:48:42 -05:00
brarcher
8b1b1a7414 Initial commit 2015-12-26 13:23:26 -05:00