// // Programmer: Craig Stuart Sapp // Creation Date: Sat Apr 19 23:52:50 GMT-0800 1997 // Last Modified: Sun May 25 01:46:38 GMT-0800 1997 // Filename: ...sig/doc/examples/sig/sigfile/envelope/envelope.cpp // Syntax: C++; sig // // Description: apply an amplitude envelope to a sound file // #include "sigAudio.h" #ifndef OLDCPP #include using namespace std; #else #include #endif void exitUsage(const char* command); int main(int argc, char* argv[]) { if (argc != 4) exitUsage(argv[0]); SoundHeader header(argv[2]); // Elements: SoundFileIn insound(argv[2]); Envelope envelope(argv[1], header.getSamples()); SoundFileOut outsound(argv[3], header); Multiply multiply[insound.getChannels()]; // Connections: for (int i=0; i