Annotation of driverkit/libDriver/Kernel/audio_server.h, revision 1.1

1.1     ! root        1: /*
        !             2:  * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
        !             3:  *
        !             4:  * @APPLE_LICENSE_HEADER_START@
        !             5:  * 
        !             6:  * Portions Copyright (c) 1999 Apple Computer, Inc.  All Rights
        !             7:  * Reserved.  This file contains Original Code and/or Modifications of
        !             8:  * Original Code as defined in and that are subject to the Apple Public
        !             9:  * Source License Version 1.1 (the "License").  You may not use this file
        !            10:  * except in compliance with the License.  Please obtain a copy of the
        !            11:  * License at http://www.apple.com/publicsource and read it before using
        !            12:  * this file.
        !            13:  * 
        !            14:  * The Original Code and all software distributed under the License are
        !            15:  * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
        !            16:  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
        !            17:  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
        !            18:  * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT.  Please see the
        !            19:  * License for the specific language governing rights and limitations
        !            20:  * under the License.
        !            21:  * 
        !            22:  * @APPLE_LICENSE_HEADER_END@
        !            23:  */
        !            24: /*
        !            25:  * audio_server.h
        !            26:  *
        !            27:  * Copyright (c) 1991, NeXT Computer, Inc.  All rights reserved.
        !            28:  *
        !            29:  *      Server routine prototypes.
        !            30:  *
        !            31:  * HISTORY
        !            32:  *      06/26/92/mtm    Original coding.
        !            33:  */
        !            34: 
        !            35: #import "AudioChannel.h"
        !            36: #import "InputStream.h"
        !            37: #import "OutputStream.h"
        !            38: #import <bsd/dev/audioTypes.h>
        !            39: #import <mach/mach_types.h>
        !            40: 
        !            41: extern boolean_t audio_server(msg_header_t *InHeadP, msg_header_t *OutHeadP);
        !            42: extern void audio_port_gone(port_t port);
        !            43: 
        !            44: #define AUDIO_USER_MSG_BASE 700                /* MUST MATCH audio.defs! */
        !            45: 
        !            46: /*
        !            47:  * snd_server interface needs these prototypes.
        !            48:  */
        !            49: extern kern_return_t _NXAudioGetExclusiveUser(AudioChannel *chan,
        !            50:                                              port_t *stream_owner);
        !            51: extern kern_return_t _NXAudioSetExclusiveUser(AudioChannel *chan,
        !            52:                                              port_t stream_owner);
        !            53: extern kern_return_t _NXAudioGetBufferOptions(AudioChannel *chan, u_int *size,
        !            54:                                              u_int *count);
        !            55: extern kern_return_t _NXAudioSetBufferOptions(AudioChannel *chan,
        !            56:                                              port_t stream_owner,
        !            57:                                              u_int size, u_int count);
        !            58: extern kern_return_t _NXAudioControlStreams(AudioChannel *chan,
        !            59:                                            port_t stream_owner,
        !            60:                                            int action);
        !            61: extern kern_return_t _NXAudioAddStream(AudioChannel *chan, port_t *stream_port,
        !            62:                                       port_t stream_owner, int stream_id,
        !            63:                                       u_int stream_type);
        !            64: extern kern_return_t _NXAudioGetDevicePeakOptions(AudioChannel *chan,
        !            65:                                                  u_int *enabled,
        !            66:                                                  u_int *history);
        !            67: extern kern_return_t _NXAudioSetDevicePeakOptions(AudioChannel *chan,
        !            68:                                                  port_t stream_owner,
        !            69:                                                  u_int enabled,
        !            70:                                                  u_int history);
        !            71: extern kern_return_t _NXAudioGetDevicePeak(AudioChannel *chan,
        !            72:                                           u_int *peak_left,
        !            73:                                           u_int *peak_right);
        !            74: extern kern_return_t _NXAudioGetClipCount(AudioChannel *chan, u_int *count);
        !            75: extern kern_return_t _NXAudioGetSndoutOptions(AudioChannel *chan,
        !            76:                                              u_int *bits);
        !            77: extern kern_return_t _NXAudioSetSndoutOptions(AudioChannel *chan,
        !            78:                                              port_t stream_owner,
        !            79:                                              u_int bits);
        !            80: extern kern_return_t _NXAudioGetSpeaker(AudioChannel *chan, int *left,
        !            81:                                        int *right);
        !            82: extern kern_return_t _NXAudioSetSpeaker(AudioChannel *chan,
        !            83:                                        port_t stream_owner,
        !            84:                                        int left, int right);
        !            85: extern kern_return_t _NXAudioSetStreamGain(OutputStream *stream, int left,
        !            86:                                           int right);
        !            87: extern kern_return_t _NXAudioChangeStreamOwner(AudioStream *stream,
        !            88:                                               port_t stream_owner);
        !            89: extern kern_return_t _NXAudioStreamControl(AudioStream *stream, int action,
        !            90:                                           audio_time_t time);
        !            91: extern kern_return_t _NXAudioStreamInfo(AudioStream *stream,
        !            92:                                        u_int *bytes_processed,
        !            93:                                        u_int *time_stamp);
        !            94: extern kern_return_t _NXAudioRemoveStream(AudioStream *stream);
        !            95: extern kern_return_t _NXAudioPlayStream(OutputStream *stream, pointer_t data,
        !            96:                                        u_int count, int tag,
        !            97:                                        int channel_count,
        !            98:                                        int sample_rate,
        !            99:                                        u_int left_gain, u_int right_gain,
        !           100:                                        u_int low_water, u_int high_water,
        !           101:                                        port_t reply_port, u_int messages);
        !           102: extern kern_return_t _NXAudioPlayStreamData(OutputStream *stream,
        !           103:                                            pointer_t data,
        !           104:                                            u_int count, int tag,
        !           105:                                            port_t reply_port, u_int messages);
        !           106: extern kern_return_t _NXAudioSetStreamPeakOptions(OutputStream *stream,
        !           107:                                                  u_int enabled,
        !           108:                                                  u_int history);
        !           109: extern kern_return_t _NXAudioGetStreamPeak(OutputStream *stream,
        !           110:                                           u_int *peak_left,
        !           111:                                           u_int *peak_right);
        !           112: extern kern_return_t _NXAudioRecordStream(InputStream *stream, u_int count,
        !           113:                                          int tag,
        !           114:                                          u_int low_water, u_int high_water,
        !           115:                                          port_t reply_port, u_int messages);
        !           116: extern kern_return_t _NXAudioRecordStreamData(InputStream *stream, u_int count,
        !           117:                                              int tag,
        !           118:                                              port_t reply_port,
        !           119:                                              u_int messages);
        !           120: extern kern_return_t _NXAudioSetStreamParameters(AudioStream *stream,
        !           121:                                                 audio_array_t params,
        !           122:                                                 u_int count,
        !           123:                                                 audio_array_t values);
        !           124: extern kern_return_t _NXAudioGetSamplingRates(AudioChannel *chan,
        !           125:                                              int *continuous,
        !           126:                                              int *low, int *high,
        !           127:                                              audio_array_t rates,
        !           128:                                              u_int *count);
        !           129: extern kern_return_t _NXAudioGetDataEncodings(AudioChannel *chan,
        !           130:                                              audio_array_t encodings,
        !           131:                                              u_int *count);
        !           132: extern kern_return_t _NXAudioGetChannelCountLimit(AudioChannel *chan,
        !           133:                                                  u_int *count);

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.