INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Is memory playback working?  (Read 2608 times)

mark_h

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1854
Is memory playback working?
« on: December 15, 2019, 03:20:24 am »

I have memory playback active (Load decoded file into memory) but am getting tons of "buffering" during playback while I do a large transfer on my NAS to the point that I cannot play anything while this transfer is taking place due to buffering pauses.  Roon has absolutely no problem streaming the same track from the NAS while the large transfer is taking place...



Logged

dtc

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3119
Re: Is memory playback working?
« Reply #1 on: December 15, 2019, 07:08:09 am »

A decoded file can be larger than the memory MC allocates for memory playback. In that case, buffering occurs during playback and can cause stuttering.  That is one reason the option to load the compressed file into memory exists and why you cannot load a decoded album into memory.  You can definitely hear the difference with a long track, especially if it has a high sample rate.  Do you have the problem with small tracks with the compressed data in memory?

Logged

mark_h

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1854
Re: Is memory playback working?
« Reply #2 on: December 15, 2019, 07:33:04 am »

Noted.  The track I was trying to play is FLAC 81.4Mb in size.  Seems to me that would fit very comfortably in memory.  My PC has 32Gb, although not sure if MC limits the amount it uses.  Even so, 81.4Mb...
Logged

dtc

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3119
Re: Is memory playback working?
« Reply #3 on: December 15, 2019, 08:30:29 am »

As I remember memory usage is limited to 4 GB. Your 81 MB should fit :)  Playback should not cause buffering during the track.

I have not done this is a while, but you can look at the size of MC in memory then start the track and see how much it increases. It should increase by the size of the uncompressed track.  Then watch memory size when it starts buffering.  Not an answer - but some more information.
Logged

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: Is memory playback working?
« Reply #4 on: December 15, 2019, 04:27:47 pm »

Calculate the decoded size of the file from Bit Depth, Sample Rate, and Duration. It could be considerably larger than 81.4 MB.

If Roon can play no problem, is it decoding to memory?

When you are doing large transfers to your NAS, Windows is going to do memory management, and swap memory to disk. Even if you have 32 GB of memory, unfortunately. If MC only uses memory in a certain address range (say up to the 4 GB barrier), and Windows wants to use that address range for buffering of the file transfers, you are going to get swapping to disk. Hence, noticeable buffering of the audio.

Maybe there is a way to prevent swapping of specific application memory. Maybe MC could use memory at higher addresses to avoid this sort of clash. That's all more detail than I can get into.
Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner

dtc

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3119
Re: Is memory playback working?
« Reply #5 on: December 15, 2019, 05:12:44 pm »

Calculate the decoded size of the file from Bit Depth, Sample Rate, and Duration. It could be considerably larger than 81.4 MB.

If Roon can play no problem, is it decoding to memory?

When you are doing large transfers to your NAS, Windows is going to do memory management, and swap memory to disk. Even if you have 32 GB of memory, unfortunately. If MC only uses memory in a certain address range (say up to the 4 GB barrier), and Windows wants to use that address range for buffering of the file transfers, you are going to get swapping to disk. Hence, noticeable buffering of the audio.

Maybe there is a way to prevent swapping of specific application memory. Maybe MC could use memory at higher addresses to avoid this sort of clash. That's all more detail than I can get into.

flac compression is usually in the 40% to 50% range, depending on the nature of the music, so 80 MB would probably decompress to some something like the 150 to 200 MB range. Certainly same compared to both 4 MB and 32 MB.

With that much memory, it seems like it would take a lot of action to the NAS and some pretty bad memory management to cause MC to show  "buffering". But it is certainly possible.  A look at memory usage during the "buffering" might give an indication if a lot of swapping is going on. That's why I do minimal other work when playing music. 
Logged

dtc

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3119
Re: Is memory playback working?
« Reply #6 on: December 15, 2019, 09:17:28 pm »

Well, I just did some simple tests. I tried  load not decoded and load decoded file into memory and Task Master showed the same memory usage as playing the file not loaded into memory. And, when loading the full album into memory, I got a  larger size, but not enough to account for loading the full file. I used to be able to see memory changes that corresponded to fill sizes with the different options. So, either the mechanism for loading files has changed so that Task Manager does not show the changes or the options are not working as expected.  I will say that I used to do this with Windows 7 and am now using Windows 10. I do not know if that makes a difference.

Not sure what is going on.
Logged
Pages: [1]   Go Up