-
Notifications
You must be signed in to change notification settings - Fork 47
Open
Description
Describe the bug
Output samples per second is 10 irrespective of the preferredSamplesPerSecond given
To Reproduce
Steps to reproduce the behavior:
- I'm using this helper class
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
Screenshots
If applicable, add screenshots to help explain your problem.

Smartphone (please complete the following information):
- Device: Google Pixel 6a
- OS: Android 14 (API 34)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working