summaryrefslogtreecommitdiff
path: root/sndobj/SndIO.h
diff options
context:
space:
mode:
authorJohn Glover <glover.john@gmail.com>2011-06-24 18:17:23 +0100
committerJohn Glover <glover.john@gmail.com>2011-06-24 18:17:23 +0100
commit416bd737074a287ea47106c73ea6bcfde40a75a8 (patch)
tree74562303d4f4f2f2e010f7e13cba41dc4852b50c /sndobj/SndIO.h
parentd26519464dcbf8c3682348167c29454961facefe (diff)
downloadsimpl-416bd737074a287ea47106c73ea6bcfde40a75a8.tar.gz
simpl-416bd737074a287ea47106c73ea6bcfde40a75a8.tar.bz2
simpl-416bd737074a287ea47106c73ea6bcfde40a75a8.zip
Change to using distutils.
Currently only builds the simplsndobj module
Diffstat (limited to 'sndobj/SndIO.h')
-rw-r--r--sndobj/SndIO.h139
1 files changed, 0 insertions, 139 deletions
diff --git a/sndobj/SndIO.h b/sndobj/SndIO.h
deleted file mode 100644
index ad9456e..0000000
--- a/sndobj/SndIO.h
+++ /dev/null
@@ -1,139 +0,0 @@
-
-////////////////////////////////////////////////////////////////////////
-// This file is part of the SndObj library
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// Copyright (c)Victor Lazzarini, 1997-2004
-// See License.txt for a disclaimer of all warranties
-// and licensing information
-
-//************************************************************//
-// SndIO.h: interface of the SndIO base class. //
-// //
-// //
-// //
-//************************************************************//
-#ifndef _SNDIO_H
-#define _SNDIO_H
-#include <math.h>
-#include "SndObj.h"
-
-enum{FLOATSAM=0, BYTESAM, SHORTSAM_LE};
-const int SHORTSAM_BE = -2;
-const int S24LE = 3;
-const int S24BE = -3;
-const int LONGSAM = 4;
-
-enum{SND_INPUT, SND_OUTPUT, SND_IO};
-
-
-#ifdef WIN
-const int SHORTSAM = SHORTSAM_LE;
-#endif
-
-#ifdef OSS
-const int SHORTSAM = SHORTSAM_LE;
-#endif
-
-#ifdef ALSA
-const int SHORTSAM = SHORTSAM_LE;
-const int LONGSAM_LE = LONGSAM;
-const int LONGSAM_BE = 5;
-const int TWENTY_FOUR = 6;
-const int TWENTYFOUR_LE = TWENTY_FOUR;
-const int TWENTYFOUR_BE = 7;
-#endif
-
-
-#ifdef SGI
-const int SHORTSAM = SHORTSAM_BE;
-#endif
-
-#if defined(MACOSX) && defined(WORDS_BIGENDIAN)
-const int SHORTSAM = SHORTSAM_BE;
-#endif
-
-#if defined(MACOSX) && !defined(WORDS_BIGENDIAN)
-const int SHORTSAM = SHORTSAM_LE;
-#endif
-
-
-
-struct _24Bit {
- char s[3];
-};
-
-
-class SndIO {
-
- protected:
-
- SndObj** m_IOobjs;
- double* m_output;
- double m_sr;
- short m_channels;
- short m_bits;
- int m_vecsize;
- int m_vecsize_max;
- int m_vecpos;
- int m_error;
- int m_samples;
-
- short VerifySR(SndObj *InObj){
- if(InObj->GetSr() != m_sr) return 0;
- else return 1;
- }
-
- public:
- short m_sampsize;
-
- double GetSr(){ return m_sr; }
- int GetVectorSize() { return m_vecsize; }
- void SetVectorSize(int vecsize);
- void LimitVectorSize(int limit) {
- if(limit <= m_vecsize_max){
- m_vecsize = limit;
- m_samples = m_vecsize*m_channels;
- }
- }
- void RestoreVectorSize(){ m_vecsize = m_vecsize_max; }
- short GetChannels() { return m_channels; }
- short GetSize() { return m_bits; }
- double Output(int pos){ return m_output[pos]; }
- double Output(int pos, int channel){
- return m_output[(pos*m_channels)+(channel-1)];
- }
- short SetOutput(short channel, SndObj* input){
- if(channel <= m_channels){
- m_IOobjs[channel-1] = input;
- return 1;
- } else return 0;
- }
-
- SndIO(short channels=1, short bits=16,SndObj** inputlist=0,
- int vecsize = DEF_VECSIZE, double sr = DEF_SR);
- virtual ~SndIO();
- virtual short Read();
- virtual short Write();
- virtual char* ErrorMessage();
- int Error() { return m_error; }
-
-};
-
-
-
-#endif
-