Author Topic: Sample Length (or size) Limit  (Read 2190 times)

Offline Really Weird Person

  • Crazy artist
  • ****
  • Posts: 818
  • I love Daisy (デイジー)!
  • Operating System: Windows 8 Pro x64
Sample Length (or size) Limit
« on: March 16, 2014, 22:40:55 »
Does ModPlug Tracker have a limit on the sample length that it will load. Even in MP3 format, loading a sample that is 11 hours, 10 minutes, and 14 seconds long does not work. Upon attempting to load it, I am presented with the following dialog: Perhaps it is a size limitation. If so, what is the size limitation. The MP3 sound is 613 megabytes in size.

Offline Saga Musix

  • OpenMPT Developers
  • *****
  • Posts: 7,072
  • aka Jojo
    • Download music, samples, VST plugins: Saga Musix Website
  • Operating System: Windows 10 x64
Re: Sample Length (or size) Limit
« Reply #1 on: March 16, 2014, 22:49:02 »
Riddle me this - how would you fit the uncompressed MP3 sample, which would be about 7 GB, into the theoretical 4 GB of RAM that a 32-bit application can use (the current stable version of OpenMPT is not large address aware, so make that 2 GB)? And more important, how would you store these 7 GB of sample data in a file format that is limited to a 4 GB sample size and a maximum offset "into the file" of 4 GB?

The precise answer is: The sample length is limited to 256 mega-samples (256 * 1024 * 1024, at 16-bit stereo this equals precisely 4 GB of memory).
And to specifically the address the matter of MP3 import: The uncompressed MP3 file has to fit twice into memory (mpg123 has to store a temporary copy that OpenMPT reads from). So that would be 14 GB of memory you have to shove into that 32-bit process that can only handle 2 GB of memory.
« Last Edit: March 16, 2014, 22:52:42 by Saga Musix »
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

Offline Really Weird Person

  • Crazy artist
  • ****
  • Posts: 818
  • I love Daisy (デイジー)!
  • Operating System: Windows 8 Pro x64
Re: Sample Length (or size) Limit
« Reply #2 on: March 16, 2014, 23:13:23 »
I glean that there is a sample limit of 256 × 1024² (268,435,456) samples. Unless I misinterpreted that part, the sample quality affects the loading process, or both, it seems that the file should load. File "specifications":
Quality: 22,050 Hz, mono
Length: 146,852,928 samples
But, if worse comes to worse, I can try cutting it in half to see if it will load.