sfizz icon indicating copy to clipboard operation
sfizz copied to clipboard

Added status full loaded into FileData

Open KKQ-KKQ opened this issue 1 year ago • 4 comments

PR 1/4 of #1236 Shared File Pool

Added FileData::Status::FullLoaded.

KKQ-KKQ avatar Feb 14 '24 07:02 KKQ-KKQ

2 questions:

  • If we move to having a single background thread for loading, this logic and the atomics would get much easier, wouldn't it?

If we moved to having a single background thread for loading and having shared file pool, an instance have to wait until another instance finishes loading.

  • It seems we're so close to not needing the loadedFiles. The only issue I see is if someone calls setRamLoading(true), and then setRamLoading(false), which would erase the FullyLoaded states from before.

loadedFiles is for smaller files and for wave-oscillators and the samples in it should not be released even when preloadSize is changed. I think we needs the loadedFiles.

KKQ-KKQ avatar Feb 16 '24 00:02 KKQ-KKQ

2 questions:

  • If we move to having a single background thread for loading, this logic and the atomics would get much easier, wouldn't it?

Oh do you mean finalizeSfzLoad() just queue loading? I think it might be more complex, but worth consider it.

KKQ-KKQ avatar Feb 16 '24 00:02 KKQ-KKQ

I think the processes become more safe.

KKQ-KKQ avatar Feb 16 '24 02:02 KKQ-KKQ

Looks good, I'll try to stress test it a bit today or tomorrow thanks!

paulfd avatar Feb 16 '24 14:02 paulfd

@KKQ-KKQ I'm sorry I've been way too swamped at work. I'm merging this without extensive testing so you can proceed. I'll test out things as they come when I can...

すみません ! 🙇

paulfd avatar Mar 20 '24 07:03 paulfd

@KKQ-KKQ I'm sorry I've been way too swamped at work. I'm merging this without extensive testing so you can proceed. I'll test out things as they come when I can...

すみません ! 🙇

No problem! Thank you!

KKQ-KKQ avatar Mar 20 '24 11:03 KKQ-KKQ