% $Id: file_formats.tex 18250 2008-08-11 22:47:17Z nls $ %
\chapter{File formats}
\section{\label{ref:Supportedfileformats}Supported file formats}
\begin{table}
\begin{center}
\begin{tabularx}{\textwidth}{llXX}\toprule
\textbf{Icon} & \textbf{File Type} & \textbf{Extension} 
  & \textbf{Action when selected} \\\midrule
\includegraphics[width=0.37cm]{appendix/images/icon-directory.png} 
  & Directory & \emph{none} & The browser enters that directory \\
\includegraphics[width=0.37cm]{appendix/images/icon-audio-file.png} 
  & Audio file & 
  \opt{MASCODEC}{\fname{.mp2, .mp3}}\opt{swcodec}{\emph{various (see
    \reference{ref:Supportedaudioformats}})}
  & Rockbox takes you to the WPS and starts playing the file \\
  \includegraphics[width=0.37cm]{appendix/images/icon-cuesheet.png} 
  & Cuesheet & \fname{.cue} & View a cuesheet file \\
\opt{masf}{
  \includegraphics[width=0.37cm]{appendix/images/icon-wav-file.png} 
    & Wave Audio File & \fname{.wav} & Play a WAV file \\%
}
\includegraphics[width=0.37cm]{appendix/images/icon-playlist.png}
  & Playlist & \fname{.m3u, .m3u8} & Rockbox loads the playlist and starts playing 
    the first file \\
\includegraphics[width=0.37cm]{appendix/images/icon-rolo.png} 
  & Rockbox firmware & 
    \opt{player}{\fname{.mod}}\opt{recorder,recorderv2fm,ondiofm,ondiosp}{\fname{.ajz}}%
    \opt{h1xx,h300}{\fname{.iriver}}\opt{ipod}{\fname{.ipod}}\opt{iaudio}{\fname{.iaudio}}%
    \opt{h10,h10_5gb,sansa}{\fname{.mi4}}\opt{gigabeat}{\fname{.gigabeat}}
  & ROLO will load the new firmware \\
\includegraphics[width=0.37cm]{appendix/images/icon-wps.png} 
  & While Playing Screen & \fname{.wps} & The new WPS display configuration will be loaded \\
\includegraphics[width=0.37cm]{appendix/images/icon-lang.png} 
  & Language File & \fname{.lng} & Loads a language file \\
\includegraphics[width=0.37cm]{appendix/images/icon-text.png} 
  & Text File & \fname{.txt} & This will display the text file using Rockbox text browser plugin\\
\includegraphics[width=0.37cm]{appendix/images/icon-config.png} 
  & Configuration File & \fname{.cfg} & The settings file will be loaded\\
\includegraphics[width=0.37cm]{appendix/images/icon-font.png} 
  & Font & \fname{.fnt} & This font will replace the current one\\
\includegraphics[width=0.37cm]{appendix/images/icon-rock.png} 
  & Plugin & \fname{.rock} & Starts a Rockbox plugin\\
\opt{archos}{
  \includegraphics[width=0.37cm]{appendix/images/icon-ucl.png} 
    & Flash Image & \fname{.ucl} & This Rockbox image will be flashed into the ROM \\
  }
\includegraphics[width=0.37cm]{appendix/images/icon-chip8.png} 
  & Chip8 game & \fname{.ch8} & Play a Chip8 game \\
\includegraphics[width=0.37cm]{appendix/images/icon-image-file.png} 
  & Image & \fname{.jpg} & View a JPEG image \\
\opt{MASCODEC}{\opt{lcd_bitmap}{
  \includegraphics[width=0.37cm]{appendix/images/icon-movie-file.png} 
    & Rockbox Video & \fname{.rvf} & View a movie (Rockbox format)\\}
}
\bottomrule
\end{tabularx}
\end{center}
\end{table}

\opt{swcodec}{
  \section{\label{ref:Supportedaudioformats}Supported audio formats}
  \begin{table}
  \begin{center}
  \begin{tabularx}{\textwidth}{lXX}\toprule
  \textbf{Format} & \textbf{Extension} & \textbf{Notes} \\\midrule
    \emph{Lossy codecs} \\
    \midrule
    MPEG audio & \fname{.mp1, .mpa, .mp2, .mp3} & \\
    OGG/Vorbis & \fname{.ogg} & Some old ``floor 0'' files may crash Rockbox. \\
    Musepack & \fname{.mpc} & \\
    Advanced Audio Coding & \fname{.m4a, .m4b, .mp4} & \\
    Windows Media Audio & \fname{.wma, .wmv, .asf} & \\
    ATSC A/52 & \fname{.a52, .ac3} & Supports downmixing for playback of 5.1 streams in stereo. \\
    ADX & \fname{.adx} & \\
    Speex & \fname{.spx} & \\
    \\
    \midrule
    \emph{Lossless codecs} \\
    \midrule
    Waveform audio format & \fname{.wav} & \\
    Audio Interchange File Format & \fname{.aif, .aiff} & \\
    Free Lossless Audio & \fname{.flac} & \\
    Apple Lossless & \fname{.m4a, .mp4} & \\
    Wavpack & \fname{.wv} & \\
    Shorten & \fname{.shn} & Seeking not supported.\\
    \opt{h1xx,h300,x5,m5,m3}{
      Monkey's Audio & \fname{.ape, .mac} & Only -c1000 decodes fast enough to be useful. \\
    }
    \opt{gigabeat}{
      Monkey's Audio & \fname{.ape, .mac} & -c1000 to -c3000 decodes fast enough to be useful. \\
    }
    \\
    \midrule
    \emph{Other codecs} \\
    \midrule
    Sound Interface Device & \fname{.sid} & \\
    MOD & \fname{.mod} & \\
    NES Sound Format & \fname{.nsf, .nsfe} & \\
    SPC700 & \fname{.spc} & \\
    Atari SAP & \fname{.sap} & \\
  \bottomrule
  \end{tabularx}
  \end{center}
  \end{table}
}
