About the new Fifo class


#1

I just took a quick look at the new abstractFifo class.
Could it be possible to use it in combination with the AudioThumbnail class, in order to draw a waveform thumbnail for an audio file being recorded?
I ask this because currently the AudioThumbnail class can work only with “finished” audio files (files with a proper header).

P.S. Julian, I think the comments in juce_AbstractFifo.h for void prepareToRead are wrong… (look at the @param parts)


#2

Thanks, I’ll check the comments - they were done quite hurriedly.

I can’t really see how it’d help with the thumbnail class - it’s the thumbnail class itself that needs tweaking to be able to take a live input. (In fact, I think I’m going to need to do exactly that for a contract I’m working on at the moment, so you can expect that functionality to be added very soon…)


#3

Great!


#4

prepareToWrite (numItems, start1, size1, start2, size2);

jules, is it ok, to call prepareToWrite and the check if (size1+size2)<numItems, and if its true, then wait until the buffer has enough free space again?


#5

Yes indeed.

Alternatively, you could call getFreeSpace() to see how much space there is.


#6

(In fact, I should make those prepareToWrite methods const, so that it’s clear that you can keep calling them without affecting the object’s state…)


#7

Any news about the AudioThumbnail class?


#8

Haven’t done it yet, probably will do within the next couple of weeks.