home *** CD-ROM | disk | FTP | other *** search
/ OpenStep 4.2J (Developer) / os42jdev.iso / NextDeveloper / Headers / driverkit / IOAudio.h < prev    next >
Text File  |  1995-11-09  |  3KB  |  125 lines

  1. /*
  2.  * IOAudio.h
  3.  *
  4.  * Copyright (c) 1993, NeXT Computer, Inc.  All rights reserved.
  5.  *
  6.  */
  7.  
  8. #import <driverkit/machine/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.     void            *_audioPrivate;
  54.     
  55.     int                _IOAudio_reserved[3];
  56. }
  57.  
  58. - initFromDeviceDescription: description;
  59. - (BOOL) reset;
  60. - free;
  61.  
  62. - (unsigned int) sampleRate;
  63.  
  64. - (NXSoundParameterTag) dataEncoding;
  65.  
  66. - (unsigned int) channelCount;
  67.  
  68. - (void) interruptOccurredForInput: (BOOL *) serviceInput
  69.                          forOutput: (BOOL *) serviceOutput;
  70.  
  71. - (void) timeoutOccurred;
  72.  
  73. - (BOOL) startDMAForChannel: (unsigned int) localChannel
  74.                        read: (BOOL) isRead
  75.                      buffer: (IODMABuffer) buffer
  76.     bufferSizeForInterrupts: (unsigned int) bufferSize;
  77.  
  78. - (void) stopDMAForChannel: (unsigned int) localChannel
  79.                       read: (BOOL) isRead;
  80.  
  81. - (void)getInputChannelBuffer: (void *)addr
  82.                          size: (unsigned int *)byteCount;
  83.     
  84. - (void)getOutputChannelBuffer: (void *)addr
  85.                           size: (unsigned int *)byteCount;
  86.  
  87. - (unsigned int) inputGainLeft;
  88. - (unsigned int) inputGainRight;
  89. - (int) outputAttenuationLeft;
  90. - (int) outputAttenuationRight;
  91.  
  92. - (BOOL) isOutputMuted;
  93.  
  94. - (BOOL) isLoudnessEnhanced;
  95.  
  96. - (BOOL) isInputActive;
  97. - (BOOL) isOutputActive;
  98.  
  99. - (BOOL) acceptsContinuousSamplingRates;
  100.  
  101. - (void) getSamplingRatesLow: (int *) lowRate
  102.                         high: (int *) highRate;
  103.  
  104. - (void) getSamplingRates: (int *) rates
  105.                     count: (unsigned int *) numRates;
  106.  
  107. - (void) getDataEncodings: (NXSoundParameterTag *) encodings
  108.                     count: (unsigned int *) numEncodings;
  109.  
  110. - (unsigned int) channelCountLimit;
  111.  
  112. - (void) updateLoudnessEnhanced;
  113. - (void) updateInputGainLeft;
  114. - (void) updateInputGainRight;
  115. - (void) updateOutputMute;
  116. - (void) updateOutputAttenuationLeft;
  117. - (void) updateOutputAttenuationRight;
  118.  
  119. - (void) setInput:(NXSoundParameterTag)ptag enable:(BOOL)enable;
  120. - (void) setOutput:(NXSoundParameterTag)ptag enable:(BOOL)enable;
  121.  
  122. - (IOAudioInterruptClearFunc) interruptClearFunc;
  123.  
  124. @end
  125.