Hi, first of all, congratulations for this great project.
I write regarding a problem in playing a midi with loop. Currently midi music don't loop. The file microemu-midp/src/main/java/javax/microedition/media/MidiAudioPlayer.java is not implementing this correctly. MIDP says that calling setLoopCount() with a value of -1 should make the music to loop. The changes to allow this are easy; in that file, change this:
public void meta( MetaMessage event )
{
if (event.getType() == 47) //End of Track type
{
iLoopCount--;
if( iLoopCount > 0 )
{
by this
public void meta( MetaMessage event )
{
if (event.getType() == 47) //End of Track type
{
if (iLoopCount > 0)
iLoopCount--;
if( iLoopCount > 0 || iLoopCount == -1)
and it will work :)
Thank you.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, first of all, congratulations for this great project.
I write regarding a problem in playing a midi with loop. Currently midi music don't loop. The file microemu-midp/src/main/java/javax/microedition/media/MidiAudioPlayer.java is not implementing this correctly. MIDP says that calling setLoopCount() with a value of -1 should make the music to loop. The changes to allow this are easy; in that file, change this:
public void meta( MetaMessage event )
{
if (event.getType() == 47) //End of Track type
{
iLoopCount--;
if( iLoopCount > 0 )
{
by this
public void meta( MetaMessage event )
{
if (event.getType() == 47) //End of Track type
{
if (iLoopCount > 0)
iLoopCount--;
if( iLoopCount > 0 || iLoopCount == -1)
and it will work :)
Thank you.
Thanks for the fix, it is commited to the SVN trunk.