home *** CD-ROM | disk | FTP | other *** search
/ Windows 95 Secrets / Secrets2.iso / Audio / WAV / Maplay4 / _SETUP.1 / beos_obuffer.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-07-08  |  1.5 KB  |  57 lines

  1. /* beos_obuffer.h
  2.  
  3.      Output buffer for BeOS written by Philippe Thomas
  4.    (tphilippe@sdv.fr), using Pierre Brua's cAudioWrap class.
  5.  
  6.    This program is free software; you can redistribute it and/or modify
  7.    it under the terms of the GNU General Public License as published by
  8.    the Free Software Foundation; either version 2 of the License, or
  9.    (at your option) any later version.
  10.  
  11.    This program 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
  14.    GNU General Public License for more details.
  15.  
  16.    You should have received a copy of the GNU General Public License
  17.    along with this program; if not, write to the Free Software
  18.    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
  19.  
  20. #ifndef BEOS_OBUFFER_H
  21. #define BEOS_OBUFFER_H
  22.  
  23. #include "obuffer.h"
  24. #include "beos_audiowrap.h"
  25.  
  26. // An audio output class for raw pcm output
  27. // or if ULAW is defined:
  28. // An audio output class for 8-bit ulaw output at 8 kHz:
  29. class BeObuffer : public Obuffer
  30. {
  31. private:
  32. #ifdef ULAW
  33.   ulawsample buffer[OBUFFERSIZE];
  34.   ulawsample *bufferp[MAXCHANNELS];
  35. #else
  36.   int16 buffer[OBUFFERSIZE];
  37.   int16 *bufferp[MAXCHANNELS];
  38. #endif
  39.   uint32 channels;
  40.  
  41.   cAudioWrap *audio_wrapper;
  42.  
  43. public:
  44.     BeObuffer (uint32 number_of_channels);
  45.        ~BeObuffer (void);
  46.   void    append (uint32 channel, int16 value);
  47.   void    write_buffer (int fd);
  48.  
  49. #ifdef SEEK_STOP
  50.   void clear_buffer(void);
  51.   void set_stop_flag(void);
  52. #endif
  53.  
  54. };
  55.  
  56. #endif // BEOS_OBUFFER_H
  57.