callback progress when stop seeking

dev
xufuji456 3 years ago
parent 5a4773b338
commit b9b2d4aab9
  1. 2
      app/src/main/java/com/frank/ffmpeg/activity/AudioEffectActivity.kt
  2. 8
      app/src/main/java/com/frank/ffmpeg/adapter/EqualizerAdapter.kt

@ -31,7 +31,7 @@ class AudioEffectActivity : AppCompatActivity(), OnSeeBarListener {
companion object {
private val TAG = AudioEffectActivity::class.java.simpleName
private val AUDIO_PATH = Environment.getExternalStorageDirectory().path + "/heart.mp3"
private val AUDIO_PATH = Environment.getExternalStorageDirectory().path + "/know_play.mp3"
}
private var mPlayer: MediaPlayer? = null

@ -43,9 +43,9 @@ class EqualizerAdapter(private val context: Context, private val onSeeBarListene
holder.barEqualizer.setOnSeekBarChangeListener(object : SeekBar.OnSeekBarChangeListener {
override fun onProgressChanged(seekBar: SeekBar, progress: Int, fromUser: Boolean) {
if (fromUser) {
onSeeBarListener?.onProgress(i, progress)
}
// if (fromUser) {
// onSeeBarListener?.onProgress(i, progress)
// }
}
override fun onStartTrackingTouch(seekBar: SeekBar) {
@ -53,7 +53,7 @@ class EqualizerAdapter(private val context: Context, private val onSeeBarListene
}
override fun onStopTrackingTouch(seekBar: SeekBar) {
onSeeBarListener?.onProgress(i, seekBar.progress)
}
})
}

Loading…
Cancel
Save