ryanheise / just_waveform

A Flutter plugin to extract waveform data from an audio file suitable for visual rendering.
MIT License
84 stars 16 forks source link

Hide logs in console #15

Closed loic-hamdi closed 2 years ago

loic-hamdi commented 2 years ago

How can we hide logs?

Example:
wave length = 1712
waveHeader[0] = 1
waveHeader[1] = 0
waveHeader[2] = 16000
waveHeader[3] = 160
waveHeader[4] = 651
Total scaled samples: 1302
waveHeader[0] = 1
waveHeader[1] = 0
waveHeader[2] = 16000
waveHeader[3] = 160
waveHeader[4] = 856
ryanheise commented 2 years ago

They are currently hard coded for debugging purposes. The intention was to remove them after the plugin had proved to be stable. Perhaps it is stable enough to consider doing that now. Have you had any stability issues otherwise?

loic-hamdi commented 2 years ago

So far so good, it is stable enough in my app to go to production.

Thanks for you great work on this package and other audio ones 👍

loic-hamdi commented 2 years ago

Hi @ryanheise , any news on hiding the log please?

ryanheise commented 2 years ago

I've just added it to my plans for the next work batch.

ryanheise commented 2 years ago

I've just pushed a commit that suppresses the logs. Would you like to test it and let me know for both iOS and Android whether it works as expected?

loic-hamdi commented 2 years ago

thanks @ryanheise

It is working on iOS & Android.

The only problem (not related to the logs) I am facing is when I have a lot of waveforms loading at the same time, some of them stop loading, I don't know if you ever experience it?

ryanheise commented 2 years ago

Simultaneous decoders is not a feature, but there is an open pull request for it if you'd like to test it.

ryanheise commented 2 years ago

I would also mention that each platform may have its own limit on how many simultaneous decoders you can run. because they are resource intensive. In your app, you might be able to code around that limitation by using some sort of processing pool where processes get queued beyond the pool's maximum size.

loic-hamdi commented 2 years ago

I would also mention that each platform may have its own limit on how many simultaneous decoders you can run. because they are resource intensive. In your app, you might be able to code around that limitation by using some sort of processing pool where processes get queued beyond the pool's maximum size.

I agree with the approach you recommend. I will actually update my code to only load the waveform for visible widget in order to limit the possible simultaneous decoders. (My work case is a chat with vocal messages)

ryanheise commented 2 years ago

Closing as this is now published.