Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IOS] onCurrentRecordingWaveformData returns currentDecibel with delay #125

Open
Bayramito opened this issue Oct 28, 2024 · 2 comments
Open
Labels
enhancement New feature or request

Comments

@Bayramito
Copy link

Bayramito commented Oct 28, 2024

onCurrentRecordingWaveformData returns incorrect values.

I speak fast to test and say "HEY" and the values are like this

 LOG  0.012771714478731155
 LOG  0.012771714478731155
 LOG  0.012771714478731155
 LOG  0.012771714478731155
 LOG  0.012771714478731155
 LOG  0.012771714478731155
 LOG  0.012771714478731155
 LOG  0.012771714478731155
 LOG  0.012771714478731155
 LOG  0.012771714478731155
 LOG  0.01845887303352356
 LOG  0.6516658663749695
 LOG  0.6516658663749695
 LOG  0.6516658663749695
 LOG  0.6516658663749695
 LOG  0.6516658663749695
 LOG  0.6516658663749695
 LOG  0.6516658663749695
 LOG  0.6516658663749695
 LOG  0.6516658663749695
 LOG  0.6516658663749695
 LOG  0.6516658663749695
 LOG  0.6516658663749695
 LOG  0.6516658663749695
 LOG  0.6516658663749695
 LOG  0.6516658663749695
 LOG  0.6516658663749695
 LOG  0.6516658663749695
 LOG  0.6516658663749695
 LOG  0.6115133166313171
 LOG  0.5385453104972839
 LOG  0.47425442934036255

IMG_88A7B360F5C0-1

this is the output visualization of saying just "HEY"

But on Android the output looks like this

Ekran Resmi 2024-10-28 15 13 26

As you can see values are jumping from 0.01 to 0.6 which is fine, but returns to 0 slowly. I have no idea what can cause this, but it works fine on Android.

UPDATE: tried to remove linear function in native side, but did not work

@t4dek
Copy link

t4dek commented Oct 30, 2024

@Bayramito how do you access native events like onCurrentRecordingWaveformData?

@Bayramito
Copy link
Author

Bayramito commented Oct 30, 2024

@Bayramito how do you access native events like onCurrentRecordingWaveformData?

there are some hooks provided, if you check the core files. useAudioRecorder and useAudioPlayer via these...

https://github.com/SimformSolutionsPvtLtd/react-native-audio-waveform/tree/master/src/hooks

@kuldip-simform kuldip-simform added the enhancement New feature or request label Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants