ftp.nice.ch/pub/next/unix/audio/line2sine.1.0.NI.bs.tar.gz#/line2sine/include/HelperFunctions.h

This is HelperFunctions.h in view mode; [Download] [Up]

//
// Programmer:    Craig Stuart Sapp <craig@ccrma.stanford.edu>
// Creation Date: Sat Nov  2 23:37:12 PST 1996
// Last Modified: Sat Nov  2 23:37:21 PST 1996
// Filename:      /Users/craig/lang/c/sig/src/misc/HelperFunctions.h
// Syntax:        C++ (Gnu C++ Complier: /Local/Unix/bin/g++)
// $Smake:        g++ -O -o %b %f && strip %b
//


#ifndef _HELPERFUNCTIONS_H_INCLUDED
#define _HELPERFUNCTIONS_H_INCLUDED

#include "Signal.h"
#include "Definitions.h"
#include <fstream.h>

#include "FileIO.h"



//////////////////////////////
//
// channels
//

int channels(char* filename);



//////////////////////////////
//
// duration
//

float duration(char* filename);
float duration(xSoundHeader& h);


//////////////////////////////
//
// PrintSoundHeader
//

void PrintSoundHeader(const xSoundHeader& header);



//////////////////////////////
//
// ReadSoundHeader
//

void ReadSoundHeader(char* filename, xSoundHeader& header);



//////////////////////////////
//
// samples
//

uint samples(char* filename);



//////////////////////////////
//
// SampleToShort -- converts a number in the range -1.0 to 1.0
//	to a number in the range -32768 to 32767.  If the number
//      is out of the input range then it will be limited to the
//	maximum in the direction (and not wrap around).
//

short SampleToShort(sampleType aSample);
   



//////////////////////////////
//
// Tick
//

void Tick(Signal& sig);



//////////////////////////////
//
// WriteSoundHeader
//

void WriteSoundHeader(ofstream& out, xSoundHeader& header);



#endif  _HELPERFUNCTIONS_H_INCLUDED

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.