Jump to content

  • Log In with Google      Sign In   
  • Create Account

#Actualpolyfrag

Posted 06 April 2013 - 12:47 PM

Why can't I play a sound more than once? What am I doing wrong?

 

 SLresult result = (*fdPlayerSeek)->SetPosition(fdPlayerSeek, 0, SL_SEEKMODE_FAST);
  if(result != SL_RESULT_SUCCESS) 
  { 
    LOGE("SetPosition(0) error %s", file); 
  }

  result = (*fdPlayerPlay)->SetPlayState(fdPlayerPlay, SL_PLAYSTATE_PLAYING);

  if(result != SL_RESULT_SUCCESS) 
  { 
    LOGE("SetPlayState(SL_PLAYSTATE_PLAYING) error %s", file); 
  }

[edit] Oh, needed to make sure it's stopped before seeking.


#2polyfrag

Posted 06 April 2013 - 12:47 PM

Why can't I play a sound more than once? What am I doing wrong?

 

 SLresult result = (*fdPlayerSeek)->SetPosition(fdPlayerSeek, 0, SL_SEEKMODE_FAST);
  if(result != SL_RESULT_SUCCESS) 
  { 
    LOGE("SetPosition(0) error %s", file); 
  }

  result = (*fdPlayerPlay)->SetPlayState(fdPlayerPlay, SL_PLAYSTATE_PLAYING);

  if(result != SL_RESULT_SUCCESS) 
  { 
    LOGE("SetPlayState(SL_PLAYSTATE_PLAYING) error %s", file); 
  }

Oh, needed to make sure it's stopped before seeking.


#1polyfrag

Posted 06 April 2013 - 12:27 PM

Why can't I play a sound more than once? What am I doing wrong?

 

 SLresult result = (*fdPlayerSeek)->SetPosition(fdPlayerSeek, 0, SL_SEEKMODE_FAST);
  if(result != SL_RESULT_SUCCESS) 
  { 
    LOGE("SetPosition(0) error %s", file); 
  }

  result = (*fdPlayerPlay)->SetPlayState(fdPlayerPlay, SL_PLAYSTATE_PLAYING);

  if(result != SL_RESULT_SUCCESS) 
  { 
    LOGE("SetPlayState(SL_PLAYSTATE_PLAYING) error %s", file); 
  }

PARTNERS