Spooler: Difference between revisions

From kJams Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(10 intermediate revisions by 2 users not shown)
Line 1: Line 1:
If you enable the Spooler in the Advanced Preferences, you get these benefits:
The Spooler is an integral part of kJams, and provides these benefits:


# you enable background ripping: rips will happen in the background, not interfering with your use of kJams while it does it's work
# Play direct from CD without manually ripping first
# you enable background encoding: encoding too happens in the background
# background ripping: rips will happen in the background, not interfering with your use of kJams while it does it's work
# 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 writing to a chache file on your hard driveIn writing to this cache file, there's no audio encoding, no subchannel descrambling or error correcting, so it writes as fast as possible, making the rip go as fast as possible.
# background encoding & zipping: these too happen in the background
# you enable 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.  Soon, 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.
# QuickTime Export, even direct from disc
# you enable perfectly sample accurate playback of songs ripped from CD (soon, the same will apply to MP3's and Zip files, even ones encoded with variable bit rate)
# 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)
# you enable full QuickTime playback: This won't mean much to you yet, but now that QuickTime is handling the audio stream rather than CoreAudio, I get a dozen more file formats for free.  Coming soon: OGG Vorbis Encoding and Playback.  Eventually you'll see movie playback, including KAR files.
# 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 [http://en.wikipedia.org/wiki/FIFO 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.
# perfectly sample accurate playback of audio with locked-on sync to video, when you [[Screen_Shots#LCD_Panel|scrub the play head]], even for [http://developer.apple.com/documentation/QuickTime/QT6WhatsNew/Chap1/chapter_1_section_37.html VBR compressed audio].
# 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.
# Cue a song to it's first non-silent sample, so when you un-pause the music starts instantly (Skip Silence pref)


You will want to have the Tasks window showing, that way you can see all the spools that are running.
Future benefits:
# Cue multiple songs with crossfade


You may have already seen the benefit of playing directly from CD.  You see how fast the rip goes?  That's how fast it goes when encoding too.
You will want to have the "Activity" window showing, that way you can see all the spools that are running.


Q) Why is it turned off by default?<br>
You should take care to manage the spooler's audio cache, see [[Preferences#Audio|Preferences]].
A) Because it's a brand new feature and I want to be sure that it doesn't crash on casual users.  If you're excited to see the potential, and don't mind too much if you run into a bug, you should turn it on.
 
Keep in mind there's no cache management right now, so it can grow arbitrarily large.  If you find yourself low on disk space, you may want to delete your cache.  it's located in /Library/Caches/kJams/.  Note that's the root of your drive, NOT under your user.  (ie: users will share the kJams Cache).  You can throw out that folder any time kJams is not playing or ripping.  Soon there will be a pref panel for cache management.
 
Please turn it on, and use it, and report bugs.  I need to get all the bugs out before I feel ready to turn it on by default.

Latest revision as of 18:20, 30 January 2012

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.