IMP - Irrlicht Music Player ( Update: 31-JAN-2018 )

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
CuteAlien
Admin
Posts: 9628
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: IMP - Irrlicht Media Player •• [UPDATED: 11 SEPT 2011]

Post by CuteAlien »

Nice screen :-)
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
jorgerosa
Competition winner
Posts: 117
Joined: Wed Jun 30, 2010 8:44 am
Location: Portugal
Contact:

Re: IMP - Irrlicht Media Player •• [UPDATED: 11 SEPT 2011]

Post by jorgerosa »

Ok, after the source files being at: megaupload (is down now)... then... rapidshare (removed the file, requires a payment after trial (!!??)), etc, etc... And because I hate broken urls too... Decided to create a project page at sourceforge --> URL: http://sourceforge.net/projects/irrlichtmp (1st post here, will be always updated too)
jorgerosa
Competition winner
Posts: 117
Joined: Wed Jun 30, 2010 8:44 am
Location: Portugal
Contact:

Re: IMP - Irrlicht Media Player •• [UPDATED: 10 NOV 2014] •

Post by jorgerosa »

Hi guys! Long time ago. I´m older by now, but I´m happy cause you all are older too and... uglier! Jesus!
Ok, I´ve (finally) realesed Irrlicht Music Player v.1.0 - https://sourceforge.net/projects/irrlichtmp
And don´t forget... Have fun!

- And you know... Help is welcome!
- I would like to sync cameras and lights with sound (But I need another life for that, I´ve lost my last one playing Battlefield...........)
CuteAlien
Admin
Posts: 9628
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: IMP - Irrlicht Media Player •• [UPDATED: 10 NOV 2014] •

Post by CuteAlien »

Cool effects. Lot of nice stuff you did with camera and shaders there!

Some help (maybe):

You have a bug in 64-bit systems in line 1853. That calculation will return 16 (as ppEffects are pointers which are 64-bit per pointer while int has a size of 32 bit):

Code: Select all

 
int ftx = sizeof(ppEffects) / sizeof(int); // get Array total size
 

Generally using constant numbers (like 8 for array-size) is not a good idea. Programmers call them magic numbers. Prefer using constants instead of numbers whenever you can. It avoids a lot of errors.

Also prefer working with classes like std::vector or irr::core::array (I would use std::vector). That's a lot easier to work with than fixed-size arrays. You use them already a lot - why do you avoid them in some cases? I don't think you need a fixed-size array in your code at all (at least the places I did see on a quick view all looked like they would be better replaced by std::vector's).

If you have 2 arrays for the same thing it's often a hint that you could use a struct or class instead to put those together (for example CEffectPostProc* and std::string). That again then allows you to do stuff like cleaning up memory automatically later on.

You should use more classes instead of one long main function - it's hard to read right now. Start by adding a main application class. Then you can already move variables like musicList into that class. Once you did that you can split the main function up and for example put all the stuff from "RETRIEVE MUSIC + LYRICS FILES, FROM FOLDER" into a member function which just fills those variables. That gives you 2 advantages - first you might call the function again from another place. You might even give it a variable parameter as path and then users can later chose their own folder. And second variables which are only needed in that function like "dir" are then only no longer visible from everywhere. Reducing the scope of variables will make your code easier to maintain.

Later on you will likely split up the application class again into more classes, but starting with one already will help you to see which variables need to be accessed from everywhere and which are only needed locally in some functions. Another useful struct/class would likely be one for settings for example. And maybe one for animations (forward, speed and a function pointer). Animation stuff would also be a prime candidate to put into another file (if you want to keep the c-style there you can use "extern" in that files header to access it from another file and you can use "static" in the .c file to ensure all global variables like anim_forward5 are only accessible within that file).

Ah well... I wish I could help more, but have to start with my own work now :-)

One last hint - you might want to use a style where loops are better visible. If you have Unix you can install astyle and run: astyle --indent=tab --indent-switches -p -b main.cpp
That will give you a style very similar to what Irrlicht uses.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
jorgerosa
Competition winner
Posts: 117
Joined: Wed Jun 30, 2010 8:44 am
Location: Portugal
Contact:

Re: IMP - Irrlicht Media Player •• [UPDATED: 10 NOV 2014] •

Post by jorgerosa »

Hi CuteAlien.
"Cool effects. Lot of nice stuff you did with camera and shaders there!" - Thanks, mostly are adapted snippets from irrlicht forum, etc, etc, etc...
"You have a bug in 64-bit systems in line 1853" - Ops! I have to fix that. (Where is my hammer?....)
"You should use more classes instead of one long main function" - I´m only keep it simple and "human readable" for other people to add their code too. I tought if I have many ".cpp" files, could be hard for others to see "how stuff works". That´s why I have comments everywhere too. I´m only see how far can I go too... BUT yes! I really need to do that, also optimize and clean the code.
"If you have Unix" - I´m only using MSWindows, but I really want to run this thing in GNU/Linux (I´ll have to replace audiere, I´m already think to replace it by SDL, seems to be too much for having audio only, but its quite simple (I´ve already compiled and used SDL in Linux with no issues in other software) and licences are similar to the Irrlicht one...)
Thanks for explain stuff and for all the tips too. I´ll follow your guidelines indeed. After all, aliens have bigger brain than humans...
I´m working in other stuff, but since I have time "I´ll be back"! :)
pilesofspam
Posts: 62
Joined: Mon May 11, 2009 4:31 am

