00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #import "AMControl.h"
00011 #import "AMCueInstance.h"
00012 #import "AMSoundInstance.h"
00013 #import "a2ml.h"
00014 #import <Foundation/Foundation.h>
00015
00016
00017
00018 static const NSString *const AM_MIX3D_CONTROL_ATTRIBUTE_POSITION = @"position";
00019 static const NSString *const AM_MIX3D_CONTROL_ATTRIBUTE_POSITION_X = @"position.x";
00020 static const NSString *const AM_MIX3D_CONTROL_ATTRIBUTE_POSITION_Y = @"position.y";
00021 static const NSString *const AM_MIX3D_CONTROL_ATTRIBUTE_POSITION_Z = @"position.z";
00022 static const NSString *const AM_MIX3D_CONTROL_ATTRIBUTE_AUTODOPPLER = @"autoDoppler";
00023 static const NSString *const AM_MIX3D_CONTROL_ATTRIBUTE_AUTODOPPLER_FACTOR = @"autoDopplerFactor";
00024 static const NSString *const AM_MIX3D_CONTROL_ATTRIBUTE_ORIENTATION = @"orientation";
00025 static const NSString *const AM_MIX3D_CONTROL_ATTRIBUTE_ORIENTATION_HEADING = @"orientation.heading";
00026 static const NSString *const AM_MIX3D_CONTROL_ATTRIBUTE_ORIENTATION_PITCH = @"orientation.pitch";
00027 static const NSString *const AM_MIX3D_CONTROL_ATTRIBUTE_ORIENTATION_ROLL = @"orientation.roll";
00028 static const NSString *const AM_MIX3D_CONTROL_ATTRIBUTE_VELOCITY = @"velocity";
00029 static const NSString *const AM_MIX3D_CONTROL_ATTRIBUTE_VELOCITY_X = @"velocity.x";
00030 static const NSString *const AM_MIX3D_CONTROL_ATTRIBUTE_VELOCITY_Y = @"velocity.y";
00031 static const NSString *const AM_MIX3D_CONTROL_ATTRIBUTE_VELOCITY_Z = @"velocity.z";
00032 static const NSString *const AM_MIX3D_CONTROL_ATTRIBUTE_DOPPLER_ENABLED = @"dopplerEnabled";
00033 static const NSString *const AM_MIX3D_CONTROL_ATTRIBUTE_DIRECTIVITY = @"directivity";
00034 static const NSString *const AM_MIX3D_CONTROL_ATTRIBUTE_DIRECTIVITY_MIN_ANGLE = @"directivity.minAngle";
00035 static const NSString *const AM_MIX3D_CONTROL_ATTRIBUTE_DIRECTIVITY_MAX_ANGLE = @"directivity.maxAngle";
00036 static const NSString *const AM_MIX3D_CONTROL_ATTRIBUTE_DIRECTIVITY_REAR_LEVEL = @"directivity.rearLevel";
00037 static const NSString *const AM_MIX3D_CONTROL_ATTRIBUTE_OCCLUSION_HF_LEVEL = @"occlusionHFLevel";
00038 static const NSString *const AM_MIX3D_CONTROL_ATTRIBUTE_OCCLUSION_LEVEL = @"occlusionLevel";
00039 static const NSString *const AM_MIX3D_CONTROL_ATTRIBUTE_ROLLOFF_MIN_DIST = @"rolloffMinDist";
00040 static const NSString *const AM_MIX3D_CONTROL_ATTRIBUTE_ROLLOFF_MAX_DIST = @"rolloffMaxDist";
00041 static const NSString *const AM_MIX3D_CONTROL_ATTRIBUTE_ROLLOFF_FACTOR = @"rolloffFactor";
00042 static const NSString *const AM_MIX3D_CONTROL_ATTRIBUTE_MUTE_AFTER_MAX = @"muteAfterMax";
00043
00044 static const NSArray *const AM_MIX3D_CONTROL_ATTRIBUTES = [[NSArray alloc] initWithObjects:
00045 AM_MIX3D_CONTROL_ATTRIBUTE_POSITION,
00046 AM_MIX3D_CONTROL_ATTRIBUTE_POSITION_X,
00047 AM_MIX3D_CONTROL_ATTRIBUTE_POSITION_Y,
00048 AM_MIX3D_CONTROL_ATTRIBUTE_POSITION_Z,
00049 AM_MIX3D_CONTROL_ATTRIBUTE_AUTODOPPLER,
00050 AM_MIX3D_CONTROL_ATTRIBUTE_AUTODOPPLER_FACTOR,
00051 AM_MIX3D_CONTROL_ATTRIBUTE_ORIENTATION,
00052 AM_MIX3D_CONTROL_ATTRIBUTE_ORIENTATION_HEADING,
00053 AM_MIX3D_CONTROL_ATTRIBUTE_ORIENTATION_PITCH,
00054 AM_MIX3D_CONTROL_ATTRIBUTE_ORIENTATION_ROLL,
00055 AM_MIX3D_CONTROL_ATTRIBUTE_VELOCITY,
00056 AM_MIX3D_CONTROL_ATTRIBUTE_VELOCITY_X,
00057 AM_MIX3D_CONTROL_ATTRIBUTE_VELOCITY_Y,
00058 AM_MIX3D_CONTROL_ATTRIBUTE_VELOCITY_Z,
00059 AM_MIX3D_CONTROL_ATTRIBUTE_DOPPLER_ENABLED,
00060 AM_MIX3D_CONTROL_ATTRIBUTE_DIRECTIVITY,
00061 AM_MIX3D_CONTROL_ATTRIBUTE_DIRECTIVITY_MIN_ANGLE,
00062 AM_MIX3D_CONTROL_ATTRIBUTE_DIRECTIVITY_MAX_ANGLE,
00063 AM_MIX3D_CONTROL_ATTRIBUTE_DIRECTIVITY_REAR_LEVEL,
00064 AM_MIX3D_CONTROL_ATTRIBUTE_OCCLUSION_HF_LEVEL,
00065 AM_MIX3D_CONTROL_ATTRIBUTE_OCCLUSION_LEVEL,
00066 AM_MIX3D_CONTROL_ATTRIBUTE_ROLLOFF_MIN_DIST,
00067 AM_MIX3D_CONTROL_ATTRIBUTE_ROLLOFF_MAX_DIST,
00068 AM_MIX3D_CONTROL_ATTRIBUTE_ROLLOFF_FACTOR,
00069 AM_MIX3D_CONTROL_ATTRIBUTE_MUTE_AFTER_MAX,
00070 nil];
00071
00073 enum AMMix3DControlAttributes {
00074 AM_M3D_POSITION = 0,
00075 AM_M3D_POSITION_X,
00076 AM_M3D_POSITION_Y,
00077 AM_M3D_POSITION_Z,
00078 AM_M3D_AUTODOPPLER,
00079 AM_M3D_AUTODOPPLER_FACTOR,
00080 AM_M3D_ORIENTATION,
00081 AM_M3D_ORIENTATION_HEADING,
00082 AM_M3D_ORIENTATION_PITCH,
00083 AM_M3D_ORIENTATION_ROLL,
00084 AM_M3D_VELOCITY,
00085 AM_M3D_VELOCITY_X,
00086 AM_M3D_VELOCITY_Y,
00087 AM_M3D_VELOCITY_Z,
00088 AM_M3D_DOPPLER_ENABLED,
00089 AM_M3D_DIRECTIVITY,
00090 AM_M3D_DIRECTIVITY_MIN_ANGLE,
00091 AM_M3D_DIRECTIVITY_MAX_ANGLE,
00092 AM_M3D_DIRECTIVITY_REAR_LEVEL,
00093 AM_M3D_OCCLUSION_HF_LEVEL,
00094 AM_M3D_OCCLUSION_LEVEL,
00095 AM_M3D_ROLLOFF_MIN_DIST,
00096 AM_M3D_ROLLOFF_MAX_DIST,
00097 AM_M3D_ROLLOFF_FACTOR,
00098 AM_M3D_MUTE_AFTER_MAX
00099 };
00100
00101
00105 @interface AMMix3DControl : AMControl <NSCopying> {
00106
00107 AMVec3 position;
00108 BOOL autoDoppler;
00109 int autoDopplerFactor;
00110 AMVec3 orientation;
00111 AMVec3 velocity;
00112 BOOL dopplerEnabled;
00113 AMVec3 directivity;
00114 int occlusionHFLevel;
00115 int occlusionLevel;
00116 int rolloffMinDist;
00117 int rolloffMaxDist;
00118 int rolloffFactor;
00119 BOOL muteAfterMax;
00120
00121
00122 }
00123
00127 @property (nonatomic) AMVec3 position;
00128
00132 @property (nonatomic) BOOL autoDoppler;
00133
00138 @property (nonatomic) int autoDopplerFactor;
00139
00143 @property (nonatomic) AMVec3 orientation;
00144
00148 @property (nonatomic) AMVec3 velocity;
00149
00153 @property (nonatomic) BOOL dopplerEnabled;
00154
00158 @property (nonatomic) AMVec3 directivity;
00159
00163 @property (nonatomic) int occlusionHFLevel;
00164
00168 @property (nonatomic) int occlusionLevel;
00169
00173 @property (nonatomic) int rolloffMinDist;
00174
00178 @property (nonatomic) int rolloffMaxDist;
00179
00183 @property (nonatomic) int rolloffFactor;
00184
00188 @property (nonatomic) BOOL muteAfterMax;
00189
00190
00195 - (void)applySettingsToInstance:(id)_instance;
00196
00197 @end