This is SoundFileIn.h in view mode; [Download] [Up]
// // Programmer: Craig Stuart Sapp <craig@ccrma.stanford.edu> // Creation Date: Fri Nov 1 23:35:02 PST 1996 // Last Modified: Mon Apr 28 21:52:13 GMT-0800 1997 // Filename: ...sig/src/Generator/SoundFileIn/SoundFileIn.h // Syntax: C++ // $Smake: cc -Wall -g -c %b.cc -I../../../include && rm -f %b.o // #ifndef _SOUNDFILEIN_H_INCLUDED #define _SOUNDFILEIN_H_INCLUDED #include <fstream.h> #include <iostream.h> #include <assert.h> #include "Generator.h" #include "SoundHeader.h" #include "HelperFunctions.h" #include "Array.h" class SoundFileIn : public Generator { public: SoundFileIn (char* aFileName = "", float start=NONE, float dur = NONE); ~SoundFileIn(); void action (void); int getChannels (void); long getSamples (void); SoundHeader& getHeader (void); sampleType output (int channel = 0); void printState (void); void reset (int sampleIndex = 0); void setFile (char* aFileName, float start = NONE, float dur = NONE); protected: fstream sndfile; // soundfile input stream char *filename; // name of the soundfile SoundHeader sndHeader; // header from soundfile long curSampleIndex; // the current sample number long begSampleIndex; // the first sample number long endSampleIndex; // the last sample number long maxSampleIndex; // the highest sample index value int loopingQ; int runningQ; Array<sampleType> Output; // output samples, by channel }; #endif _SOUNDFILEIN_H_INCLUDED
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.