IMP - Irrlicht Music Player ( Update: 31-JAN-2018 )
Re: IMP - Irrlicht Media Player •• [UPDATED: 11 SEPT 2011]
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
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
-
- Competition winner
- Posts: 117
- Joined: Wed Jun 30, 2010 8:44 am
- Location: Portugal
- Contact:
Re: IMP - Irrlicht Media Player •• [UPDATED: 11 SEPT 2011]
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)
-
- Competition winner
- Posts: 117
- Joined: Wed Jun 30, 2010 8:44 am
- Location: Portugal
- Contact:
Re: IMP - Irrlicht Media Player •• [UPDATED: 10 NOV 2014] •
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...........)
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...........)
Re: IMP - Irrlicht Media Player •• [UPDATED: 10 NOV 2014] •
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):
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.
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
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
-
- Competition winner
- Posts: 117
- Joined: Wed Jun 30, 2010 8:44 am
- Location: Portugal
- Contact:
Re: IMP - Irrlicht Media Player •• [UPDATED: 10 NOV 2014] •
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"!
"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"!
-
- Posts: 62
- Joined: Mon May 11, 2009 4:31 am
Re: Irrlicht Media Player ••• [UPDATE: 13 NOV 2014] •••
This is absolutely terrific. Nice work Jorgerosa!
-
- Competition winner
- Posts: 117
- Joined: Wed Jun 30, 2010 8:44 am
- Location: Portugal
- Contact:
Re: Irrlicht Media Player ••• [UPDATE: 13 NOV 2014] •••
Thankyou pilesofspam!pilesofspam wrote:This is absolutely terrific
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!
-
- Competition winner
- Posts: 117
- Joined: Wed Jun 30, 2010 8:44 am
- Location: Portugal
- Contact:
Irrlicht Media Player Xmas
Merry Christmas to everyone !!!
• 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.
Re: Irrlicht Media Player ••• [UPDATED] •••
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
-
- Competition winner
- Posts: 117
- Joined: Wed Jun 30, 2010 8:44 am
- Location: Portugal
- Contact:
Re: IMP - Irrlicht Media Player [13-Dec-2017]
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
.
- 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
.
Re: IMP - Irrlicht Media Player [13-Dec-2017]
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
-
- Competition winner
- Posts: 117
- Joined: Wed Jun 30, 2010 8:44 am
- Location: Portugal
- Contact:
Re: IMP - Irrlicht Media Player [13-Dec-2017]
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!
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!
Re: IMP - Irrlicht Music Player ( Update: 31-JAN-2018 )
It should be easy to get the missing dlls, BUT..
Its better you pack them into your software package when you release it.
Its better you pack them into your software package when you release it.
Re: IMP - Irrlicht Music Player ( Update: 31-JAN-2018 )
I've just downloaded it and it's wonderful! Good job. I love the details you put into this!