home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 November / CMCD1104.ISO / Software / Complet / ZynAddFX / Setup_ZynAddSubFX-2.1.1.exe / Recorder.h < prev    next >
Encoding:
C/C++ Source or Header  |  2004-03-05  |  1.3 KB  |  53 lines

  1. /*
  2.   ZynAddSubFX - a software synthesizer
  3.  
  4.   Recorder.h - Records sound to a file
  5.   Copyright (C) 2002-2004 Nasca Octavian Paul
  6.   Author: Nasca Octavian Paul
  7.  
  8.   This program is free software; you can redistribute it and/or modify
  9.   it under the terms of version 2 of the GNU General Public License 
  10.   as published by the Free Software Foundation.
  11.  
  12.   This program is distributed in the hope that it will be useful,
  13.   but WITHOUT ANY WARRANTY; without even the implied warranty of
  14.   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15.   GNU General Public License (version 2) for more details.
  16.  
  17.   You should have received a copy of the GNU General Public License (version 2)
  18.   along with this program; if not, write to the Free Software Foundation,
  19.   Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
  20.  
  21. */
  22.  
  23. #ifndef RECORDER_H
  24. #define RECORDER_H
  25.  
  26. #include "../globals.h"
  27.  
  28. class Recorder{
  29.     public:
  30.     Recorder();
  31.     ~Recorder();
  32.     int preparefile(char *filename_,int overwrite);//returns 1 if the file exists
  33.     void start();
  34.     void stop();
  35.     void pause();
  36.     int recording();
  37.     void triggernow();
  38.     void recordbuffer(REALTYPE *outl,REALTYPE *outr);
  39.     
  40.     /* Status:
  41.        0 - not ready(no file selected),
  42.        1 - ready
  43.        2 - recording */
  44.     int status;
  45.     
  46.     private:
  47.     int file;        
  48.     short int *recordbuf_16bit;
  49.     int sampleswritten,notetrigger;
  50. };
  51.  
  52. #endif
  53.