I was playing around with the Jet player and I noticed I can't use the mute masks properly.
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.
Code:
public class touchCoord extends Activity {
boolean muteMask[] = new boolean[1];
boolean unmuteMask[] = new boolean[1];
boolean playing, updateSucces;
TextView log;
JetPlayer jp;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
//default initialization
playing = false;
muteMask[0] = true;
unmuteMask[0] = false;
//JetPlayer stuff
jp = JetPlayer.getJetPlayer();
jp.loadJetFile(getApplicationContext().getResources().openRawResourceFd(R.raw.c1));
jp.queueJetSegment(0, -1, -1, 0, 0, (byte) 0);
jp.play();
//finally set the TextView
log = (TextView) findViewById(R.id.log);
log.setText("waiting...");
}
@Override
public boolean onTouchEvent(MotionEvent e)
{
if(e.getAction() == MotionEvent.ACTION_DOWN)
{
if(playing)
{updateSucces = jp.setMuteArray(muteMask, false); playing = false; log.setText("not playing" + Boolean.toString(updateSucces));}
else
{updateSucces = jp.setMuteArray(unmuteMask, false); playing = true; log.setText("playing" + Boolean.toString(updateSucces));}
}
return true;
}
}
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.