home *** CD-ROM | disk | FTP | other *** search
/ Magazyn Exec 3 / CD_Magazyn_EXEC_nr_3.iso / Recent / mus / play / DelfMPEG.readme < prev    next >
Text File  |  2000-07-13  |  13KB  |  265 lines

  1. Short:  MPEG audio player for Delfina DSP
  2. Author: Smack/Infect! (Michael Henke)
  3. Type:   mus/play
  4.  
  5.  $VER: DelfMPEG 0.5 (Sat 08-Jul-2000)
  6.  
  7.  
  8.  #features
  9.    -plays MPEG audio files with almost no CPU load
  10.     (decoding is done completely by Delfina's DSP56002)
  11.  
  12.    -currently supports MPEG1 layer II and III
  13.  
  14.    -multi-stage buffering system
  15.     (for smooth playback while loading from disk)
  16.  
  17.    -free software (full source code included, of course)
  18.  
  19.  
  20.  #requirements
  21.    -CPU 68020+
  22.    -AmigaOS V37+
  23.    -Delfina DSP board
  24.    -asyncio.library V39+
  25.  
  26.    -developed on: A1200 (68030+882 @ 40MHz, 16MB Fast, Delfina1200 DSP)
  27.    -tested on: various machines with Delfina1200, Delfina Lite or Plus
  28.  
  29.  
  30.  #recommended
  31.    -reqtools.library V38+
  32.    -latest version of delfina.library
  33.     (currently 4.14, see also 'known problems' section)
  34.    -some MPEG audio files :)
  35.  
  36.  
  37.  #changes since previous release
  38.    (minor changes only this time)
  39.    -file reader:
  40.      -RIFF header recognition added
  41.       (for all guys out there using W*nd*ws encoders)
  42.      -better handling of unknown data at the beginning of files
  43.       (now it should recognize more files with strange headers)
  44.  
  45.  
  46.  #how to use it
  47.    DelfMPEG is a shell-only program. These options can be used:
  48.  
  49.    FILES            specify one or more filenames.
  50.                     if omitted a reqtools file requester appears.
  51.  
  52.    VERBOSE  / -v    output more information.
  53.  
  54.    NOPLAY   / -n    don't play but just output some information.
  55.                     this works also without a Delfina board.
  56.  
  57.    SHOWTAG  / -t    display ID3v1 tag before playing.
  58.                     this is some extra information that can be appended to
  59.                     MPEG audio files. (title, artist etc.)
  60.  
  61.    MONO     / -m    decode only the left channel of stereo files.
  62.                     this option obviously degrades playback quality but it
  63.                     also saves quite a lot DSP processing time.
  64.  
  65.    DACRATE  / -d  <number>   (default: 0)
  66.                     set Delfina's codec rate to a fixed value (in kHz).
  67.                     this option allows to save some DSP power by lowering
  68.                     the DAC (Digital/Analog-Converter) rate, but playing the
  69.                     sound at a lower rate degrades quality, of course.
  70.                     the default value of 0 (zero) means "best quality", i.e.
  71.                     DAC rate will be optimal for the files to play.
  72.                     the given value is automatically rounded to the nearest
  73.                     available Delfina rate:  16, 27, 32 or 48 kHz.
  74.                     (12, 24, 36 or 48 kHz for Delfina 1200 and Plus)
  75.  
  76.    VOLUME  / -vol <number>   (default: 100)
  77.                     set the playback volume (in per cent, range 0...200).
  78.                     warning: if the volume is boosted (101...200) there might
  79.                     be distortions due to output clipping.
  80.  
  81.    FRAMEBUF / -f  <number>   (default: 100)
  82.                     set the number of read-ahead frame buffers.
  83.                     the frame buffers don't make the file reader faster but
  84.                     instead it becomes more "reliable". it works just like
  85.                     the "anti-shock" feature of portable CD players: if the
  86.                     reading process gets interrupted for a short period then
  87.                     DelfMPEG continues playing data that's already buffered.
  88.  
  89.    ASYNCBUF / -a  <number>   (default: 128)
  90.                     set the size of the AsyncIO buffer (in Kbytes).
  91.                     large IO-buffers usually improve the performance of the
  92.                     file reader but they also increase access time, which is
  93.                     the reason for the delay caused by the SHOWTAG option.
  94.  
  95.    FFSKIP   / -ff <number>   (default: 10)
  96.                     set the number of frames that are skipped during fast
  97.                     forward mode. (higher number = faster seeking)
  98.  
  99.    NOFASTL  / -nl   don't use internal DSP memory (L-data or Program memory)
  100.    NOFASTP  / -np   for the decoding routines. these options are not really
  101.                     useful except maybe for benchmark or debug purposes, they
  102.                     cause a significant slowdown of the decoder!
  103.  
  104.    NOTIMER  / -nt   don't output the position timer during playback.
  105.                     you should specify this option if you use DelfMPEG to play
  106.                     some background music while using other programs.
  107.                     (pulldown-menus, drag'n'drop etc. will block the timer
  108.                     output thus also delaying the file reader)
  109.  
  110.    STRICT   / -s    don't try to resync in case of read error.
  111.                     from version 0.4 on DelfMPEG's file reader can tolerate
  112.                     defective MPEG audio files: if it encounters invalid or
  113.                     non-audio data it continues reading in order to find the
  114.                     next valid frame header (resynchronize with the stream).
  115.                     but this behavior could cause problems in some rare cases
  116.                     (noise or even crash the decoder) so that's why it can be
  117.                     switched off with this option.
  118.  
  119.    During playback these keys can be used:
  120.  
  121.    Ctrl-F   fast forward
  122.    Ctrl-E   pause/continue
  123.    Ctrl-C   stop current file, start next file
  124.    Ctrl-D   quit program
  125.  
  126.  
  127.  #technical stuff
  128.    -MPEG audio files are made of frames. Each frame is independend from the
  129.     other frames and contains all data that's necessary to decode it (an
  130.     exception to this rule is the "bit reservoir" feature of layer III which
  131.     allows the encoder to spread data over several consecutive frames).
  132.     In MPEG1 layer II or III files every frame contains 1152 raw samples, so
  133.     the number of frames per second depends on the sampling rate (one second
  134.     of 44100 Hz sound consumes more than 38 frames). The bit rate determines
  135.     the size of the frames in bytes (or bits respectively).
  136.     In theory all frame parameters can change from one frame to the next.
  137.     DelfMPEG supports changes of these parameters inside a file:
  138.      +bit rate (some encoders can produce "variable bit rate" files)
  139.      +stereo <-> joint-stereo (Pegase uses this "dynamic joint-stereo" mode)
  140.      +error protection (it's currently ignored anyway)
  141.     For some technical reasons DelfMPEG does NOT support files which contain
  142.     changes of these parameters:
  143.      -MPEG layer
  144.      -number of channels (mono <-> stereo)
  145.      -sampling rate
  146.     But I think this is not a big restriction in everyday life.
  147.     Note: the file information that is displayed before playing is taken from
  148.     the first frame only and the duration is just a "guess" based on it.
  149.  
  150.  
  151.    -here are a few benchmark results, taken on my A1200 using the "beta 46"
  152.     version of delfina.library 4.15  (DSP load measured with DelfLoad)
  153.     "Delfina 1200: delfina.library v4.15, 31 K memory, 73.7 MHz DSP"
  154.  
  155.     DSP load in idle state: 13%
  156.     DSP load during playback - layer II  128kbps 44100Hz j-stereo
  157.      normal (no options):               45%  (full quality)
  158.      with NOFASTL and NOFASTP options:  66%  (full quality)
  159.      with MONO option:                  35%  (degraded quality)
  160.      with DACRATE=24 option:            38%  (degraded quality)
  161.     DSP load during playback - layer III 128kbps 44100Hz j-stereo
  162.      normal (no options):               52%  (full quality)
  163.      with NOFASTL and NOFASTP options:  76%  (full quality)
  164.      with MONO option:                  38%  (degraded quality)
  165.      with DACRATE=24 option:            44%  (degraded quality)
  166.  
  167.     conclusions:
  168.      -the 74 MHz DSP of the new Delfina models (1200 and Plus) offers more
  169.       than enough power for realtime decoding in all these situations.
  170.       (even 40 MHz are sufficient for mp3 playback - hello Lite users!)
  171.      -notice the big difference between the "normal" and "NOFAST" results!
  172.       the use of some internal DSP memory in the critical subroutines gives
  173.       a significant speedup. (an important area for DSP code optimizations)
  174.      -the MONO option does not exactly halve the effective DSP load. this is
  175.       because not all decoding steps can be skipped for the omitted channel,
  176.       real single-channel files require less processing.
  177.  
  178.  
  179.    -in VERBOSE mode DelfMPEG could print a few warnings:
  180.      -NO_INPUT_DATA means that the file reader could not supply the decoder
  181.       with new data in time (results in "stretched" sound, you can test this
  182.       by blocking the position timer output - and also the file reader)
  183.      -DECODER_BUSY means that the DSP decoding routine did not finish in time
  184.       before the next call (results in "jerky" or "stuttering" sound, can be
  185.       tested by using the mp3 decoder on a slow DSP;)
  186.      -MP3_MAINDATA_ERROR means that the layer III file contained corrupted
  187.       data (if you encounter this warning please check the mp3 file using
  188.       another player (such as MPEGA), if the file is really damaged then all
  189.       decoders should complain about it)
  190.  
  191.  
  192.  #known problems
  193.    -DelfMPEG only recognizes MPEG1 audio files.
  194.     not supported: MPEG2 or mixed audio/video files.
  195.  
  196.    -some mp3 files are not played correctly! what's wrong with DelfMPEG?
  197.     1) DSP load approaches or exceeds the 100% limit on slow Delfinas.
  198.        symptom: audible "drop-outs", DECODER_BUSY warning in VERBOSE mode.
  199.        actions: use MONO or DACRATE options to reduce DSP load (and quality)
  200.                 or overclock your Delfina Lite (some guys have done this and
  201.                 they live a happier life now;) or purchase a Delfina Plus.
  202.     2) intensity stereo decoding is not implemented yet.
  203.        symptom: audible distortions, INTENSITY_STEREO warning in VERBOSE mode.
  204.        actions: send me gifts, money or at least some nice emails and give me
  205.                 the motivation to implement this. :-)
  206.                 please consider: in my large collection of mp3's there are
  207.                 only two files that are encoded with this scheme.  high
  208.                 quality encoders (use LAME, it's the best!) don't use the
  209.                 intensity stereo scheme at all!
  210.     3) in VERBOSE mode an "unexpected EOF" error is reported for some files.
  211.        symptom: just the error message.
  212.        actions: this is a minor glitch in the file reader, it shouldn't have
  213.                 any audible effects. that's why I decided to ignore it, you
  214.                 can try and convince me to fix it. :-)
  215.  
  216.    -DelfMPEG causes deadlocks/crashes.
  217.     1) delfina.library 4.14  -  the "fake crash" bug
  218.        symptom: soon after DelfMPEG started playing the "Delfina crashed"
  219.                 requester appears; DelfLoad display jumps to 100%.
  220.        actions: wait for Petsoff to release a fixed delfina.library.
  221.                 ignore the "Delfina crashed" requester (that's right, do not
  222.                 reply it while DelfMPEG is playing).
  223.                 or you could use an older version of delfina.library (4.13 or
  224.                 lower) - not recommended, there seem to be other problems.
  225.     2) delfina.library 4.14 and lower  -  the "AHI killer" bug
  226.        symptom: AHI and DelfAIFF crash if used after DelfMPEG. the system
  227.                 freezes and must be rebooted.
  228.        actions: wait for Petsoff to release a fixed delfina.library.
  229.                 use the NOFASTP option of DelfMPEG, it avoids the bug but it
  230.                 also slows down the decoder!
  231.                 or use the workaround: quit DelfMPEG and all other Delfina
  232.                 programs, use "avail flush" to remove delfina.library from
  233.                 memory and then start your AHI programs.
  234.  
  235.  
  236.  #acknowledgements
  237.    DelfMPEG uses ideas/code from:
  238.    -MPEG Audio Layer II decoder by Fredrik Noring and Tomas Berndtsson
  239.     (an mp2 player for Atari Falcon, DSP56K code)
  240.    -amp11 by Niklas Beisert (clean and fast C++ code)
  241.    -FalcAMP by Denis "STGhost" Huguet and David "Splash" Carrere
  242.     (an mp3 player for Atari Falcon, DSP56K code)
  243.    -reference code by MPEG Software Simulation Group ("the original" C code)
  244.  
  245.  
  246.  #author
  247.    mailto: smack@smack.de
  248.  
  249.    DelfMPEG - MPEG audio player for Delfina DSP
  250.    Copyright (C) 1999, 2000  Michael Henke
  251.  
  252.    This program is free software; you can redistribute it and/or modify
  253.    it under the terms of the GNU General Public License as published by
  254.    the Free Software Foundation; either version 2 of the License, or
  255.    (at your option) any later version.
  256.  
  257.    This program is distributed in the hope that it will be useful,
  258.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  259.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  260.    GNU General Public License for more details.
  261.  
  262.    You should have received a copy of the GNU General Public License
  263.    along with this program; if not, write to the Free Software
  264.    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  265.