MusicKit
0.0.0
|
00001 /* 00002 $Id$ 00003 Defined In: The MusicKit 00004 00005 Description: 00006 Serial port delegate of MKOrchestra. See the discussion below. With the demise 00007 of the NeXT hardware, this class becomes an example of DSP operation. In theory it still works. 00008 00009 Original Author: David A. Jaffe 00010 00011 Copyright (c) 1988-1992, NeXT Computer, Inc. 00012 Portions Copyright (c) 1994 NeXT Computer, Inc. and reproduced under license from NeXT 00013 Portions Copyright (c) 1994 CCRMA, Stanford University. 00014 Portions Copyright (c) 1999-2001, The MusicKit Project. 00015 */ 00064 #ifndef __MK_DSPSerialPortDevice_H___ 00065 #define __MK_DSPSerialPortDevice_H___ 00066 #import <Foundation/NSObject.h> 00067 00068 @interface DSPSerialPortDevice:NSObject 00069 { 00070 BOOL sendsSettings; 00071 } 00072 00073 #define ArielDigitalMic DSPSerialPortDevice /* Generic version works fine */ 00074 #define MRDigitalEars DSPSerialPortDevice /* Generic version works fine */ 00075 00076 00091 -setUpSerialPort:orchestra; 00092 00093 -init; 00094 00105 -setSendsSettings:(BOOL)yesOrNo; 00106 00113 -(BOOL)sendsSettings; 00114 00132 -(BOOL)supportsSamplingRate:(double)rate; 00133 00143 -(BOOL)hardwareSupportsSamplingRate:(double)rate; 00144 00155 -(int)hardwareSupportedSamplingRates:(double **) rates; 00156 00172 -(BOOL)supportsHalfSamplingRate:(double)rate; 00173 00185 -(double)defaultSamplingRate; 00186 00195 -(int)inputSampleSkip; 00196 00205 -(int)outputSampleSkip; 00206 00220 -(int)inputInitialSampleSkip; 00221 00232 -(int)outputInitialSampleSkip; 00233 00241 -(int)inputChannelCount; 00242 00250 -(int)outputChannelCount; 00251 00260 -(int)inputPadding; 00261 00270 -(BOOL)setUpAfterStartingSoundOut; 00271 00283 -unMuteSerialPort: (id) orchestra; 00284 00291 -closeDownSerialPort: (id) orchestra; 00292 00304 -adjustMonitor:(DSPLoadSpec *)system forOrchestra: (id) orchestra; 00305 00306 @end 00307 00317 @interface SSAD64x:DSPSerialPortDevice 00318 { 00319 BOOL professional; 00320 } 00321 00330 -setProfessional:(BOOL)yesOrNo; 00331 00338 -(int)hardwareSupportedSamplingRates:(double **)rates; 00339 00349 -setUpSerialPort: (id) orchestra; 00350 00359 -(int)inputSampleSkip; 00360 00369 -(int)outputSampleSkip; 00370 00376 -unMuteSerialPort: (id) orchestra; 00377 00383 -closeDownSerialPort: (id) orchestra; 00384 00385 @end 00386 00395 @interface StealthDAI2400:DSPSerialPortDevice 00396 { 00397 BOOL copyProhibit,emphasis; 00398 } 00399 00408 -setCopyProhibit:(BOOL)yesOrNo; 00409 00419 -setEmphasis:(BOOL)useEmphasis; 00420 00429 -(int)hardwareSupportedSamplingRates:(double **)rates; 00430 00438 -setUpSerialPort: (id) orchestra; 00439 00440 @end 00441 00450 @interface ArielProPort:DSPSerialPortDevice 00451 {} 00452 00461 - (int) hardwareSupportedSamplingRates: (double **) rates; 00462 00471 -setUpSerialPort: (id) orchestra; 00472 00473 @end 00474 00475 @interface TurtleBeachMS:DSPSerialPortDevice 00476 {} 00477 00478 00487 -setUpSerialPort:orchestra; 00488 00497 -(int)hardwareSupportedSamplingRates:(double **)ar; 00498 00499 @end 00500 00501 00502 @interface TurtleBeachFiji:DSPSerialPortDevice 00503 {} 00504 00505 00514 -setUpSerialPort:orchestra; 00515 00524 -(int)hardwareSupportedSamplingRates:(double **)ar; 00525 -adjustMonitor:(DSPLoadSpec *)system forOrchestra:orchestra; 00526 00527 @end 00528 00529 00530 @interface Frankenstein:DSPSerialPortDevice 00531 { 00532 unsigned long initWord1,initWord2; 00533 unsigned long runTimeWord1,runTimeWord2; 00534 int lineOutAtten,lineInGain; 00535 MKOrchestra *orch; 00536 } 00537 00538 /* The following methods are invoked by the MKOrchestra. */ 00539 00548 -setUpSerialPort:orchestra; 00549 00558 -(int)hardwareSupportedSamplingRates:(double **)ar; 00559 00569 -(int)outputPadding; 00570 00579 -(int)inputPadding; 00580 -setLineOutAttenuation:(double)val; /* In db from -95 to 0 */ 00581 -setLineInGain:(int)val; /* In db from 0 to 22.5 */ 00582 -(BOOL)setUpAfterStartingSoundOut; /* Returns NO */ 00583 00584 @end 00585 00586 #endif 00587