ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

audio_resampler_acm.hpp
Go to the documentation of this file.
00001 /* PROJECT:         ReactOS sndrec32
00002  * LICENSE:         GPL - See COPYING in the top level directory
00003  * FILE:            base/applications/sndrec32/audio_resampler_acm.hpp
00004  * PURPOSE:         Windows ACM wrapper
00005  * PROGRAMMERS:     Marco Pagliaricci (irc: rendar)
00006  */
00007 
00008 
00009 #ifndef _AUDIORESAMPLERACM__H_
00010 #define _AUDIORESAMPLERACM__H_
00011 
00012 
00013 
00014 #include "audio_def.hpp"
00015 #include "audio_receiver.hpp"
00016 #include "audio_format.hpp"
00017 
00018 
00019 
00020 
00021 _AUDIO_NAMESPACE_START_
00022 
00023 
00024 
00025 //TODO: inherit from a base resampler?
00026 class audio_resampler_acm : public audio_receiver
00027 {
00028 
00029     private:
00030         void init_( void );
00031 
00032 
00033     protected:
00034 
00035 
00036         HACMSTREAM acm_stream;
00037         ACMSTREAMHEADER acm_header;
00038         DWORD src_buflen;
00039         DWORD dst_buflen;
00040         bool stream_opened;
00041 
00042         audio_format audfmt_in;
00043         audio_format audfmt_out;
00044 
00045         float buf_secs;
00046 
00047         WAVEFORMATEX wformat_src;
00048         WAVEFORMATEX wformat_dst;
00049 
00050 
00051 
00052 
00053     public:
00054 
00055 
00056         //
00057         // Ctors
00058         //
00059 
00060         audio_resampler_acm( audio_format fmt_in, audio_format fmt_out )
00061             : acm_stream( 0 ), src_buflen( 0 ), dst_buflen( 0 ),
00062             stream_opened( false ), audfmt_in( fmt_in ), audfmt_out( fmt_out ),
00063             buf_secs( _AUDIO_DEFAULT_BUFSECS )
00064 
00065         {   
00066         
00067 
00068             init_();
00069         
00070         
00071         }
00072 
00073 
00074 
00075         
00076         
00077         //
00078         // Dtor
00079         //
00080 
00081         ~audio_resampler_acm( void )
00082         {   }
00083 
00084 
00085 
00086         //
00087         // Public functions
00088         //
00089 
00090         void open( void );
00091         void close( void );
00092 
00093 
00094 
00095         void audio_receive( unsigned char *, unsigned int );
00096 
00097 
00098 
00099 };
00100 
00101 
00102 _AUDIO_NAMESPACE_END_
00103 
00104 
00105 
00106 
00107 #endif //ifdef _AUDIORESAMPLERACM_H_

Generated on Sat May 26 2012 04:16:26 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.