Main Page   Alphabetical List   Compound List   File List   Compound Members   Related Pages  

AOut.h

00001 /*
00002 
00003   $Id: AOut.h,v 1.9 2001/08/21 18:40:38 robux4 Exp $ 
00004 
00005 
00006   $Log: AOut.h,v $
00007   Revision 1.9  2001/08/21 18:40:38  robux4
00008   Added for safe ID3v2 keeping and no overwrite
00009   
00010   Revision 1.8  2001/08/16 20:00:33  robux4
00011   Added the encoding DLL location in the abuot box
00012   
00013   Revision 1.7  2001/08/15 17:21:50  robux4
00014   Added force channel support
00015   
00016   Revision 1.6  2001/08/01 19:40:16  robux4
00017   Updated with complete documentation support
00018   
00019   Revision 1.5  2001/07/31 18:50:53  robux4
00020   Moved the version handling in the ALameDLL class
00021 
00022   Revision 1.4  2001/07/27 16:38:49  robux4
00023   Unified the MessageBox handling
00024 
00025   Revision 1.3  2001/07/26 19:28:49  robux4
00026   Added CVS tags
00027 
00028 */
00029 
00030 #if !defined(_AOUT_H__INCLUDED_)
00031 #define _AOUT_H__INCLUDED_
00032 
00033 #if _MSC_VER >= 1000
00034 #pragma once
00035 #endif // _MSC_VER >= 1000
00036 
00037 #include <windows.h>
00038 #include <string>
00039 
00040 // used classes/types
00041 #include "Out.h"
00042 
00043 // used internal classes/types
00044 #include "ADbg/ADbg.h"
00045 #include "AEncodeProperties.h"
00046 #include "ALameDLL.h"
00047 
00051 class AOut  
00052 {
00053 public:
00057   AOut();
00058 
00062   virtual ~AOut();
00063 
00064   // used as function pointers by the plugin
00070   static void config(HWND hwndParent);
00076   static void about(HWND hwndParent);
00080   static void init();
00084   static void quit();
00088   static int  open(int samplerate, int numchannels, int bitspersamp, int bufferlenms, int prebufferms);
00092   static void close();
00096   static int  write(char *buf, int len);
00100   static int  canwrite();
00104   static int  isplaying();
00108   static int  pause(int pause);
00112   static void setvolume(int volume);
00116   static void setpan(int pan);
00120   static void flush(int t);
00124   static int  getoutputtime();
00128   static int  getwrittentime();
00129 
00133   static Out_Module * GetOutModule();
00134 
00139   static inline HINSTANCE GetInstance() { return the_Module.hDllInstance; }
00140 
00144   static inline const char * GetVersion() {return the_version_name;}
00145 
00149   static bool GetLameVersion(BE_VERSION * ver);
00150 
00154   static int MyMessageBox(const char * the_output, const UINT the_type, const HWND the_parent = NULL);
00155 
00159   static const ALameDLL & LameDLL() { return the_LameDLL; }
00160 
00161 private:
00165   static AEncodeProperties my_Properties;
00166 
00167   static int my_EncodingChannels;
00168 
00169   static ADbg         the_Debug;
00170   static HANDLE       the_OutputFile;
00171   static DWORD        the_MaxBuffer;
00172   static DWORD        the_Channels;
00173   static DWORD        the_SamplesPerSec;
00174   static unsigned int the_WorkingBufferUseSize;
00175 //  static char*        the_WorkingBuffer;
00176   static char         the_WorkingBuffer[];
00177   static DWORD        the_SamplesPerBlock;
00178   static DWORD        the_SamplesUsed;
00179   static Out_Module   the_Module;
00180   static ALameDLL     the_LameDLL;
00181   static std::string  my_Filename;
00182 
00186   static char the_version_name[10];
00187   static char the_complete_name[31];
00188 
00192   static void replaceAllChar(std::string & the_string, const char src, const char dst);
00193 
00199   static void UpMixToStereo(SHORT* psData,SHORT* psOutData,DWORD dwNumSamples);
00200 
00206   static void MixToMono(SHORT* psData,SHORT* psOutData,DWORD dwNumSamples);
00207 
00212   static AOut * the_AOut;
00213 
00214 };
00215 
00216 #endif // !defined(_AOUT_H__INCLUDED_)

Generated at Tue Aug 21 21:10:48 2001 for out_lame by doxygen1.2.9.1 written by Dimitri van Heesch, © 1997-2001