Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Presenting MusicManager! The complete music system for you and your projects!  (Read 3795 times)

0 Members and 1 Guest are viewing this topic.

Yatan vesh

  • Newbie
  • *
  • Posts: 17
  • Get busy livin',or get busy dyin'
    • View Profile
Presenting Music Manager for you and your SFML projects! Its easy to use and sets up in minutes! :D
It works just like the one we see in racing games like Need for Speed!

                                                                    ...::The Music Manager::...




Here I'm using it in a Snake game i made :)
It loads all the tracks automatically,changes track automatically and end button changes current track.
The Music player searches and loads tracks in the "Music" folder by default. However, that can be changed using the constructor(see readme).

Github link:
https://github.com/Yatanvesh/MusicManager

important:read file rules in readme.txt

How to import:
1.Place all the files in your Project folder.
2.Import the MusicManager.cpp and MusicManager.h in your Project.
3.Create an object of the claas MusicManager and pass your renderwindow as an argument to the constructor.
MusicManager,by default will look for music files in Music/ folder of your project. However, you can change this by passing a second argument
to the constructor, a string with the location of music files.
4.use the function obj.Handler() in your main game loop and obj.DisplayPlayer() to draw the player.
5. You are done!!

Any suggestions and improvements will be cherished!
« Last Edit: December 24, 2015, 01:18:10 pm by Yatan vesh »

Jesper Juhl

  • Hero Member
  • *****
  • Posts: 1405
    • View Profile
    • Email
Somewhat similar to my Jukebox class :)
https://github.com/SFML/SFML/wiki/Source:-Jukebox

Yatan vesh

  • Newbie
  • *
  • Posts: 17
  • Get busy livin',or get busy dyin'
    • View Profile
I checked it out. Whoa dude that code went wayyyy above me! That is much more advanced than the one i implemented!

Jesper Juhl

  • Hero Member
  • *****
  • Posts: 1405
    • View Profile
    • Email
I'm sorry it went over your head. I actually think it's fairly straight forward C++11 code.
I read through your implementation and my impression is that my version is somewhat of a generalization of yours but not really all that different. They both solve the same basic problem.

Yatan vesh

  • Newbie
  • *
  • Posts: 17
  • Get busy livin',or get busy dyin'
    • View Profile
High school c++ books suck. Well I'll get started on these concepts and maybe then i'll see things more clearly. Thanks for your interest jesper.

 

anything