home *** CD-ROM | disk | FTP | other *** search
/ Resource Library: Multimedia / Resource Library: Multimedia.iso / maestro / source / dtr / snspcstf < prev    next >
Encoding:
Text File  |  1993-06-15  |  2.5 KB  |  68 lines

  1. audio.c:
  2.  
  3. InitAudio() 
  4. InitAudioControl()
  5. AudioOpen()
  6. AudioReadState()
  7. AudioUpdatePanel()
  8. SigpollAsyncHandler() --- signal handling stuff (sun-related??)
  9. SigpollSyncHandler()
  10. AudioFlushClose()
  11. SetPlayGain()
  12.  
  13. All of the above functions frequently uses the functions and variables
  14. <multimedia/libaudio.h>, <multimedia/audio_device.h> and
  15. <multimedia/ulaw2linear.h>
  16.  
  17.  
  18. canvas.c
  19.  
  20. InitWaveCanvas() --- it uses the DEVICE_SAMPLE_RATE to determine
  21.             DefaultWaveCanvasDataSamplingInterval
  22. InitWaveCanvasScrollbar() --- initializes the WaveCanvasScrollbarHandler.
  23. DisplayVUMeter() --- uses the sound Buffer data structure to store data_size.
  24.             Calls audio_u2c().
  25. UpdateVUMeter() --- this also uses the Buffer data structure to store data_size
  26.             as well as storing the start and end byte number of the
  27.             soundfile.
  28.             Calls audio_u2s()
  29. ResetWaveCanvasMarkers() --- uses the Buffer data structure to store
  30.                 start and end byte number of the sound data.
  31. ClearAllSound() --- Buffer.filename.
  32. CenterWaveCanvasHighlightedSegment() --- uses DEVICE_SAMPLE_RATE.
  33.  
  34.             
  35. buffer.c:
  36.  
  37. InitBuffer() --- uses fields like data, hdr etc.
  38. AllocBuffer() --- allocate buffer size.
  39. FileUpdate() --- uses Buffer.play.io_position and Buffer.play.start.
  40. ReadSoundFile() --- lots of things dealing with the buffer.
  41. GetFileData() --- depends on the format of the sound file i.e must contain a file
  42.           header and then data.
  43.  
  44.  
  45.  
  46. Comments:  At this time, I think it might be hard to put the sun-specific
  47.        stuff into one file, simply because they are spread all over 
  48.        the place.  Just by looking at audio.c, canvas.c and buffer.c,
  49.        we can see that these sun-specific code is referenced in
  50.        all the places.  By sun-specific code I mean the data-structures
  51.        and library functions which are defined in sun audio packages.
  52.        For example, the audio_hdr structure is defined in the 
  53.        sun library, so any other workstation companies who would
  54.        like to incorporate this audio code, the first thing
  55.        they need is to take care of the sun-specific data-structure
  56.        ie, hdr + data.   
  57.  
  58.        If we eliminate the concern about these data structures,
  59.        then I think the code is relatively easy to be broken down.
  60.        Only audio.c, canvas.c, save.c, uses sun library functions
  61.        (not data structure....)
  62.  
  63.        Perhaps what we can do is simply give a guide of exactly
  64.        what people should do to make DTR work on their workstation.
  65.        ie.  build another package which "translates" the sun
  66.        specific audio stuff into workstation-A specific stuff.
  67.  
  68.