cleanup
icons
icons
Part 1 of Sequence/Audio sync fix.

This commit was part of the effects work that had some underlying
changes to move the timer out of E131.c  The actual sync fix
will include converting this from using a timer to a thread using
nanosleep to keep in sync.  Even though this commit adds files
which are going to be removed in the next commit, it was easier
to cherry-pick this commit and apply the newer patch on top than
to have to apply the rest of this patch on top of the thread patch.

Original commit message:

Move the interval timer outside of E131.c.

The interval timer will now be set to fire whenever there is a
sequence of an effect playing.  When the last sequence or effect
ends, one more timer will be set to fire to allow blanking data
to be send to clear all channels back to 0.
Convert to using to a pthread to send light data.

Switch to using a thread to send the sequence data.

The thread is started up whenever a sequence is started.  When
the sequence finishes or is stopped, the thread will stop
automatically.

If the sequence is played along with music, the player code
will check the sync every 3 seconds.  If the sync is off,
the sleep time in the lighting thread will be tweaked slightly
to bring the sync back in line.  Once the sync comes back in
line, the sleep value will be returned back to its calculated
default.

In testing, the sync always starts off by a few frames, but
then is rather quickly pulled back inline by the code described
above.  I believe this is possibly due to audio buffering or issues
during ogg123 startup since we appear to be sending data at the
correct rate during this time.  In my testing on x86_64 hardware
so far, the test sequence sync starts out 3-4 frames out with
the audio being slightly ahead.  Within the first 10 seconds,
the sync returns to normal and stays within 1 frame of sync for
the rest of the sequence.

Committing for further testing before final cleanup of some
debug statements.  Everything appears to be working properly,
but it still needs some burn-in and testing on the Pi.
Lighting thread code tweaks after testing on the Pi.

Change the offset values used when we're out of sync from 500 and
1000 microseconds to 300 and 600.

Check the sync every second.  This happens in the main thread that
is reading in ogg123 data.  The lighting data is being processed in
its own thread and ogg123 is running in its own process, so we can
afford the performance hit in the main program thread to check the
sync once a second.  Doing this, in combination with the above
offset value changes allows my Pi to sync up the 3-4 frame difference
within 6 seconds of startup and the sequence and music stay within
+-1 frame of sync for the remaining duration of the sequence.
Check in a pre-compiled fppd binary into the threaded branch.

This should make testing easier for others since they can
just 'git switch threaded' and restart fppd.
Fixed update to settings file (volume, fppMode)
Merge branch 'master' of https://github.com/FalconChristmas/fpp
Deleted commented code
Lighting thread and sync tweaks.

- Check the result of pthread_create() so we can detect errors starting
  the lighting data thread.
- pthread_detach() the lighting data thread so we don't run out of
  resources triggering an error we would have to detect in the new
  code above.
- Don't bother running the sync code if we're not outputting any
  lighting data.
Merge branch 'threaded' of github.com:FalconChristmas/fpp into threaded
Check in a new compiled fppd binary for people testing this branch.

Includes pthread_create() error checking, pthread_detach() and
sync code optimization to skip sync check for audio-only playlist
entries.
More lighting thread tweaks.

- Extract the data read in E131_Send() out into E131_ReadData() and
  call it at the end of the main loop in the thread.  This way we
  always start off the loop by sending data, then we pre-buffer the
  next frame of data, then we sleep.

- Sync code changes to try to bring lights and sound in sync quicker
When time or date is set via UI the "hwclock -w" command issued to Rasclock.
Merge branch 'threaded'

This commit merges in the changes in the threaded branch which
convert the lighting data timer code to use a thread to allow
better syncing of light and audio.
Commit new fppd binary to use thread to send light data.
Deleted unused functions
Deleted unused function prototypes
Merge branch 'master' into stage

Merge back lighting thread and other changes from master.

Conflicts:
	src/E131.c
	src/E131.h
	src/Makefile
	src/settings.c
	src/settings.h