isn't that what I am doing with the above code? Thread t = new Thread() { public void run() { ...
thanks On Oct 5, 8:02 am, Simon Platten <simonaplat...@googlemail.com> wrote: > Hi, > > Why don't you play your audio in one thread and play your animation in > another thread? > > The way you have it now, its single synchronous process. > > Regards, > Simon > > > > On Tue, Oct 5, 2010 at 3:50 PM, ArcDroid <jacobrjohn...@gmail.com> wrote: > > Hello, > > I am trying to play a sound and also show a new picture. The pictures > > are only ~1Kb in size, but it slows down the audio when I add in the > > setImageResource. Is it faster to use an array? I have tried running > > the audio in a new thread, but that doesn't seem to help. > > Thanks > > > private Integer[] mImageIds = { > > R.drawable.gallery_photo_1, > > R.drawable.gallery_photo_2, > > R.drawable.gallery_photo_3, > > R.drawable.gallery_photo_4, > > R.drawable.gallery_photo_5, > > R.drawable.gallery_photo_6, > > R.drawable.gallery_photo_7, > > R.drawable.gallery_photo_8 > > }; > > > private void playsound(final int i){ > > > Thread t = new Thread() { > > public void run() { > > > mp = MediaPlayer.create(getBaseContext(),i); > > mp.start(); > > mp.setOnCompletionListener(new > > OnCompletionListener() { > > public void onCompletion(MediaPlayer > > mp) { > > mp.release(); > > > view.setImageResource(R.drawable.xyz); > > } > > }); > > > }}; > > t.start(); > > } > > > -- > > You received this message because you are subscribed to the Google > > Groups "Android Developers" group. > > To post to this group, send email to android-developers@googlegroups.com > > To unsubscribe from this group, send email to > > android-developers+unsubscr...@googlegroups.com<android-developers%2Bunsubs > > cr...@googlegroups.com> > > For more options, visit this group at > >http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en