3 Replies - 470 Views - Last Post: 16 September 2012 - 09:53 PM

#1 Xee2012  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 11
  • Joined: 27-August 12

Playing audio when line drawn on canvas

Posted 16 September 2012 - 09:03 PM

I would really appreciate if someone can help out in playing audio sounds while working on canvas.Soundpools and MediaPlayer classes are used for this but if I try to use them in OnDraw..
line=MediaPlayer.create(GraphicsView.this, R.raw.click);



This argument is not applicable on View Class
Is This A Good Question/Topic? 0
  • +

Replies To: Playing audio when line drawn on canvas

#2 EndLessMind  Icon User is offline

  • These are the droids you're looking for
  • member icon

Reputation: 194
  • View blog
  • Posts: 1,099
  • Joined: 13-March 09

Re: Playing audio when line drawn on canvas

Posted 16 September 2012 - 09:36 PM

Is line defined?
I have no problem getting it to work on any class, so you need to post some more information :)
Was This Post Helpful? 0
  • +
  • -

#3 Xee2012  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 11
  • Joined: 27-August 12

Re: Playing audio when line drawn on canvas

Posted 16 September 2012 - 09:45 PM

Thanks,got it done using SoundPool..
Was This Post Helpful? 0
  • +
  • -

#4 EndLessMind  Icon User is offline

  • These are the droids you're looking for
  • member icon

Reputation: 194
  • View blog
  • Posts: 1,099
  • Joined: 13-March 09

Re: Playing audio when line drawn on canvas

Posted 16 September 2012 - 09:53 PM

I'm glad that you solved it :)
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1