Open thedroiddiv opened 1 year ago
Describe the bug Output samples per second is 10 irrespective of the preferredSamplesPerSecond given
preferredSamplesPerSecond
To Reproduce Steps to reproduce the behavior:
object AudioManager { private lateinit var amplituda: Amplituda fun getAmplitudes(context: Context, audioFilePath: String): Pair<List<Int>, Long> { if (!::amplituda.isInitialized) { amplituda = Amplituda(context) } var amplitudes = listOf<Int>() var duration = 0L amplituda.processAudio(audioFilePath, Compress.withParams(Compress.AVERAGE, 50)) .get({ amplitudes = it.amplitudesAsList() Log.d("TAG", "getAmplitudes: ${it.amplitudesForSecond(1).size}") duration = it.getAudioDuration(AmplitudaResult.DurationUnit.MILLIS) }, { e -> Log.e("AudioManager::", "getAmplitudes: ", e) }) return Pair(amplitudes, duration) } }
Expected behavior Expected Log: getAmplitudes: 50
getAmplitudes: 50
Screenshots If applicable, add screenshots to help explain your problem.
Smartphone (please complete the following information):
Describe the bug Output samples per second is 10 irrespective of the
preferredSamplesPerSecond
givenTo Reproduce Steps to reproduce the behavior:
Expected behavior Expected Log:
getAmplitudes: 50
Screenshots If applicable, add screenshots to help explain your problem.
Smartphone (please complete the following information):