Let's take an example case:
1 - A 100MB sample file (ie. too large to reasonably keep resident in memory) is selected by the user. They start it playing.
2 - While it's playing, they apply a volume envelope to a 10MB area in the middle of the file. That 10MB section must be read from disk (most likely in blocks), modified and written back to disk without needing to touch the unmodified 90MB.
To achieve part 2, I'd probably choose to open a single stream for read+write, but JUCE can't do this. I could instead have two streams open on the same file (one for read, one for write) and then perform all editing via these streams, but something tells me that having a file open multiple times for both read and write is probably bad news (or at the very least, I'll be exposing myself to platform-specific behaviours).
Since this is a common use case, I'd like to ask what others have done to solve it?