Am not a music enthusiast, but when I got to listen to it, I need the song. Although I do have an MP3 player, I am fond of internet radio.. live365, pandora, raaga.com, dishant.com et al. Most of them work flawlessly on Linux.. but some Indian Bollywood radios seem to fail pathetically. I always thought that it would be some compatibility issue since they seem to work fine on Windows. Incidentally, few days back I started firefox from the terminal(well.. i generally click on the icon) and wistfully tried playing a song from raaga.com. (Firefox on wine is really frustrating). Of course.. nothing happened, but I found a SEGFAULT reported to the terminal... this was the beginning of a big adventure :)
I googled out the issue and found that someone had found the issue and interestingly enough posted the solution on bugzilla long ago. I downloaded the latest tar ball and saw that the errors were not yet fixed! Big deal I thought.. lemme compile the code myself. There were no INSTALL or READMEs in the directory.. but there was a Makefile... I didn't care to look into the makefile and just called make. That didn't work.. I found that Makefile called individual makefiles in hundreds of subdirectories and those makefiles were not there in the subdirectories!! This is where the "real" fun began.
I have to give you a brief idea of the helix project on Linux(Real's backend) before I can proceed further.
I had to become a Helix community member, set up CVS access to the repository, accept all the BEULA craphola(I am not allowed to fix bugs and let people have it even though its free), spend countless hours debugging the substandard code and build it. The whole code base has tell tale signs of cut paste code, unnecessary optimization and non standard C++. I was messing up with the latest stable release when one of the Real developers informed me that the branch was dead!! I got one of those nightly builds that had fixed few, but not all, of the issues. I then quickly made the changes and got the thing to build. The most stupid errors were the ones where the variables were used without definition inside a #ifdef clause, casting a boolean into integer etc.
To cut the long story short, Raaga.com now works with firefox on Linux!!! and no unfortunately I cant give you the binary, you have to build it yourself.. RealPlayer's license needs another entry. It is clearly an example of __evil__ open source (The good one being GPL of course). I cant check in the code cuz I was not authorized to modify them at the first place.
Anyhoo.. the songs sound so much more melodious now :)...
PS: A developer asked me to submit a patch. If all goes well, then the whole Linux desi community would soon be thanking me :P
PPS: My patch is accepted. You can download the nightly build by tomorrow.. or wait for the next release. It will be a part of the next release... Yay!!
PPPS: Download the latest binaries here.
I googled out the issue and found that someone had found the issue and interestingly enough posted the solution on bugzilla long ago. I downloaded the latest tar ball and saw that the errors were not yet fixed! Big deal I thought.. lemme compile the code myself. There were no INSTALL or READMEs in the directory.. but there was a Makefile... I didn't care to look into the makefile and just called make. That didn't work.. I found that Makefile called individual makefiles in hundreds of subdirectories and those makefiles were not there in the subdirectories!! This is where the "real" fun began.
I have to give you a brief idea of the helix project on Linux(Real's backend) before I can proceed further.
- Its a mixture if highly convoluted C and C++ code. The building process is handled by a python script called Umake (which is used for cross platform compilation).
- The same blob can be compiled into helix server, helix client, real player.. etc etc. There are 32 different project into which you can compile the source code into.
- There are 634 build targets!!
- This whole setup reads another configuration parameter to know the destination build system.. including most almost all versions of Windows, Unix and linux.
- I'd leave the maths up to you.
I had to become a Helix community member, set up CVS access to the repository, accept all the BEULA craphola(I am not allowed to fix bugs and let people have it even though its free), spend countless hours debugging the substandard code and build it. The whole code base has tell tale signs of cut paste code, unnecessary optimization and non standard C++. I was messing up with the latest stable release when one of the Real developers informed me that the branch was dead!! I got one of those nightly builds that had fixed few, but not all, of the issues. I then quickly made the changes and got the thing to build. The most stupid errors were the ones where the variables were used without definition inside a #ifdef clause, casting a boolean into integer etc.
To cut the long story short, Raaga.com now works with firefox on Linux!!! and no unfortunately I cant give you the binary, you have to build it yourself.. RealPlayer's license needs another entry. It is clearly an example of __evil__ open source (The good one being GPL of course). I cant check in the code cuz I was not authorized to modify them at the first place.
Anyhoo.. the songs sound so much more melodious now :)...
PS: A developer asked me to submit a patch. If all goes well, then the whole Linux desi community would soon be thanking me :P
PPS: My patch is accepted. You can download the nightly build by tomorrow.. or wait for the next release. It will be a part of the next release... Yay!!
PPPS: Download the latest binaries here.
u have all the time in the world to waste huhh ...:D
ReplyDelete@Shantanu: hmm.. better than your stupid video games :P.. plus I get the bragging rights.
ReplyDeletenice work dude..
ReplyDeleteI apprecite it.
I'll try to build one. I hope you can help in the process of building if i face any issues.
crazy stuff.. u would go way beyond to get your things to work.. hmmm..i have seen so many blogs of yours.. they are way too over my head!!! keep it up.. good to read your achievements!!!
ReplyDelete@Vinay : Thanks for the compliments. Its not only the compensation to get the thing working but also the fact that fixing a trivial bug can help about a million users to listen to radio.. plus all these ppl will have the code written by me on their machines.. even the ones on windows cuz the code base is the same.. The realization that all the real player users will have my code on their machine gives a big kick.
ReplyDeletequite an achievement ...
ReplyDelete@nishesh: fixing typo is not an achievement :P
ReplyDeleteYa, Still fixing typos are the biggest headache for computer professionals... And its surprising to see so many flaws just because of a casual coding typos/flaw somewhere in the software.
ReplyDeletegud work, sridhar.. :)
ReplyDeletei tested the nightly build (20/05) with raaga and it worked great..
i then tried dishant.com which is similar to raaga, but for some reason, that did not work..
any clues?
@Sambit: Works fine on mine.. Try posting the error message on helix-client-dev@helixcommunity.org.. a console output would help.
ReplyDelete@Sridhar
ReplyDeleteI sent a mail to helix-client-dev@helixcommunity.org with the console messages that are seen when I try to play a song from dishant.com
The mail is waiting for an approval by the moderator. I have not subscribed to the helix-client-dev list.