2009-12-15 22:39:18 +00:00
|
|
|
/* PROJECT: ReactOS sndrec32
|
|
|
|
* LICENSE: GPL - See COPYING in the top level directory
|
|
|
|
* FILE: base/applications/sndrec32/audio_receiver.hpp
|
|
|
|
* PURPOSE: Audio receiver
|
|
|
|
* PROGRAMMERS: Marco Pagliaricci (irc: rendar)
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-11-30 18:54:41 +00:00
|
|
|
#ifndef _AUDIORECEIVER_DEF__H_
|
|
|
|
#define _AUDIORECEIVER_DEF__H_
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include "audio_def.hpp"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_AUDIO_NAMESPACE_START_
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-15 22:39:18 +00:00
|
|
|
|
2009-11-30 18:54:41 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class audio_receiver
|
|
|
|
{
|
|
|
|
|
2009-12-15 22:39:18 +00:00
|
|
|
//
|
|
|
|
// The `audio_wavein' class, while is
|
|
|
|
// recording audio, has to access to
|
|
|
|
// protected members of `audio_receiver'
|
|
|
|
// such as `bytes_received' protected
|
|
|
|
// variable.
|
|
|
|
//
|
2009-11-30 18:54:41 +00:00
|
|
|
|
2009-12-15 22:39:18 +00:00
|
|
|
friend class audio_wavein;
|
2009-11-30 18:54:41 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-15 22:39:18 +00:00
|
|
|
protected:
|
2009-11-30 18:54:41 +00:00
|
|
|
|
2009-12-03 19:00:41 +00:00
|
|
|
|
2009-12-15 22:39:18 +00:00
|
|
|
unsigned int bytes_received;
|
2009-12-03 19:00:41 +00:00
|
|
|
|
2009-11-30 18:54:41 +00:00
|
|
|
|
|
|
|
|
2009-12-15 22:39:18 +00:00
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
// Ctors
|
|
|
|
//
|
2009-11-30 18:54:41 +00:00
|
|
|
|
2009-12-15 22:39:18 +00:00
|
|
|
audio_receiver( void )
|
|
|
|
: bytes_received( 0 )
|
|
|
|
{ }
|
2009-11-30 18:54:41 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-15 22:39:18 +00:00
|
|
|
//
|
|
|
|
// Dtor
|
|
|
|
//
|
2009-11-30 18:54:41 +00:00
|
|
|
|
2009-12-15 22:39:18 +00:00
|
|
|
virtual ~audio_receiver( void )
|
|
|
|
{ }
|
2009-11-30 18:54:41 +00:00
|
|
|
|
2009-12-03 19:00:41 +00:00
|
|
|
|
2009-11-30 18:54:41 +00:00
|
|
|
|
2009-12-15 22:39:18 +00:00
|
|
|
|
|
|
|
//
|
|
|
|
// Public Functions
|
|
|
|
//
|
2009-12-03 19:00:41 +00:00
|
|
|
|
2009-12-15 22:39:18 +00:00
|
|
|
virtual void audio_receive( unsigned char *, unsigned int ) = 0;
|
|
|
|
|
2009-11-30 18:54:41 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-15 22:39:18 +00:00
|
|
|
void set_b_received( unsigned int r )
|
|
|
|
{ bytes_received = r; }
|
2009-11-30 18:54:41 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_AUDIO_NAMESPACE_END_
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif //ifdef _AUDIORECEIVER_DEF__H_
|