-
+
SCHEDULING DISK I/O
How much?
- disk I/O is much more efficient when writing large chunks (256kB optimum)
- disk I/O stalls can cause delays of up 1 second or more
- varispeed + scrubbing causes the audio thread to require much larger (or
smaller) data rates
- read/write constant chunks per "track", then come back and do more
for those requiring it (i.e. don't starve some tracks because
others are greedy)
- don't do constant chunks always: otherwise smaller chunks of data
at the end of capture get lost.
When?
- who wakes up the disk I/O and how?
-
pthread_cond_signal(3)
requires a mutex to be held
-
write(2)
takes a kernel-side lock
- no good solutions at the moment
Refilling
- playlist: specifies various sections of a set of audio files that
should be played at a given time
- reading from disk fetches data following the playlist
- when the playlist is changed, how do we refill the buffer?
- refilling is not atomic
- ableton live, protools, others ... appear to do this.