Re: Irrlicht Media Player ••• [UPDATE: 13 NOV 2014] •••

Post by pilesofspam »

This is absolutely terrific. Nice work Jorgerosa!
jorgerosa
Competition winner
Posts: 117
Joined: Wed Jun 30, 2010 8:44 am
Location: Portugal
Contact:

Re: Irrlicht Media Player ••• [UPDATE: 13 NOV 2014] •••

Post by jorgerosa »

pilesofspam wrote:This is absolutely terrific
Thankyou pilesofspam! :)
Just updated to V.1.2 (a few moments ago). Now the band, auto changes, if it was set in the same ".lyrics" music file.
Have fun!
jorgerosa
Competition winner
Posts: 117
Joined: Wed Jun 30, 2010 8:44 am
Location: Portugal
Contact:

Irrlicht Media Player Xmas

Post by jorgerosa »

Image

:roll: Merry Christmas to everyone !!! :roll:
• IMP (Irrlicht Music Player) Its NOT compiled with the lattest Irrlicht (V.1.8.3)... But I hope have it done very soon...
• All source code is there too, in the download "zip" file... As always...
LICENCE:
1) You, your kids, and all your family MUST have fun with this little piece of... software...
2) Its OBLIGATORY that you sing something (karaoke) for them all, (so they could laught hard)... C´mon dudes... Its xmas!!...

IMP --- Download ---> http://sourceforge.net/projects/irrlichtmp

OFF-TOPIC: Not exactly Irrlicht related, but since its christmas, here it goes anyway...
1) A quiz game made in flash, great for all family (works in any web browser too)
FlaQuizTV --- Download ---> https://sourceforge.net/projects/flaquiztv
2) And... One tool you may need to convert your media (audio & video) that I developed for myself, but could be usefull for you too.
UEMMC --- Download ---> https://sourceforge.net/projects/uemmc
Last edited by jorgerosa on Sun Dec 20, 2015 9:42 pm, edited 5 times in total.
Mel
Competition winner
Posts: 2292
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Re: Irrlicht Media Player ••• [UPDATED] •••

Post by Mel »

Great work :) I am curious as if it would be possible to include video reproduction as another feature.
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
jorgerosa
Competition winner
Posts: 117
Joined: Wed Jun 30, 2010 8:44 am
Location: Portugal
Contact:

Re: IMP - Irrlicht Media Player [13-Dec-2017]

Post by jorgerosa »

Hello all... Again! :)

- I´ve just updated "IMP - Irrlicht Music Player". It´s now with the new Irrlicht 1.8.4 (Thanks CuteAlien for your hard work!)
- I´ve improved small stuff and fixes
- Its easy to compile it. Still the binaries ("exe" files) are there too, in the "bin" directory
- Its fully portable, no need to install anything
- ALL source code + ALL libraries are there. And if you have Code::Blocks (Win32 / GCC compiler), just open the "main.cbp" file there and compile it (all libraries paths are relative, so should be correct in any computer)

Mel: (...) "include video reproduction as another feature" (...) - I´ve been thinking about that too. I´ll try to change later from audiere lib to ffmpeg lib ;)

Download: https://sourceforge.net/projects/irrlichtmp

.
Mel
Competition winner
Posts: 2292
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Re: IMP - Irrlicht Media Player [13-Dec-2017]

Post by Mel »

If libtheora is as easy to use as libvorbis, i'm pretty sure it will be ready in no time for that codec :)
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
jorgerosa
Competition winner
Posts: 117
Joined: Wed Jun 30, 2010 8:44 am
Location: Portugal
Contact:

Re: IMP - Irrlicht Media Player [13-Dec-2017]

Post by jorgerosa »

Merry Christmas to everyone!
Note: I´ve just updated "IMP - Irrlicht Music Player" with some new christmas musics too.
( Mostly to entretain the kids in this season... I realy need to! )
Download it here --> https://sourceforge.net/projects/irrlichtmp
Have fun! :) :) :)
Vectrotek
Competition winner
Posts: 1087
Joined: Sat May 02, 2015 5:05 pm

Re: IMP - Irrlicht Music Player ( Update: 31-JAN-2018 )

Post by Vectrotek »

It should be easy to get the missing dlls, BUT..
Its better you pack them into your software package when you release it.
Image
PioBeat
Posts: 4
Joined: Wed Aug 22, 2012 6:48 am

Re: IMP - Irrlicht Music Player ( Update: 31-JAN-2018 )

Post by PioBeat »

I've just downloaded it and it's wonderful! Good job. I love the details you put into this! :)
Post Reply