OSX: Added segments to loops.

- Added segment concept to loops. Implemented segments in player, not
tested yet.
Updated project files with new files.

- Did not include these changes in the last commit to test Jenkins and
make sure unstable builds do not make it to the master branch.