|
|
1.1 ! root 1: /* ! 2: * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. ! 3: * ! 4: * @APPLE_LICENSE_HEADER_START@ ! 5: * ! 6: * The contents of this file constitute Original Code as defined in and ! 7: * are subject to the Apple Public Source License Version 1.1 (the ! 8: * "License"). You may not use this file except in compliance with the ! 9: * License. Please obtain a copy of the License at ! 10: * http://www.apple.com/publicsource and read it before using this file. ! 11: * ! 12: * This Original Code and all software distributed under the License are ! 13: * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER ! 14: * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, ! 15: * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, ! 16: * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the ! 17: * License for the specific language governing rights and limitations ! 18: * under the License. ! 19: * ! 20: * @APPLE_LICENSE_HEADER_END@ ! 21: */ ! 22: ! 23: /*! ! 24: * @header IOAudio ! 25: * This is the include file defining classes for IOAudio clients. ! 26: */ ! 27: ! 28: #ifndef _IOAUDIO_H ! 29: #define _IOAUDIO_H ! 30: ! 31: #include <IOKit/IORegistryEntry.h> ! 32: #include <IOKit/IOService.h> ! 33: #include <IOKit/IOUserClient.h> ! 34: #include <IOKit/audio/IOAudioTypes.h> ! 35: ! 36: /*! ! 37: * @enum <no name> ! 38: * @constant kAllChannels ! 39: */ ! 40: enum { ! 41: kAllChannels = 0 ! 42: }; ! 43: ! 44: /*! ! 45: * @class IOAudioComponent ! 46: * @abstract An IOAudioComponent is a piece of hardware inside an audio device ! 47: * that has interesting, and possibly modifiable, properties. ! 48: * @discussion Examples are the input and output jacks, the volume control etc. ! 49: * This class corresponds to the USB Audio class Units and Terminals. ! 50: * The topology of the audio device (how streams and components are ! 51: * connected) is represented in the IOAudio registry plane. ! 52: * Sound flows from the parent to the child. ! 53: */ ! 54: class IOAudioComponent : public IOUserClient ! 55: { ! 56: OSDeclareDefaultStructors(IOAudioComponent) ! 57: ! 58: public: ! 59: ! 60: }; ! 61: ! 62: /*! ! 63: * @class IOAudioStream ! 64: * An IOAudioStream represents the access the CPU has to the A/D and D/A ! 65: * converters of the sound device. ! 66: */ ! 67: class IOAudioStream : public IOUserClient ! 68: { ! 69: OSDeclareDefaultStructors(IOAudioStream) ! 70: ! 71: public: ! 72: ! 73: /*! ! 74: * @function Flush ! 75: * @discussion Sets the ending stream position guaranteed to be played after all clients disconnect ! 76: * @param end stream position to play through after all clients disconnect ! 77: * @result IOReturn kIOReturnSuccess ! 78: */ ! 79: virtual IOReturn Flush(IOAudioStreamPosition *end) = 0; ! 80: ! 81: /*! ! 82: * @function setFlow ! 83: * @discussion Pause/Play control ! 84: * @param flowing ! 85: * @result IOReturn kIOReturnSuccess ! 86: */ ! 87: virtual IOReturn setFlow(bool flowing) = 0; ! 88: ! 89: /*! ! 90: * @function setErase ! 91: * @discussion Pause/Play control ! 92: * @param erase true to turn on erase head, false otherwise ! 93: * @param oldErase previous value ! 94: * @result IOReturn kIOReturnSuccess ! 95: */ ! 96: virtual IOReturn setErase(bool erase, SInt32 *oldErase) = 0; ! 97: ! 98: /*! ! 99: * @function isOutput ! 100: * @discussion Input stream or output one? ! 101: * @param res non-zero if output, 0 otherwise ! 102: * @result IOReturn kIOReturnSuccess ! 103: */ ! 104: virtual IOReturn isOutput(SInt32 *res) const = 0; ! 105: ! 106: /*! ! 107: * @function getMixBuffer ! 108: * @param mixBuffer pointer to the mix buffer for this stream ! 109: * @result IOReturn kIOReturnSuccess ! 110: */ ! 111: ! 112: virtual IOReturn getMixBuffer(void **mixBuffer) = 0; ! 113: ! 114: }; ! 115: ! 116: /*! ! 117: * @class IOAudio ! 118: * Object representing the complete audio device. ! 119: * Probably only interesting for devices that can create streams, ! 120: * such as fancy PCI sound cards with onboard DSPs. ! 121: */ ! 122: class IOAudio : public IOService ! 123: { ! 124: OSDeclareAbstractStructors(IOAudio) ! 125: ! 126: public: ! 127: ! 128: }; ! 129: ! 130: #endif /* _IOAUDIO_H */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.