Giter VIP home page Giter VIP logo

rposx's Introduction

Introduction

Radio Paradise is a unique blend of many styles and genres of music, carefully selected and mixed by two real human beings โ€” enhanced by a dazzling photo slideshow, tied in thematically with the songs that are playing. There's nothing else that's quite like it.

The Application

This is an OS X client for Radio Paradise. It is derived from the iOS app for radio paradise (also open source).

The app is currently published on the Mac App Store. If you only ned the executable, grab it from there.

The code

The code is almost the same of the iOS version and is based on AVPlayer, that manage all the audio play (both "standard" and PSD).

Main Controller

The main controller is RPWindowController. Code is hopefully easy to follow. There are 3 AVPlayer objects to manage the main stream and the PSD stream (PSD needs two object to manage the "PSD to PSD transition"), state transitions for the streams are managed via KVO.

Metadata about the played song are taken directly from radio paradise (not from the stream metadata, because AVPlayer do not supports that for network streams), a NSTimer handles the task (in -[metatadaHandler:timer]). Another NSTimer manages the load of the images for the HD stream (in -[loadNewImage:timer]). PSD play is triggered and managed here. The "return" from the PSD is also timer-triggered.

The management of UI state and stream start is via KVO.

The main controllers also tries to manage the fading between the main stream and the PSD streams. Unfortunately volume controls (and therefore the fading) don't work on main stream. This is a know limitation of AVPlayer (cfr. Apple's qa1716 ). The fading work on the PSD songs.

The application logs heavily when DLog() (defined in RadioParadise-Prefix.pch) is set to have output. Be aware to not distribute the application with logging on (it's really, really verbose).

Acknowledgements

This application uses code from:

STKeyChain by Buzz Andersen PiwikTracker by Mattias Levin iRate by Nick Lockwood.

The latest are included as submodules from my forks.

rposx's People

Contributors

iltofa avatar cgommel avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.