Spooler

From kJams Wiki
Jump to navigation Jump to search

The Spooler is an integral part of kJams, and provides these benefits:

  1. Play direct from CD without manually ripping first
  2. background ripping: rips will happen in the background, not interfering with your use of kJams while it does it's work
  3. background encoding & zipping: these too happen in the background
  4. QuickTime Export, even direct from disc
  5. ripping will be at the full speed of your drive. That is, it won't be slowed down by the encoding process. With the spooler, ripping happens on it's own thread, which is *just* a tight loop reading from the CD, and writes into memory (a deque for those who want to know). For this "read loop", there's no audio encoding, no subchannel descrambling or error correcting, so it reads as fast as possible, making the rip itself go as fast as possible. (there is a second, separate thread that reads from the deque and writes mp3 and cdg)
  6. the cache: The cache stores uncompressed audio and video. If you play a song off the CD, and then decide to import it, it doesn't have to rip because it's already in the cache. Likewise, the next time you play it, it does not have to read it from the CD. If the file was just in your library, it is unpacked (decoded from MP3 or AIF or mpeg or vorbis or anything) into a canonical uncompressed format (pcm). If the file was zipped, it will also go into the cache, so next time you play it it will not have to be unzipped or unpacked. the cache can be emptied at any time without notice, and is kept to a maximum size using a FIFO que. A "cache ghost" is when you play a song that is stored on an external drive, and it therefore gets into the cache. but then you take the external volume offline. The song file is no longer there, but you CAN still play it while it still lives in the que, which may not be for very long since the que is emptied periodically.
  7. perfectly sample accurate playback of audio with locked-on sync to video, when you scrub the play head, even for VBR compressed audio.
  8. Playback of many QuickTime formats: Now that QuickTime is handling the audio files rather than CoreAudio, I get a bunch more file formats for free, including MIDI and KAR files.
  9. Cue a song to it's first non-silent sample, so when you un-pause the music starts instantly (Skip Silence pref)

Future benefits:

  1. Cue multiple songs with crossfade

You will want to have the "Activity" window showing, that way you can see all the spools that are running.

You should take care to manage the spooler's audio cache, see Preferences.