MPXPLAY Audio Player v1.50 by PDSoft

If You find a bug, first read the 'known bugs' section below, 
if the bug isn't there, please write it to me with these informations:
-your hardware (CPU,RAM,Soundcard)
-your operating system (DOS,Win95/98)
-your command line options (i.e. mpxplay.exe -bp -cf playlist.m3u)
-description (what did you do, and what did the program do, when you found it)
 (i.e. keyboard operations)

I never can test the program totally. Sometimes a modification causes a new bug.
If a function doesn't work properly (but it worked in the previous version(s)),
please write it to me...

Known bugs and limits:
- PMODE/W : 
 - memory allocation problems in some cases (DOS7 + SB Live)
 - interrupt handling bugs (?) (using mouse or serial-port-control can crash the program)
- AAC :
 - time-length,bitrate,seeking-bar and some time-pos related functions (crossfade,soundlimit) 
   are not correct at RAW and ADTS fileformats (but good at ADIF)
   (the program doesn't (cannot) calculate correctly the time-length of the file)
 - slow seeking in some cases (1st far forward jump)(slower at RAW and ADIF)
- MPC : 
 - only Streamversion 7.0 and 7.1 are implemented/supported
 - seeking problems(?)(sometimes the seeking can fail, and the playing stops or skips to the next song)
- CDW : 
 - doesn't work on every CD-ROMs (only on those, which can ripp (grab) audio tracks)
 - the door open/close also doesn't work on every drives
 - maybe doesn't work under WIN95/98 (hardware dependant?)(it works with my DVD players (TEAC,Toshiba))
 - problems with mixed mode CDs (data+audio)
- mixer:
 - soundlimit (-sl) doesn't work with -bp at the begin of files (only at the end of files)
- tone control (bass,treble): 
 - software based works on MP3/MP2/MPC files only (tone control doesn't work at other filetypes)
 - hardware based works on some SB16 and AWE64 cards only
- soundcard routines:
 - if you play 48khz files with original SB16 card (which cannot play 48k) use '-of 44100' option
 - maybe the soundcard IRQ works below 8 only (3-7) (set the IRQ to 5, then it will work)
 - Win9x : only SB16, SBpro and GUS work in background (because they use IRQ)(other cards work in active window only)
- crossfade: 
 - cannot do between files with different freqency (i.e.: 22khz->44khz) or channel number (stereo->mono)
 - sometimes doesn't work (at fullbuffer (-bl) or at large prebuffer (-bbn 500), at auto-pause (-pap/ctrl-p) and pause-next (ctrl-s) functions)
 - increased volume + limiter = non-linear fade-out and fade-in
- Win9x:
 - lfn getcwd function (int21h,ax=7147) doesn't work properly -> causes bugs in directory browser (it's good with DOSLFN)
 - possible dir-scan problems on substed drives (directory browser and -ds)
- reload playlist (ctrl-r) after directory change (program doesn't save the path of playlist)
- possible bugs around random mode (random + skip-back + crossfade : skips 2 songs back)
- possible timing problems using -bn8 (mouse,joy,?)
- seeking is not exact on some VBR filetypes (MP3,OGG) and may be buggy on older APE files (v<=3.92)
- FILE: Mpxplay cannot play very short files in some cases (shorter than 0.5 sec)
- the spectrum analiser works properly on 44khz/stereo files only
- CMOS startup: only the song (playlist entry) number and the file position (%) are saved/restored
- -io + -pss (or CMOS startup) + -ipl/-idl together don't work properly
- -io doesn't work at -is

- MP2 : program doesn't support MPEG 2.0 and 2.5 (16,22,24,8,11,12khz) in Audio MPEG Layer II
- the SBpro compatible cards: 
   - sound with 8 bits & 22khz only (bad quality)
   - use more CPU (freq conversion 44->22khz)
- maximum number of playlist entries is: 
  in normal mode: 1999 (left side,directory browser), 9999 (right side,playlist)
  in doombox mode: 9999 (left side/playlist), 1999 (right side/doombox queue)
  (max. playlist size: 64*9999 = 640 kbyte)
- mpxplay.ini : max filesize=256kbytes; max number of lines=768; max chars per line=352
- CMOS can store only 8 (0-7) playlist numbers (at [fastlists] + -pslf)

-------------------------------------------------------------------------------

LCD configuration:

 -you can configure the LCD in the [LCDdisplay] part of MPXPLAY.INI
 -enable the LCD with the LCDport variable (LPT1,LPT2,COM1,COM2,etc.)
 -configure your display with the LCDtype,LCDlines,LCDrows
 -configure the displaying with the LCD_items lines
 -you can find some hardware infos on my homepage (lcd-info link)
  and in the display\lcd.c source file (mpxsrc.zip)

 LCD hardware types (LCDtype=):
  on LPT port:
   type 1 : HD44780 8-bit mode
   type 2 : HD44780 4-bit mode
   type 3 : Noritake VFD (series 800)
   type 4 : Toshiba T6963C
  on COM port:
   type 5 : HD44780 or compatible
   type 6 : Matrix Orbital
   type 7 : EDE702
   type 8 : VT100 terminal output

 LCD_items line configuration:

  LCD_items=linepos,rowpos,ITEM1,ITEM2,"userstring",ITEM3,etc.
  LCD_items=linepos,rowpos,ITEM4,"anything",ITEM5
  LCD_items=linepos,a_align,ITEM6       (a_align can be a_left,a_center,a_right)
  LCD_itemsN=linepos,rowpos,ITEM7,ITEM8 (put items on the N. virtual page (select/skip with ctrl-'g'-key))

  - you can declare more LCD_items lines too (not limited)
  - you can use the same linepos in 2 (or more) LCD_items lines (program will join them)
  - you can use lower and upper case too at the items
  - virtual page number (N) may be 0-3 (max. 4 pages)(no number equal to 0)
  - linepos may be between 1 and 16 (depending on the LCD display too)
  - rowpos may be between 1 and 511 (you can put an item out of the real-display, but
				     use the LINESCROLL if you want to see it...)

 Display (standard text) items:

  artist     - artist of song  (from ID3TAG) (editorhighline)
  title      - title of song   (-"-)         (-"-)
  album      - album name      (-"-)         (-"-)
  year       - date of song    (-"-)         (-"-)
  genre      - genre of song   (-"-)         (-"-)
  comment    - comment of song (-"-)         (-"-)
  tracknum   - track number    (-"-)         (-"-)
  filename   - file name (without path)      (-"-)
  pathname   - path of file                  (-"-)
  songtime   - length of song in mm:ss       (-"-)
  entrynum   - playlist entry number of song (-"-)
  allsongnum - number of songs in the current editorside
  allsongtime- total playtime of the current editorside

  p_artist   - artist of song  (from ID3TAG) (currently playing song (aktfilenum))
  p_title    - title of song   (-"-)         (-"-)
  p_album    - album name      (-"-)         (-"-)
  p_year     - date of song    (-"-)         (-"-)
  p_genre    - genre of song   (-"-)         (-"-)
  p_comment  - comment of song (-"-)         (-"-)
  p_tracknum - track number    (-"-)         (-"-)
  p_filename - file name (without path)      (-"-)
  p_pathname - path of file                  (-"-)
  p_songtime - length of song in mm:ss       (-"-)
  p_songfreq - freq of file                  (-"-)
  p_songchan - number of audio channels      (-"-)
  p_bitrate  - bit/rate info                 (-"-)
  p_filetype - file/audio type               (-"-)
  p_entrynum - playlist entry number of song (-"-)
  p_timepos  - time position of currently playing song in mm:ss or h:mm:ss if more than 1 hour)
  p_framepos - frame position of currently playing song
  p_allsongnum - number of songs in the playlist (playside)
  p_allsongtime - total playtime of the playlist (playside)

  mix_vol    - sound volume (in software mixer)
  mix_sur    - surround value
  mix_spd    - speed value
  mix_bal    - balance value
  mix_bass   - bass value
  mix_treble - treble value
  auc_vol    - soundcard hardware (master) volume 

  s_re       - status of replay (R1/RE/re : 1 song replay/list replay/disabled)
  s_rn       - -"- random mode     (RN/rn : ENABLED/disabled)
  s_av       - -"- auto volume     (AV/av)
  s_cf       - -"- crossfade-use   (CF/cf)
  s_fo       - -"- fade-out        (FO/fo)
  s_fi       - -"- fade-in         (FI/fi)
  s_sw       - -"- swap channels   (SW/sw)
  s_hq       - -"- hq-mode         (HQ/hq)
  s_ap       - -"- auto pause      (AP/ap)
  s_pn       - -"- pause next song (PN/pn)
  s_play     - PAUSED/Fade-Out/CrosFade/Fade--In/-=SCAN=- messages

  currlist    - song/playlist/dirscan-mask (without path)
  currlistp   - path of song/playlist/dirscan-mask
  currdrive   - current drive (letter) of directory browser (1 char)(C,D,E,etc.)
  volmeter    - volume meter indicator (in the full width of LCD)
  systime     - system time/clock (hh:mm:ss)
  sysdate     - system date (yyyy-mm-dd)

  editorhline   - infos of playlist-editor-highline (in "ENTRYNUM. ARTIST:TITLE (MM:SS)" format)
  editorhlinep1 - -"- +1
  editorhlinep2 - -"- +2
  editorhlinep3 - -"- +3
  editorhlinem1 - -"- -1

 Control items:

  linescroll - scroll the specified line (where the linescroll item is used)
  a_left     - align item to left   (eq to 'LCD_items=linepos,1,etc.')
  a_center   - align item to center (in the real LCD width (LCD_rows))
  a_right    - align item to right  (-"-)
   - you can use aligns instead of rowpos too (LCD_items=1,a_center,ITEM)
   - you can align 1 display-item only, you can't align a group of items

 Examples:

  LCD_items=1,1,artist," - ",title," (",p_timepos,"/",songtime,")",linescroll
  LCD_items=2,a_left,year,a_right,genre
  LCD_items=3,1,volmeter
  LCD_items=4,a_center,"Mpxplay"
  LCD_items1=1,1,"Volume:",mix_vol," Surround:",mix_sur
  LCD_items1=2,1,"Speed:",mix_spd," Balance:",mix_bal

-------------------------------------------------------------------------------
Other informations:

-SOUND CARD CONFIGURATION:

 ISA soundcards (or emulations on PCI cards):
 
  The program usually can autodetect the card if you don't set an environment 
  variable, but it's better (faster starting), if You do this before starting of the program.
  Use an environment variable to configure the PORT,IRQ and DMA values.
  (of course you must change the port, irq & dma numbers to your configuration)

  1. S16 : SET BLASTER=A220 I5 D1 H5 (port,irq,dma,hidma)       (SB16)

  2. ESS : SET BLASTER=A220 I5 D1 H5

  3. WSS : SET ULTRA16=530,1,5,0     (port,dma,irq,cardtype)

  4. GUS : SET ULTRASND=240,5,5,5,5  (port,dma1,dma2,irq1,irq2) (GUS Max)

  5. SBp : SET BLASTER=A220 I5 D1 T4 (port,irq,dma,cardtype)    (SB 2.xx, SB pro)

  (the ESS and WSS cards don't use IRQ, correct setting of IRQ is not required)

 Mpxplay does not set/modify the volume of the soundcard automatically.
 If the playing starts, but you don't hear sound, try/use the -scv option.

 If the playing starts, but it runs very fast (4x-10x faster) or
 it plays a short block of music, after that it stops (or the program freezes),
 then your DMA (or the IRQ) value is incorrect.
 Try the -sct option, maybe it shows the correct value(s).

 Mpxplay detects the 0,1,3,5,6,7 DMA channels only, if you use a different one,
 you must configure it manually (with the environment variable).


 PCI soundcards:
  - native hardware handling, no extra (DOS) drivers needed
  - detected/initialized automatically under DOS (under Windows they are disabled in the autodetection) (Linux,OS/2 and other OSs are not handled/detected, card will work like in DOS)
  - if Mpxplay finds an other card (or ignore the card under Win), try to use -scs option
  - Mpxplay doesn't use IRQ for them (this cannot cause problems)

  1. SBA : SB Live, Audigy 1,2 (EMU10K1,EMU10Kx chips)

  2. CMI : C-Media 8338/8738

  3. VIA : VIA VT686/8233/8235 (some mainboards support 48khz only (playing of a 44.1khz file is faster than normal),
                                then use -of 48000)
 
-PLAYLIST usage:
 -you can create a playlist:
  - under DOS with the  DIR /B/ON *.MP3 > PLAYLIST.M3U  command
  - with Mpxplay: MPXPLAY.EXE d:\*.*\*.* -@s playlist.m3u
              or: MPXPLAY.EXE -ds c -@s playlist.m3u
              or: MPXPLAY.EXE -ds c -@s playlist.m3u *.mp3

 -EXTENDED PLAYLIST (faster file info loading -> program starts playing faster):

  -create: MPXPLAY.EXE -@sx EXTLIST.MXU PLAYLIST.M3U
       or: MPXPLAY.EXE -@sx EXTLIST.MXU d:\*.*\*.*

  -use (load): MPXPLAY.EXE EXTLIST.MXU
           or: MPXPLAY.EXE -ig EXTLIST.MXU d:\*.*\*.*
           or: MPXPLAY.EXE -ig EXTLIST.MXU  (without input file(s) -> for faster directory browsing)

  - You can use sub-list(s) in extended playlist on this way:
    (you have to write these lines manually into the mxu list)
    ('' '' ''chars are ascii 176,177,178)
   -M3U sub-list:
     D:\AUDIOMP3\PLAYLIST.M3U[sub-list]00000000
   -MXU sub-list:
     D:\AUDIOMP3\PLAYLIST.MXU[sub-list]00000000

-ID3-TAG write/update in AAC/AC3/APE/MPC (APEv1-tag) and MP3/MP2 (ID3v1.1):
  
 -you can use -iw with -it options (-ita,-itt, etc.) (see readme.txt)

 -or you can use a -il listfile on this way:

  make a text file in this form (write artist:title after every filenames)(don't write spaces in the filenames):

  filenam1.MP3 artist1:title1
  filenam2.MP3 artist2:title2
  filenam3.MP3 artist3:title3

  Name it to !FILES and run my program with these options:

  MPXPLAY.EXE -iw -il !FILES playlist.m3u
  or
  MPXPLAY.EXE -iw -il !FILES *.*

  and the program will write this ID3 info(s) into the audio files.

  (the listfile (!FILES) is same like an m3u file, but with artist & title)

 examples:
 mpxplay.exe -iw -il !FILES -itl "80's collection" -itc "encoded by myself" playlist.m3u   (you can use -il and -it options together)
 mpxplay.exe -iw -ita "Name of the artist" -ity "2004" *.mp3              (modify/write artist and year tags in all MP3 files)
 mpxplay.exe -iw -itl "New album name" -itc "" track04.ape track11.ape   (modify the album and clear the comment in the track04.ape and track11.ape files)


-FRAMES: Mpxplay handles the files in frames. 1 frame is usually 4608 pcm bytes (1152*channels*2)
	 (1 sec = ca. 38 frames)(depends on the freq of file too)

-CD-WAV (CDW) : the cd-wav function is not a simple audio CD player, this is
 a real time Digital Audio Copy (it reads the cda sectors and writes them to
 the sound card), because of this you can use crossfade, speed control,
 auto volume correction and surround on audio CDs! (recommended to use -bp)

-USING MPXPLAY 
 - WITHOUT HARDDISK: I haven't tested it, try -db option
 - WITHOUT VGA CARD: I also haven't tested it, try -f0 option

-LESS CPU USAGE: the program uses less cpu time without spectrum analiser, 
 volume correction, surround, soundlimit and volume meter.
 Use this for slow CPUs: mpxplay.exe -sl 0 -ddma -f0 -v -bl -bn8 playlist.m3u
 OR: mpxplay.exe -sl 0 -ddma -bl -bn8 playlist.m3u
  and set in mpxplay.ini: Displaymode=76 or Displaymode=92 and Desktopmode=1018

-SOUNDLIMIT: cuts (don't write to the output) the signal below 
 "soundlimit" it doesn't play (only decode) while, and it finishes the play 
 (exit or step to next song in playlist) in last 400 frame when volume is 
 bellow or equal to soundlimit.
 Set it to 50 for disco, 10 for classical music, 1 to cut at 'digital noise'
 and 0 to disable soundlimit checking.

-VERBOSE: in verbose mode (-v) you get more informations (header info:layer,bitrate,etc.,
 ,ID3tag info:artist,title,year,...)(use it for -f0,-ff or -fl)

-TEST MODE: in test mode (-t) the program writes the output nowhere (null output)
 and you can test the speed of your computer and my program.
 You get the the results at the end of running.
 Index value must be above 100% to play properly audio (MP3) files.

-DISPLAYMODE configuration in mpxplay.ini:
 (default: 126=64+32+16+8+4+2; -fl: 2; -fl -v: 6=2+4; -fe -fs : 14=8+4+2)
(bit)(add the number to Displaymode variable)
       0 no display
 0.   +1 only frame counter is displayed (use it with -f0 (0) & -v (+4) only)
 1.   +2 timepos is displayed
 2.   +4 id3info & header are displayed (-v)
 3.   +8 use fullscreen
 4.  +16 use half screen editor (else fullscreen)
 5.  +32 spectrum analiser enabled
 6.  +64 use (change display to) 50 lines mode (else use the initial (DOS) resolution)

-DESKTOPMODE configuration (default: 1+2+8+16+32+64+128+256+512=1019):
 0.     +1  show song position line (....)
 1.     +2  show playlist position line (....)
 2.     +4  reserved (not used)
 3.     +8  show playlist editor elevator ()
 4.    +16  vertical editor sides (else horizontal)
 5.    +32  show filename with fullpath at the top of the editor
 6.    +64  show fulltime (in bottom right corner)
 7.   +128  show songtimes in editor
 8.   +256  show songnumbers in editor
 9.   +512  show drive letters in editor

10.  +1024  always show filenames in editor (filename artist:title)
11.  +2048  follow browser (via mouse) in editor
12.  +4096  shift playlist entry up or down by mouse (drag & move) (otherwise scroll editorside)

-------------------------------------------------------------------------------

Speed test results:

(index: mpxplay.exe -t -ff -sl 0 -db file.mp3 ; CPU: mpxplay.exe -fl -bl -bn8 file.mp3)

 On Intel Celeron 300A (4.5*66.6) with PC100 SDRAM and ASUS BX mainboard (program is optimized to this machine)

  MPXPLAY 1.47.6:   MP3: index:2650%  CPU:4%  (128kbit,MsStereo)
                    MP2: index:3358%  CPU:3%  (256kbit,Stereo)
                    MPC: index:2738%  CPU:4%  (154kbit,MsStereo)(-radio quality)
                    OGG: index:2317%  CPU:5%  (130kbit,c-Stereo)(Vorbis 1.0 encoded file)
                    AC3: index:1719%  CPU:7%  (192kbit,Stereo)

Speed comparison of different computers with different versions of Mpxplay
(index values of MP3 speed tests)

    CPU: 486DX2 AMDDX4 AMD5x86 Pentium PPRO  PII
    Mhz:   66    100     133     100   200   300

ver 1.47                                     2650
ver 1.46                                     2620
ver 1.45                                     2589
ver 1.44                                     2635
ver 1.43                               1750  2620
ver 1.42               175.8   423.3   1639  2502
ver 1.41               174.4   411.8   1619  2489
ver 1.40  93.3  134.1  173.7   418.3   1636  2485
ver 1.39  89.9  125.0  163.4   383.4   1504  2298
ver 1.38  89.1  123.7    -     376.7   1499  2284
ver 1.37  84.3  117.9    -       -     1410  2166
ver 1.36  84.3  117.3  162.0   339.8   1401  2156
ver 1.35  85.6  119.9  156.9   342.2   1369  2074
ver 1.34  84.0    -    155.0   326.3   1283  2033
ver 1.33  84.5  118.4  155.2   327.3   1275  2024
ver 1.32  84.7  118.8  154.8   329.3   1279  2024
ver 1.31        119.0  152.6   329.5   1365  2104
ver 1.30        118.3  152.7   326.2   1275  2009
ver 1.29        117.1  151.7   302.6   1106  1729
ver 1.28        115.7    -       -     1170  1786
ver 1.27          -      -       -      -    asm bug
ver 1.26        111.1  142.5   277.5   1000  1530
ver 1.25        110.7  142.7   280.4   1049  1617
ver 1.24        108.8  141.0   277.5   1037  1588
ver 1.21               138.8   269.8   1010  1542
ver 1.20               137.0   263.8    980  1477
ver 1.10               137.7   265.6    968  1458
ver 1.00               137.7   263.9    973  1462
ver 0.07               139.0   275.5   1002  1531
ver 0.06               139.2   276.0   1003  1530
ver 0.05               134.3   247.9    823  1154
ver 0.04               134.3   246.7    823  1158
ver 0.03               134.3   247.4    828  1173
original:                                     819
