nicorac / bcr-gui

BCR-GUI is a companion app for the great BCR (Basic Call Recorder) Android application and other supported ROMs with embedded call recorders.
https://coolsoft.altervista.org
GNU General Public License v3.0
120 stars 6 forks source link

Unable to make immediate play on a long phone call #130

Closed robustini closed 1 month ago

robustini commented 1 month ago

Describe the bug I'm finding that I'm often denied access to phone call playback, the forward-backward sliders and play remain faded, sometimes. Then I realized why: if i expand a phone call by viewing the details and it is very long (an hour for example) a lot of time goes by before the buttons are activated for play. And if i go to expand another much shorter phone call the time gets longer as if the processing got stuck on the previous long call I had expanded. Example: a 55-minute phone call will only enable play after about 60 seconds. I don't think it's a problem with the MicroSD, if with any file manager I ask for play a phone call it's immediate.

To Reproduce

  1. Try accessing the details of long phone calls, jumping from one to the other

Expected behavior Access to the play should be immediate, without the gui first performing some sort of scan of the audio file, I don't understand if it parses the audio file before it can play or does something else.

Versions (please complete the following information):

nicorac commented 1 month ago

Well, this is the longest recording I've tried on my dev phone (Redmi Note 5 Plus, a 2017 phone, with SparkOS ROM, A13):

It loads almost instantly, as like the other smaller ones (less than 500ms).

Example: a 55-minute phone call will only enable play after about 60 seconds.

That's a huge lot of time, I agree 🙄

without the gui first performing some sort of scan of the audio file, I don't understand if it parses the audio file before it can play or does something else

BCR-GUI does not parse the file; it only asks the default Android MediaPlayer system to preload it and make it ready for play. In case recording doesn't have companion metadata file (only BCR recordings have it), it reads out recording duration (only once, the first time it's expanded).

I don't think it's a problem with the MicroSD, if with any file manager I ask for play a phone call it's immediate.

File manager apps have a special "direct" and faster access to files. BCR-GUI access files through Android SAF (required on latest Android versions), which is much slower (but shouldn't be as slow as yours).

You could try to :

If the opening is now faster, then you could have an issue with SDCard or the OS layer accessing it (there are lot of reports of bad Android SAF performances, expecially on A10).

robustini commented 1 month ago

Ciao Claudio, thank you for your response. Tried moving the whole folder with phone calls to the internal memory, there are about 30 of them, and the times are almost the same. 30 minute phone call and play possible after about 30 seconds, calls here are in ogg format. Try switch to M4A/AAC.

nicorac commented 1 month ago

Which codec are you using for the recordings? Which is the size in bytes of the 30min recording?

robustini commented 1 month ago

Which codec are you using for the recordings? Which is the size in bytes of the 30min recording?

OGG, 30 minutes are 13 Mb. I try to switch to M4A/AAC.

robustini commented 1 month ago

@nicorac fixed in M4A/AAC, so it's straightforward, don't ask me why OGG creates problems.

nicorac commented 1 month ago

I suppose your OS default MediaPlayer have some problems with OGG while other external players (maybe using own libs) don't...