Author Topic: MMIO high storage utilization !  (Read 7024 times)

Remy

  • Hero Member
  • *****
  • Posts: 645
  • Karma: +9/-1
    • View Profile
MMIO high storage utilization !
« on: January 05, 2024, 03:48:28 pm »
Hi,

I just saw something strange.
Playing an audio file directly under WPS uses nearly 30Mb of private low storage.
Playing the same audio file using PM123, no reduced free storage

In my case, the audio file is a FLAC file with include albumart + EA's album art icon

To get back the storage, I do WPS restart.

Did any see this symptom ?

Remy

  • Hero Member
  • *****
  • Posts: 645
  • Karma: +9/-1
    • View Profile
Re: MMIO high storage utilization !
« Reply #1 on: January 06, 2024, 12:57:12 am »
I did more tests.
In fact, there is a problem with flac mmio ! only playing this type of codec makes WPS use 33Mb shared low storage.
flac is today the best option between lower files size without losing quality.

Is there someone which could have a look on this MMIO issue ? 

Lars

  • Hero Member
  • *****
  • Posts: 1271
  • Karma: +65/-0
    • View Profile
Re: MMIO high storage utilization !
« Reply #2 on: January 06, 2024, 01:15:33 am »
It all depends on how the IOProc is written.
You can load the whole FLAC file and convert into a WAV file and hold the result in memory. That makes it easy to implement seeks,reads and writes on the converted file (which is necessary as the MMOS2 can really only play/record WAV files). But it comes at a high cost in memory as WAV needs a lot of memory.
The alternative is to work blockwise, if the source format (FLAC in this case) is organized in this way because then, only a block of input data has to be converted but not the whole file. This is more memory friendly but also more difficult to implement (think about a seek half way into the WAV converted file: what would that location match in the FLAC source file?)
I suspect that the FLAC IOProc makes use of a library that is meant to convert a complete FLAC file into a WAV file and therefore that would match the first approach.
« Last Edit: January 06, 2024, 01:20:13 am by Lars »

Remy

  • Hero Member
  • *****
  • Posts: 645
  • Karma: +9/-1
    • View Profile
Re: MMIO high storage utilization !
« Reply #3 on: January 06, 2024, 01:50:46 am »
It all depends on how the IOProc is written.
You can load the whole FLAC file and convert into a WAV file and hold the result in memory. That makes it easy to implement seeks,reads and writes on the converted file (which is necessary as the MMOS2 can really only play/record WAV files). But it comes at a high cost in memory as WAV needs a lot of memory.
The alternative is to work blockwise, if the source format (FLAC in this case) is organized in this way because then, only a block of input data has to be converted but not the whole file. This is more memory friendly but also more difficult to implement (think about a seek half way into the WAV converted file: what would that location match in the FLAC source file?)
I suspect that the FLAC IOProc makes use of a library that is meant to convert a complete FLAC file into a WAV file and therefore that would match the first approach.

Storage should be released at stop play than but I suppose this is an old WPS issue... (due WPS restart releases the storage)
I plaied wav too but I didn't notice any abnormal storage use compared to flac. Next, I created a M3U list of flac and start playing this list from WPS. No extra storage used by this way !

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4711
  • Karma: +41/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: MMIO high storage utilization !
« Reply #4 on: January 06, 2024, 02:02:00 am »
Hello

Are you talking about mmioFLAC that cames in MMAudioPack?
- https://github.com/OS2World/MM-SOUND-MMAudioPack

Regards
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4787
  • Karma: +99/-1
    • View Profile
Re: MMIO high storage utilization !
« Reply #5 on: January 06, 2024, 02:12:12 am »
The official home is at https://trac.netlabs.org/mmcodecs/wiki where a ticket could be filed.
I seem to have alternate mmioFLAC.dll labeled Paul, I'll attach for testing purposes. I can't remember anything about it.

Remy

  • Hero Member
  • *****
  • Posts: 645
  • Karma: +9/-1
    • View Profile
Re: MMIO high storage utilization !
« Reply #6 on: January 06, 2024, 03:27:34 am »
Hello

Are you talking about mmioFLAC that cames in MMAudioPack?
- https://github.com/OS2World/MM-SOUND-MMAudioPack

Regards

ArcaOS installed

Remy

  • Hero Member
  • *****
  • Posts: 645
  • Karma: +9/-1
    • View Profile
Re: MMIO high storage utilization !
« Reply #7 on: January 06, 2024, 03:42:27 am »
The official home is at https://trac.netlabs.org/mmcodecs/wiki where a ticket could be filed.
I seem to have alternate mmioFLAC.dll labeled Paul, I'll attach for testing purposes. I can't remember anything about it.

Hi Dave !
You are the best.
This mmioFlac only uses 1Mb ans storage is get back at stop time like when playing wav (from under WPS folder). Good
I didn't notice error during the test and will continue testing it.
Thanks
« Last Edit: January 06, 2024, 03:45:13 am by Remy »

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4787
  • Karma: +99/-1
    • View Profile
Re: MMIO high storage utilization !
« Reply #8 on: January 06, 2024, 03:47:48 am »
Here's the thread, https://www.os2world.com/forum/index.php/topic,3174.0.html
Guess someone should raise an issue and get Gregg to rebuild them with Paul's changes.

Remy

  • Hero Member
  • *****
  • Posts: 645
  • Karma: +9/-1
    • View Profile
Re: MMIO high storage utilization !
« Reply #9 on: January 06, 2024, 04:13:47 am »
Here's the thread, https://www.os2world.com/forum/index.php/topic,3174.0.html
Guess someone should raise an issue and get Gregg to rebuild them with Paul's changes.

Right, i forgot this thread.
Thanks


FYI: AVxCAT V2.1.0 is under test and very close to be GA ...
        For those interested to test it, in addition with bug corrections, several new minor functions where added (download album-art by Discid, add EA's album-art icon nice to see the album cover instead of a generic music icon under WPS etc... FLAC, ALAC, AIFF etc...) and more, please send me a private message if interested to.
« Last Edit: January 06, 2024, 05:04:03 am by Remy »

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2092
  • Karma: +159/-0
    • View Profile
Re: MMIO high storage utilization !
« Reply #10 on: January 06, 2024, 06:39:02 am »
Here's the thread, https://www.os2world.com/forum/index.php/topic,3174.0.html
Guess someone should raise an issue and get Gregg to rebuild them with Paul's changes.

IIRC -  the changes were largely to update the version of libflac that was used...

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4787
  • Karma: +99/-1
    • View Profile
Re: MMIO high storage utilization !
« Reply #11 on: January 06, 2024, 07:19:04 am »
Here's the thread, https://www.os2world.com/forum/index.php/topic,3174.0.html
Guess someone should raise an issue and get Gregg to rebuild them with Paul's changes.

IIRC -  the changes were largely to update the version of libflac that was used...

OK, maybe it was simply the move to kLIBC that reduced the memory usage. I'll have to test. Do you remember if you used -Zhigh-mem? Not sure if that is a good idea for multimedia stuff.

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2092
  • Karma: +159/-0
    • View Profile
Re: MMIO high storage utilization !
« Reply #12 on: January 06, 2024, 07:45:45 am »
looks like no highmem switch, just the change to klibc and newer libs...