// // Programmer: Craig Stuart Sapp // Creation Date: Mon Nov 3 20:09:26 PST 1997 // Last Modified: Mon Nov 3 20:09:29 PST 1997 // Filename: ...sig/maint/code/Filter/ResoundOut/ResoundOut.cpp // Web Address: http://sig.sapp.org/src/sigSignal/ResoundOut.cpp // Documentation: http://sig.sapp.org/doc/classes/ResoundOut // Syntax: C++ // #include "ResoundOut.h" #include "helperFunctions.h" #include ////////////////////////////// // // ResoundOut::ResoundOut -- // ResoundOut::ResoundOut(short* soundData, SoundHeader& header) { data = soundData; setName("ResoundOut"); sndheader = header; sampleCount = 0; brandname = FILTER; } ////////////////////////////// // // ResoundOut::~ResoundOut -- // ResoundOut::~ResoundOut() { // do nothing } ////////////////////////////// // // ResoundOut::action -- // void ResoundOut::action(void) { static int i; if (sampleCount / sndheader.getChannels() >= sndheader.getSamples()-1) { // trying to go beyond allocated space for sound cerr << "Error: Invalid array location in output sound." << endl; exit(1); } for (i=0; i> 8); data[sampleCount] = (lowbyte << 8) + hibyte; #else data[sampleCount] = SampleToShort(inputs[i]); #endif } sampleCount++; } ////////////////////////////// // // ResoundOut::clear -- // void ResoundOut::clear(void) { sampleCount = 0; } ////////////////////////////// // // ResoundOut::output -- // sampleType ResoundOut::output(int channel) { return inputs[channel]; } // md5sum: ec88530d48a73e7288d45515910baf17 ResoundOut.cpp [20010708]