[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[developers] JQuran fixes



AA everyone,

2 fixes, one major one minor...

In QuranInst.java:
//private SuraInst[] suralist;
//made static so we can actually store suras (garbage collection would throw away new QuranInsts once addSura() has returned)...
static private SuraInst[] suralist;

In QuranLang.java:
in public String playFile(String audioname, int sura, int ayah, String path)...
//return ((QuranAudio)audio.elementAt(i)).playfile(ayah, sura, path);
//ayah, sura parameter order should be reversed...
return ((QuranAudio)audio.elementAt(i)).playfile(sura, ayah, path);

In addition, directory structure of data is assumed to be as follows by JQuran:
quran/data/ar/ali_hozaify (audio files)
quran/data/ar/quran.ar.xml (quran text)
quran/data/ar/conf.xml

Adding a 'play' option to play the ayahs is no big deal. To test the program as a whole I just added a 'play' option in the file menu, which gets the current sura and ayah and plays the corresponding audio file.

Peace.