home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.2 (Developer) / NS_dev_3.2.iso / NextDeveloper / Headers / driverkit / IOAudio.h < prev    next >
Text File  |  1993-08-06  |  3KB  |  114 lines

  1. /*
  2.  * IOAudio.h
  3.  *
  4.  * Copyright (c) 1993, NeXT Computer, Inc.  All rights reserved.
  5.  *
  6.  */
  7.  
  8. #import <driverkit/i386/directDevice.h>
  9. #import <mach/mach_types.h>
  10. #import <mach/mach_interface.h>
  11. #import <soundkit/NXSoundParameterTags.h>
  12.  
  13. typedef void    (*IOAudioInterruptClearFunc)(void);
  14.  
  15. @interface IOAudio: IODirectDevice
  16. {
  17. @private
  18.     id                _inputChannel;
  19.     id                _outputChannel;
  20.     id                _audioCommand;
  21.  
  22.     port_t            _commandPort;
  23.     port_set_name_t        _devicePortSet;
  24.   
  25.     msg_header_t        *_dataPendingMessage;
  26.     msg_timeout_t        _timeout;
  27.  
  28.     unsigned int        _sampleRate;
  29.     unsigned int        _dataEncoding;
  30.     unsigned int        _channelCount;
  31.         
  32.     unsigned int        _inputGainLeft;
  33.     unsigned int        _inputGainRight;
  34.     
  35.     int                _outputAttenuationLeft;
  36.     int                _outputAttenuationRight;
  37.  
  38.     int                _bassBoost;
  39.     int                _trebleBoost;
  40.     
  41.     BOOL            _isInputActive;
  42.     BOOL            _isOutputActive;
  43.  
  44.     BOOL            _isInputMuted;
  45.     BOOL            _isOutputMuted;
  46.     BOOL            _isLoudnessEnhanced;
  47.  
  48.     BOOL            _doesInsertZeros;
  49.     BOOL            _doesDeemphasize;
  50.     BOOL            _doesRampUp;
  51.     BOOL            _doesRampDown;
  52.  
  53.     int                _IOAudio_reserved[4];
  54. }
  55.  
  56. - initFromDeviceDescription: (IOEISADeviceDescription *) description;
  57. - (BOOL) reset;
  58. - free;
  59.  
  60. - (unsigned int) sampleRate;
  61.  
  62. - (NXSoundParameterTag) dataEncoding;
  63.  
  64. - (unsigned int) channelCount;
  65.  
  66. - (void) interruptOccurredForInput: (BOOL *) serviceInput
  67.                          forOutput: (BOOL *) serviceOutput;
  68.  
  69. - (void) timeoutOccurred;
  70.  
  71. - (BOOL) startDMAForChannel: (unsigned int) localChannel
  72.                        read: (BOOL) isRead
  73.                      buffer: (IOEISADMABuffer) buffer
  74.     bufferSizeForInterrupts: (unsigned int) bufferSize;
  75.  
  76. - (void) stopDMAForChannel: (unsigned int) localChannel
  77.                       read: (BOOL) isRead;
  78.  
  79. - (unsigned int) inputGainLeft;
  80. - (unsigned int) inputGainRight;
  81. - (int) outputAttenuationLeft;
  82. - (int) outputAttenuationRight;
  83.  
  84. - (BOOL) isOutputMuted;
  85.  
  86. - (BOOL) isLoudnessEnhanced;
  87.  
  88. - (BOOL) isInputActive;
  89. - (BOOL) isOutputActive;
  90.  
  91. - (BOOL) acceptsContinuousSamplingRates;
  92.  
  93. - (void) getSamplingRatesLow: (int *) lowRate
  94.                         high: (int *) highRate;
  95.  
  96. - (void) getSamplingRates: (int *) rates
  97.                     count: (unsigned int *) numRates;
  98.  
  99. - (void) getDataEncodings: (NXSoundParameterTag *) encodings
  100.                     count: (unsigned int *) numEncodings;
  101.  
  102. - (unsigned int) channelCountLimit;
  103.  
  104. - (void) updateLoudnessEnhanced;
  105. - (void) updateInputGainLeft;
  106. - (void) updateInputGainRight;
  107. - (void) updateOutputMute;
  108. - (void) updateOutputAttenuationLeft;
  109. - (void) updateOutputAttenuationRight;
  110.  
  111. - (IOAudioInterruptClearFunc) interruptClearFunc;
  112.  
  113. @end
  114.