home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 13 / AACD13.ISO / AACD / Sound / LAME / src / version.c < prev    next >
C/C++ Source or Header  |  2000-06-18  |  2KB  |  74 lines

  1. /*
  2.  *    Version numbering for LAME.
  3.  *
  4.  *    Copyright (c) 1999 A.L. Faber
  5.  *
  6.  * This library is free software; you can redistribute it and/or
  7.  * modify it under the terms of the GNU Library General Public
  8.  * License as published by the Free Software Foundation; either
  9.  * version 2 of the License, or (at your option) any later version.
  10.  *
  11.  * This library is distributed in the hope that it will be useful,
  12.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.     See the GNU
  14.  * Library General Public License for more details.
  15.  *
  16.  * You should have received a copy of the GNU Library General Public
  17.  * License along with this library; if not, write to the
  18.  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  19.  * Boston, MA 02111-1307, USA.
  20.  */
  21.  
  22.  
  23. #include "version.h"
  24. #include "lame.h"
  25. #include "get_audio.h"
  26. #include <stdio.h>
  27.  
  28. static char lpszVersion[80];
  29.  
  30. void lame_print_version(FILE *ofile) {
  31.   fprintf(ofile,"LAME version %s (www.sulaco.org/mp3) \n",get_lame_version());
  32.   /*
  33.   fprintf(ofile,"GPSYCHO: GPL psycho-acoustic and noise shaping model version %s. \n",get_psy_version());
  34.   */
  35. #ifdef LIBSNDFILE
  36.   sf_get_lib_version(lpszVersion,sizeof(lpszVersion));
  37.   fprintf(ofile,"Input handled by %s (www.zip.com.au/~erikd/libsndfile)\n",lpszVersion);
  38. #endif
  39. }
  40.  
  41.  
  42. char* get_lame_version(void)
  43. {
  44.     if (LAME_ALPHAVERSION>0)
  45.         sprintf(lpszVersion,"%d.%02d (alpha %d)",LAME_MAJOR_VERSION,LAME_MINOR_VERSION,LAME_ALPHAVERSION);
  46.     else if (LAME_BETAVERSION>0)
  47.         sprintf(lpszVersion,"%d.%02d (beta %d)",LAME_MAJOR_VERSION,LAME_MINOR_VERSION,LAME_BETAVERSION);
  48.     else
  49.         sprintf(lpszVersion,"%d.%02d",LAME_MAJOR_VERSION,LAME_MINOR_VERSION);
  50.     return lpszVersion;
  51. }
  52.  
  53. char* get_psy_version(void)
  54. {
  55.     if (PSY_ALPHAVERSION>0)
  56.         sprintf(lpszVersion,"%d.%02d (alpha %d)",PSY_MAJOR_VERSION,PSY_MINOR_VERSION,PSY_ALPHAVERSION);
  57.     else if (PSY_BETAVERSION>0)
  58.         sprintf(lpszVersion,"%d.%02d (beta %d)",PSY_MAJOR_VERSION,PSY_MINOR_VERSION,PSY_BETAVERSION);
  59.     else
  60.         sprintf(lpszVersion,"%d.%02d",PSY_MAJOR_VERSION,PSY_MINOR_VERSION);
  61.     return lpszVersion;
  62. }
  63.  
  64. char* get_mp3x_version(void)
  65. {
  66.     if (MP3X_ALPHAVERSION>0)
  67.         sprintf(lpszVersion,"%d:%02d (alpha %d)",MP3X_MAJOR_VERSION,MP3X_MINOR_VERSION,MP3X_ALPHAVERSION);
  68.     else if (MP3X_BETAVERSION>0)
  69.         sprintf(lpszVersion,"%d:%02d (beta %d)",MP3X_MAJOR_VERSION,MP3X_MINOR_VERSION,MP3X_BETAVERSION);
  70.     else
  71.         sprintf(lpszVersion,"%d:%02d",MP3X_MAJOR_VERSION,MP3X_MINOR_VERSION);
  72.     return lpszVersion;
  73. }
  74.