home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.0 / NeXTSTEP3.0.iso / NextDeveloper / Headers / sound / filesound.h < prev    next >
Text File  |  1991-08-09  |  2KB  |  61 lines

  1.  
  2. /*
  3.  *    filesound.h
  4.  *    Copyright 1988-89 NeXT, Inc.
  5.  *
  6.  */
  7.  
  8. #import "soundstruct.h"
  9. #import "sounderror.h"
  10.  
  11. int SNDReadSoundfile(char *path, SNDSoundStruct **s);
  12. int SNDRead(int fd, SNDSoundStruct **s);
  13. /*
  14.  * Read the specified file, setting "s" to point at the newly allocated 
  15.  * SNDSoundStruct. SNDRead takes a unix file descriptor, whereas 
  16.  * SNDReadSoundfile takes a complete unix pathname; the two routines are 
  17.  * otherwise identical.
  18.  * An error code is returned; if an error occurs, "s" is undefined.
  19.  * If there is no error, the "s" is set and should eventually be deallocated 
  20.  * with SNDFree().
  21.  */
  22.  
  23. int SNDWriteSoundfile(char *path, SNDSoundStruct *s);
  24. int SNDWrite(int fBSSNDSoundStruct *s);
  25. /*
  26.  * Write the specified file to contain "s". SNDWrite takes a unix
  27.  * file descriptor to specify the file, whereas SNDWriteSoundfile takes
  28.  * a complete pathname; the two routines are otherwise identical.
  29.  * If the sound is fragmented from editing, it is written out in a
  30.  * non-fragmented manner (the next read of the file will result in a
  31.  * non-fragmented sound).
  32.  * An error code is returned.
  33.  */
  34.  
  35. int SNDReadHeader(int fd, SNDSoundStruct **s);
  36. /*
  37.  * Read the header portion of the specified file descriptor, setting "s"
  38.  * to point at the newly allocated SNDSoundStruct.
  39.  * The structure will have no raw data, though the dataLocation field
  40.  * will be contain the offset to it as if it were there (this defines the 
  41.  * extent of the header). An error code is returned and, if nonzero, "s" is
  42.  * set to nil.
  43.  * If there is no error, the "s" is set and should eventually be deallocated 
  44.  * with SNDFree().
  45.  */
  46.  
  47. int SNDWriteHeader(int fd, SNDSoundStruct *s);
  48. /*
  49.  * Write the header implied by "s" to the already opened file descriptor.
  50.  * An error code is returned.
  51.  */
  52.  
  53. int SNDReadDSPfile(char *path, SNDSoundStruct **s, char *info);
  54. /*
  55.  * Parse a Motorola load file (".lod" extension), and create a sound structure
  56.  * to correspond to it. The info string (optionally null) is put into the
  57.  * header.
  58.  */
  59.  
  60.  
  61.