1. Are you ready for the Galaxy S20? Here is everything we know so far!

Jet Player mute masks acting weird

Discussion in 'Android Development' started by maest, Aug 11, 2010.

  1. maest

    maest Newbie
    Thread Starter

    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.
     


Loading...
Similar Threads - Jet Player mute
  1. App Update
    Replies:
    0
    Views:
    60
  2. pixelplayer8
    Replies:
    1
    Views:
    113
  3. App Update
    Replies:
    0
    Views:
    88
  4. ujjawal49
    Replies:
    0
    Views:
    190
  5. NogginMan
    Replies:
    5
    Views:
    573
  6. App Update
    Replies:
    0
    Views:
    160
  7. triplemaya
    Replies:
    11
    Views:
    484
  8. App Update
    Replies:
    0
    Views:
    224
  9. sgtk
    Replies:
    1
    Views:
    274
  10. maciek2048
    Replies:
    8
    Views:
    2,160

Share This Page

Loading...