Jet Player mute masks acting weird


Last Updated:

  1. maest

    maest Member This Topic's Starter

    Joined:
    Aug 5, 2010
    Messages:
    23
    Likes Received:
    2
    I was playing around with the Jet player and I noticed I can't use the mute masks properly.

    Code (Text):
    1.  
    2. public class touchCoord extends Activity {
    3.     boolean muteMask[] = new boolean[1];
    4.     boolean unmuteMask[] = new boolean[1];
    5.     boolean playing, updateSucces;
    6.     TextView log;
    7.     JetPlayer jp;
    8.     /** Called when the activity is first created. */
    9.     @Override
    10.     public void onCreate(Bundle savedInstanceState) {
    11.         super.onCreate(savedInstanceState);
    12.         setContentView(R.layout.main);
    13.        
    14.         //default initialization
    15.         playing = false;
    16.         muteMask[0] = true;
    17.         unmuteMask[0] = false;
    18.        
    19.         //JetPlayer stuff
    20.         jp = JetPlayer.getJetPlayer();
    21.         jp.loadJetFile(getApplicationContext().getResources().openRawResourceFd(R.raw.c1));
    22.         jp.queueJetSegment(0, -1, -1, 0, 0, (byte) 0);
    23.         jp.play();
    24.  
    25.         //finally set the TextView
    26.         log = (TextView) findViewById(R.id.log);
    27.         log.setText("waiting...");
    28.     }
    29.    
    30.     @Override
    31.     public boolean onTouchEvent(MotionEvent e)
    32.     {
    33.         if(e.getAction() == MotionEvent.ACTION_DOWN)
    34.         {
    35.             if(playing)
    36.             {updateSucces = jp.setMuteArray(muteMask, false); playing = false; log.setText("not playing" + Boolean.toString(updateSucces));}
    37.             else
    38.             {updateSucces = jp.setMuteArray(unmuteMask, false); playing = true; log.setText("playing" + Boolean.toString(updateSucces));}
    39.         }
    40.         return true;
    41.     }
    42.    
    43. }
    The setMuteArray method returns false, so it fails.

    The .jet file is pretty simple: 1 segment with only 1 track, no events.

    If in onTouchEvent I use setMuteFlag() instead of the array it works just fine. Is there something wrong in the way I use the array? I can provide the .jet file as well if you need it.
     

    Advertisement

Share This Page

Loading...