st.h File Reference

#include "wav.h"
#include <stdio.h>
#include "machine.h"

Include dependency graph for st.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  signalinfo
struct  loopinfo
struct  instrinfo
struct  pipeinfo
struct  soundstream

Defines

#define IMPORT   extern
#define EXPORT
#define MIDI_UNITY   60
#define LOOP_NONE   0
#define LOOP_8   1
#define LOOP_SUSTAIN_DECAY   2
#define PRIVSIZE   100
#define NLOOPS   8
#define FILE_STEREO   1
#define FILE_LOOPS   2
#define FILE_INSTR   4
#define BYTESCI   1
#define WORDSCI   2
#define LONGSCI   4
#define FLOATSCI   5
#define DOUBLESCI   6
#define IEEE   7
#define UNSIGNED   1
#define SIGN2   2
#define ULAW   3
#define ALAW   4
#define P1(x)
#define P2(x, y)
#define P3(x, y, z)
#define P4(x, y, z, w)
#define MAXRATE   50L * 1024
#define RIGHT(datum, bits)   ((datum) >> bits)
#define LEFT(datum, bits)   ((datum) << bits)
#define M_PI   3.14159265358979323846
#define READBINARY   "r"
#define WRITEBINARY   "w"
#define REMOVE   unlink

Typedefs

typedef soundstreamft_t
typedef unsigned int u_i
typedef unsigned long u_l
typedef unsigned short u_s

Functions

unsigned short rlshort (P1(ft_t ft))
unsigned short rbshort (P1(ft_t ft))
void wlshort (P2(ft_t ft, unsigned short us))
void wbshort (P2(ft_t ft, unsigned short us))
unsigned long rllong (P1(ft_t ft))
unsigned long rblong (P1(ft_t ft))
void wllong (P2(ft_t ft, unsigned long ul))
void wblong (P2(ft_t ft, unsigned long ul))
unsigned short rshort (P1(ft_t ft))
void wshort (P2(ft_t ft, unsigned short us))
unsigned long rlong (P1(ft_t ft))
void wlong (P2(ft_t ft, unsigned long ul))
float rfloat (P1(ft_t ft))
void wfloat (ft_t ft, float f)
double rdouble (P1(ft_t ft))
void wdouble (P2(ft_t ft, double d))
unsigned int swapi (P1(unsigned int us))
unsigned short swapw (P1(unsigned short us))
unsigned long swapl (P1(unsigned long ul))
float swapf (P1(float f))
double swapd (P1(double d))
IMPORT void report (P2(char *,...))
IMPORT void warn (P2(char *,...))
IMPORT void fail (P2(char *,...))
char * version ()
int wavread __PARAMS ((ft_t ft, long int *buf, long int len))
void wavstartread __PARAMS ((ft_t ft, WavInfo *, int flag))
void wavstartwrite __PARAMS ((ft_t ft))
int rawread __PARAMS ((ft_t ft, long *buf, long nsamp))

Variables

IMPORT struct soundstream
informat 
outformat
IMPORT char * sizes []
IMPORT char * styles []
IMPORT float volume
IMPORT int dovolume
IMPORT float amplitude
IMPORT int summary
IMPORT char * myname
IMPORT int soxpreview


Define Documentation

#define ALAW   4

Definition at line 122 of file st.h.

Referenced by rawread(), rawwrite(), and wavwritehdr().

#define BYTESCI   1

Definition at line 110 of file st.h.

Referenced by rawread(), rawwrite(), and wavwritehdr().

#define DOUBLESCI   6

Definition at line 114 of file st.h.

#define EXPORT

Definition at line 19 of file st.h.

#define FILE_INSTR   4

Definition at line 106 of file st.h.

#define FILE_LOOPS   2

Definition at line 105 of file st.h.

#define FILE_STEREO   1

Definition at line 104 of file st.h.

#define FLOATSCI   5

Definition at line 113 of file st.h.

Referenced by checkformat(), rawread(), and rawwrite().

#define IEEE   7

Definition at line 115 of file st.h.

#define IMPORT   extern

Definition at line 18 of file st.h.

#define LEFT ( datum,
bits   )     ((datum) << bits)

Definition at line 199 of file st.h.

#define LONGSCI   4

Definition at line 112 of file st.h.

Referenced by wavwritehdr().

#define LOOP_8   1

Definition at line 68 of file st.h.

#define LOOP_NONE   0

Definition at line 67 of file st.h.

#define LOOP_SUSTAIN_DECAY   2

Definition at line 69 of file st.h.

#define M_PI   3.14159265358979323846

Definition at line 203 of file st.h.

#define MAXRATE   50L * 1024

Definition at line 189 of file st.h.

#define MIDI_UNITY   60

Definition at line 64 of file st.h.

#define NLOOPS   8

Definition at line 84 of file st.h.

