GithubHelp home page GithubHelp logo

imaginaryplayer's Introduction

Imaginary Player

The Imaginary Player application is built for educational purposes. The player is a text-based (console) application which streams imaginary music (text) to the console.

Definitions

Tracks

Each track is encoded as a .txt file. Each file content both metadata and content.

Example:

title I Don't Want to Miss a Thing
artist Aerosmith
codec mp3
duration 500
content I could stay awake just to hear you breathin'

Playlists

Each playlist is encoded as a .txt file. Each file contain information of the playlist with respect to the structure:

  • First line: playlist's name.
  • Second line: description.
  • From 3rd line, each line contain a path (can be relative path or absolute path) to a track.

Example:

Playlist 1
This is the first playlist
tracks/track1.txt
tracks/track2.txt
tracks/track3.txt
tracks/track4.txt

Commands

Text-based player receives command from keyboard input.

  • 'H', '?': print help
  • 'N' : import playlist from file
  • 'Z' : play
  • 'X' : pause
  • 'D' : next track
  • 'A' : previous track
  • 'S' : shuffle/unshuffle
  • 'R' : change repeat mode (none/repeat all/repeat currentsong)
  • 'I' : current playlist info
  • 'Q' : quit

Overall design

The application consists of two threads:

  • The first thread receives commands (e.g. play, pause) from keyboard input and sends signal to the second one.
  • The second thread streams tracks to std::cout.

Build project

The project requires C++17 and MSVC 17.4.5 for the Windows build.

mkdir build
cd build
cmake ..
cmake --build .

Demo

Link to the demo video: https://youtu.be/H4RiD5uz6fk

imaginaryplayer's People

Contributors

viceclone 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.