#define P1 ( x   ) 

Definition at line 132 of file st.h.

#define P2 ( x,
y   ) 

Definition at line 133 of file st.h.

#define P3 ( x,
y,
z   ) 

Definition at line 134 of file st.h.

#define P4 ( x,
y,
z,
w   ) 

Definition at line 135 of file st.h.

#define PRIVSIZE   100

Definition at line 82 of file st.h.

#define READBINARY   "r"

Definition at line 222 of file st.h.

Referenced by loadwave().

#define REMOVE   unlink

Definition at line 245 of file st.h.

#define RIGHT ( datum,
bits   )     ((datum) >> bits)

Definition at line 198 of file st.h.

#define SIGN2   2

Definition at line 120 of file st.h.

Referenced by rawread(), rawwrite(), savewave(), and wavwritehdr().

#define ULAW   3

Definition at line 121 of file st.h.

Referenced by rawread(), rawwrite(), and wavwritehdr().

#define UNSIGNED   1

Definition at line 119 of file st.h.

Referenced by rawread(), rawwrite(), and wavwritehdr().

#define WORDSCI   2

Definition at line 111 of file st.h.

Referenced by rawread(), rawwrite(), savewave(), and wavwritehdr().

#define WRITEBINARY   "w"

Definition at line 226 of file st.h.

Referenced by savewave().


Typedef Documentation

typedef struct soundstream* ft_t

Definition at line 101 of file st.h.

typedef unsigned int u_i

Definition at line 173 of file st.h.

typedef unsigned long u_l

Definition at line 174 of file st.h.

typedef unsigned short u_s

Definition at line 175 of file st.h.


Function Documentation

int rawread __PARAMS ( (ft_t ft, long *buf, long nsamp)   ) 

void wavstartwrite __PARAMS ( (ft_t ft  ) 

void wavstartread __PARAMS ( (ft_t ft, WavInfo *, int flag  ) 

int wavread __PARAMS ( (ft_t ft, long int *buf, long int len  ) 

IMPORT void fail ( P2(char *,...)   ) 

unsigned long rblong ( P1(ft_t ft  ) 

unsigned short rbshort ( P1(ft_t ft  ) 

double rdouble ( P1(ft_t ft  ) 

IMPORT void report ( P2(char *,...)   ) 

Referenced by PannerCallback(), and ViewportCallback().

Here is the caller graph for this function:

float rfloat ( P1(ft_t ft  ) 

unsigned long rllong ( P1(ft_t ft  ) 

unsigned long rlong ( P1(ft_t ft  ) 

unsigned short rlshort ( P1(ft_t ft  ) 

unsigned short rshort ( P1(ft_t ft  ) 

double swapd ( P1(double d)   ) 

float swapf ( P1(float f)   ) 

unsigned int swapi ( P1(unsigned int us)   ) 

unsigned long swapl ( P1(unsigned long ul)   ) 

unsigned short swapw ( P1(unsigned short us)   ) 

char* version (  ) 

IMPORT void warn ( P2(char *,...)   ) 

void wblong ( P2(ft_t ft, unsigned long ul)   ) 

void wbshort ( P2(ft_t ft, unsigned short us)   ) 

void wdouble ( P2(ft_t ft, double d)   ) 

void wfloat ( ft_t  ft,
float  f 
)

Definition at line 198 of file misc.c.

References soundstream::fp, ft, soundstream::ierr, sciprint(), soundstream::swap, swapf(), t, and writerr.

00199 {
00200   float t = f;
00201   if (ft->swap)
00202     t = swapf(t);
00203   if (fwrite(&t, sizeof(float), 1, ft->fp) != 1)
00204     {
00205       sciprint("%s\r\n",writerr);
00206       ft->ierr=1;
00207     }
00208 }

Here is the call graph for this function:

void wllong ( P2(ft_t ft, unsigned long ul)   ) 

void wlong ( P2(ft_t ft, unsigned long ul)   ) 

void wlshort ( P2(ft_t ft, unsigned short us)   ) 

void wshort ( P2(ft_t ft, unsigned short us)   ) 


Variable Documentation

IMPORT float amplitude

Definition at line 180 of file st.h.

IMPORT int dovolume

Definition at line 178 of file st.h.

IMPORT char* myname

Definition at line 185 of file st.h.

IMPORT struct soundstream informat outformat

Definition at line 100 of file st.h.

IMPORT char* sizes[]

Definition at line 124 of file st.h.

IMPORT int soxpreview

Definition at line 187 of file st.h.

IMPORT char * styles[]

Definition at line 124 of file st.h.

IMPORT int summary

Definition at line 183 of file st.h.

IMPORT float volume

Definition at line 177 of file st.h.


Generated on Sun Mar 4 16:12:41 2007 for Scilab [trunk] by  doxygen 1.5.1