Home | History | Annotate | Download | only in objectal
      1 /*******************************************************************************
      2  * Copyright 2011 See AUTHORS file.
      3  *
      4  * Licensed under the Apache License, Version 2.0 (the "License");
      5  * you may not use this file except in compliance with the License.
      6  * You may obtain a copy of the License at
      7  *
      8  *   http://www.apache.org/licenses/LICENSE-2.0
      9  *
     10  * Unless required by applicable law or agreed to in writing, software
     11  * distributed under the License is distributed on an "AS IS" BASIS,
     12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13  * See the License for the specific language governing permissions and
     14  * limitations under the License.
     15  ******************************************************************************/
     16 
     17 package com.badlogic.gdx.backends.iosmoe.objectal;
     18 
     19 import com.intel.moe.natj.general.NatJ;
     20 import com.intel.moe.natj.general.Pointer;
     21 import com.intel.moe.natj.general.ann.ByValue;
     22 import com.intel.moe.natj.general.ann.Generated;
     23 import com.intel.moe.natj.general.ann.Mapped;
     24 import com.intel.moe.natj.general.ann.MappedReturn;
     25 import com.intel.moe.natj.general.ann.NUInt;
     26 import com.intel.moe.natj.general.ann.Owned;
     27 import com.intel.moe.natj.general.ann.Runtime;
     28 import com.intel.moe.natj.general.ptr.VoidPtr;
     29 import com.intel.moe.natj.objc.ObjCRuntime;
     30 import com.intel.moe.natj.objc.SEL;
     31 import com.intel.moe.natj.objc.ann.ObjCBlock;
     32 import com.intel.moe.natj.objc.ann.ObjCClassBinding;
     33 import com.intel.moe.natj.objc.ann.Selector;
     34 import com.intel.moe.natj.objc.map.ObjCObjectMapper;
     35 import ios.NSObject;
     36 import ios.foundation.NSArray;
     37 
     38 @Generated
     39 @Runtime(ObjCRuntime.class)
     40 @ObjCClassBinding
     41 public class ALSource extends NSObject implements ALSoundSource,
     42 		OALSuspendManager {
     43 	static {
     44 		NatJ.register();
     45 	}
     46 
     47 	@Generated
     48 	protected ALSource(Pointer peer) {
     49 		super(peer);
     50 	}
     51 
     52 	@Generated
     53 	@Selector("addSuspendListener:")
     54 	public native void addSuspendListener(
     55 			@Mapped(ObjCObjectMapper.class) Object listener);
     56 
     57 	@Generated
     58 	@Owned
     59 	@Selector("alloc")
     60 	public static native ALSource alloc();
     61 
     62 	@Generated
     63 	@Selector("buffer")
     64 	public native ALBuffer buffer();
     65 
     66 	@Generated
     67 	@Selector("buffersProcessed")
     68 	public native int buffersProcessed();
     69 
     70 	@Generated
     71 	@Selector("buffersQueued")
     72 	public native int buffersQueued();
     73 
     74 	@Generated
     75 	@Selector("clear")
     76 	public native void clear();
     77 
     78 	@Generated
     79 	@Selector("coneInnerAngle")
     80 	public native float coneInnerAngle();
     81 
     82 	@Generated
     83 	@Selector("coneOuterAngle")
     84 	public native float coneOuterAngle();
     85 
     86 	@Generated
     87 	@Selector("coneOuterGain")
     88 	public native float coneOuterGain();
     89 
     90 	@Generated
     91 	@Selector("context")
     92 	public native ALContext context();
     93 
     94 	@Generated
     95 	@Selector("direction")
     96 	@ByValue
     97 	public native ALVector direction();
     98 
     99 	@Generated
    100 	@Selector("fadeTo:duration:target:selector:")
    101 	public native void fadeToDurationTargetSelector(float gain, float duration,
    102 			@Mapped(ObjCObjectMapper.class) Object target, SEL selector);
    103 
    104 	@Generated
    105 	@Selector("gain")
    106 	public native float gain();
    107 
    108 	@Generated
    109 	@Selector("init")
    110 	public native ALSource init();
    111 
    112 	@Generated
    113 	@Selector("initOnContext:")
    114 	public native ALSource initOnContext(ALContext context);
    115 
    116 	@Generated
    117 	@Selector("interrupted")
    118 	public native boolean interrupted();
    119 
    120 	@Generated
    121 	@Selector("interruptible")
    122 	public native boolean interruptible();
    123 
    124 	@Generated
    125 	@Selector("looping")
    126 	public native boolean looping();
    127 
    128 	@Generated
    129 	@Selector("manuallySuspended")
    130 	public native boolean manuallySuspended();
    131 
    132 	@Generated
    133 	@Selector("maxDistance")
    134 	public native float maxDistance();
    135 
    136 	@Generated
    137 	@Selector("maxGain")
    138 	public native float maxGain();
    139 
    140 	@Generated
    141 	@Selector("minGain")
    142 	public native float minGain();
    143 
    144 	@Generated
    145 	@Selector("muted")
    146 	public native boolean muted();
    147 
    148 	@Generated
    149 	@Selector("offsetInBytes")
    150 	public native float offsetInBytes();
    151 
    152 	@Generated
    153 	@Selector("offsetInSamples")
    154 	public native float offsetInSamples();
    155 
    156 	@Generated
    157 	@Selector("offsetInSeconds")
    158 	public native float offsetInSeconds();
    159 
    160 	@Generated
    161 	@Selector("pan")
    162 	public native float pan();
    163 
    164 	@Generated
    165 	@Selector("panTo:duration:target:selector:")
    166 	public native void panToDurationTargetSelector(float pan, float duration,
    167 			@Mapped(ObjCObjectMapper.class) Object target, SEL selector);
    168 
    169 	@Generated
    170 	@Selector("paused")
    171 	public native boolean paused();
    172 
    173 	@Generated
    174 	@Selector("pitch")
    175 	public native float pitch();
    176 
    177 	@Generated
    178 	@Selector("pitchTo:duration:target:selector:")
    179 	public native void pitchToDurationTargetSelector(float pitch,
    180 			float duration, @Mapped(ObjCObjectMapper.class) Object target,
    181 			SEL selector);
    182 
    183 	@Generated
    184 	@Selector("play")
    185 	@MappedReturn(ObjCObjectMapper.class)
    186 	public native ALSoundSource play();
    187 
    188 	@Generated
    189 	@Selector("play:")
    190 	@MappedReturn(ObjCObjectMapper.class)
    191 	public native ALSoundSource play(ALBuffer buffer);
    192 
    193 	@Generated
    194 	@Selector("play:gain:pitch:pan:loop:")
    195 	@MappedReturn(ObjCObjectMapper.class)
    196 	public native ALSoundSource playGainPitchPanLoop(ALBuffer buffer, float gain,
    197 			float pitch, float pan, boolean loop);
    198 
    199 	@Generated
    200 	@Selector("play:loop:")
    201 	@MappedReturn(ObjCObjectMapper.class)
    202 	public native ALSoundSource playLoop(ALBuffer buffer, boolean loop);
    203 
    204 	@Generated
    205 	@Selector("playing")
    206 	public native boolean playing();
    207 
    208 	@Generated
    209 	@Selector("position")
    210 	@ByValue
    211 	public native ALPoint position();
    212 
    213 	@Generated
    214 	@Selector("queueBuffer:")
    215 	public native boolean queueBuffer(ALBuffer buffer);
    216 
    217 	@Generated
    218 	@Selector("queueBuffer:repeats:")
    219 	public native boolean queueBufferRepeats(ALBuffer buffer,
    220 			@NUInt long repeats);
    221 
    222 	@Generated
    223 	@Selector("queueBuffers:")
    224 	public native boolean queueBuffers(NSArray<?> buffers);
    225 
    226 	@Generated
    227 	@Selector("queueBuffers:repeats:")
    228 	public native boolean queueBuffersRepeats(NSArray<?> buffers,
    229 			@NUInt long repeats);
    230 
    231 	@Generated
    232 	@Selector("referenceDistance")
    233 	public native float referenceDistance();
    234 
    235 	@Generated
    236 	@Selector("registerNotification:callback:userData:")
    237 	public native void registerNotificationCallbackUserData(
    238 			int notificationID,
    239 			@ObjCBlock(name = "call_registerNotificationCallbackUserData") Block_registerNotificationCallbackUserData callback,
    240 			VoidPtr userData);
    241 
    242 	@Runtime(ObjCRuntime.class)
    243 	@Generated
    244 	public interface Block_registerNotificationCallbackUserData {
    245 		@Generated
    246 		void call_registerNotificationCallbackUserData (ALSource arg0, int arg1, VoidPtr arg2);
    247 	}
    248 
    249 	@Generated
    250 	@Selector("removeSuspendListener:")
    251 	public native void removeSuspendListener(
    252 			@Mapped(ObjCObjectMapper.class) Object listener);
    253 
    254 	@Generated
    255 	@Selector("reverbObstruction")
    256 	public native float reverbObstruction();
    257 
    258 	@Generated
    259 	@Selector("reverbOcclusion")
    260 	public native float reverbOcclusion();
    261 
    262 	@Generated
    263 	@Selector("reverbSendLevel")
    264 	public native float reverbSendLevel();
    265 
    266 	@Generated
    267 	@Selector("rewind")
    268 	public native void rewind();
    269 
    270 	@Generated
    271 	@Selector("rolloffFactor")
    272 	public native float rolloffFactor();
    273 
    274 	@Generated
    275 	@Selector("setBuffer:")
    276 	public native void setBuffer(ALBuffer value);
    277 
    278 	@Generated
    279 	@Selector("setConeInnerAngle:")
    280 	public native void setConeInnerAngle(float value);
    281 
    282 	@Generated
    283 	@Selector("setConeOuterAngle:")
    284 	public native void setConeOuterAngle(float value);
    285 
    286 	@Generated
    287 	@Selector("setConeOuterGain:")
    288 	public native void setConeOuterGain(float value);
    289 
    290 	@Generated
    291 	@Selector("setDirection:")
    292 	public native void setDirection(@ByValue ALVector value);
    293 
    294 	@Generated
    295 	@Selector("setGain:")
    296 	public native void setGain(float value);
    297 
    298 	@Generated
    299 	@Selector("setInterrupted:")
    300 	public native void setInterrupted(boolean value);
    301 
    302 	@Generated
    303 	@Selector("setInterruptible:")
    304 	public native void setInterruptible(boolean value);
    305 
    306 	@Generated
    307 	@Selector("setLooping:")
    308 	public native void setLooping(boolean value);
    309 
    310 	@Generated
    311 	@Selector("setManuallySuspended:")
    312 	public native void setManuallySuspended(boolean value);
    313 
    314 	@Generated
    315 	@Selector("setMaxDistance:")
    316 	public native void setMaxDistance(float value);
    317 
    318 	@Generated
    319 	@Selector("setMaxGain:")
    320 	public native void setMaxGain(float value);
    321 
    322 	@Generated
    323 	@Selector("setMinGain:")
    324 	public native void setMinGain(float value);
    325 
    326 	@Generated
    327 	@Selector("setMuted:")
    328 	public native void setMuted(boolean value);
    329 
    330 	@Generated
    331 	@Selector("setOffsetInBytes:")
    332 	public native void setOffsetInBytes(float value);
    333 
    334 	@Generated
    335 	@Selector("setOffsetInSamples:")
    336 	public native void setOffsetInSamples(float value);
    337 
    338 	@Generated
    339 	@Selector("setOffsetInSeconds:")
    340 	public native void setOffsetInSeconds(float value);
    341 
    342 	@Generated
    343 	@Selector("setPan:")
    344 	public native void setPan(float value);
    345 
    346 	@Generated
    347 	@Selector("setPaused:")
    348 	public native void setPaused(boolean value);
    349 
    350 	@Generated
    351 	@Selector("setPitch:")
    352 	public native void setPitch(float value);
    353 
    354 	@Generated
    355 	@Selector("setPosition:")
    356 	public native void setPosition(@ByValue ALPoint value);
    357 
    358 	@Generated
    359 	@Selector("setReferenceDistance:")
    360 	public native void setReferenceDistance(float value);
    361 
    362 	@Generated
    363 	@Selector("setReverbObstruction:")
    364 	public native void setReverbObstruction(float value);
    365 
    366 	@Generated
    367 	@Selector("setReverbOcclusion:")
    368 	public native void setReverbOcclusion(float value);
    369 
    370 	@Generated
    371 	@Selector("setReverbSendLevel:")
    372 	public native void setReverbSendLevel(float value);
    373 
    374 	@Generated
    375 	@Selector("setRolloffFactor:")
    376 	public native void setRolloffFactor(float value);
    377 
    378 	@Generated
    379 	@Selector("setSourceRelative:")
    380 	public native void setSourceRelative(int value);
    381 
    382 	@Generated
    383 	@Selector("setState:")
    384 	public native void setState(int value);
    385 
    386 	@Generated
    387 	@Selector("setVelocity:")
    388 	public native void setVelocity(@ByValue ALVector value);
    389 
    390 	@Generated
    391 	@Selector("setVolume:")
    392 	public native void setVolume(float value);
    393 
    394 	@Generated
    395 	@Selector("source")
    396 	public static native ALSource source();
    397 
    398 	@Generated
    399 	@Selector("sourceId")
    400 	public native int sourceId();
    401 
    402 	@Generated
    403 	@Selector("sourceOnContext:")
    404 	public static native ALSource sourceOnContext(ALContext context);
    405 
    406 	@Generated
    407 	@Selector("sourceRelative")
    408 	public native int sourceRelative();
    409 
    410 	@Generated
    411 	@Selector("sourceType")
    412 	public native int sourceType();
    413 
    414 	@Generated
    415 	@Selector("state")
    416 	public native int state();
    417 
    418 	@Generated
    419 	@Selector("stop")
    420 	public native void stop();
    421 
    422 	@Generated
    423 	@Selector("stopActions")
    424 	public native void stopActions();
    425 
    426 	@Generated
    427 	@Selector("stopFade")
    428 	public native void stopFade();
    429 
    430 	@Generated
    431 	@Selector("stopPan")
    432 	public native void stopPan();
    433 
    434 	@Generated
    435 	@Selector("stopPitch")
    436 	public native void stopPitch();
    437 
    438 	@Generated
    439 	@Selector("suspended")
    440 	public native boolean suspended();
    441 
    442 	@Generated
    443 	@Selector("unqueueBuffer:")
    444 	public native boolean unqueueBuffer(ALBuffer buffer);
    445 
    446 	@Generated
    447 	@Selector("unqueueBuffers:")
    448 	public native boolean unqueueBuffers(NSArray<?> buffers);
    449 
    450 	@Generated
    451 	@Selector("unregisterAllNotifications")
    452 	public native void unregisterAllNotifications();
    453 
    454 	@Generated
    455 	@Selector("unregisterNotification:")
    456 	public native void unregisterNotification(int notificationID);
    457 
    458 	@Generated
    459 	@Selector("velocity")
    460 	@ByValue
    461 	public native ALVector velocity();
    462 
    463 	@Generated
    464 	@Selector("volume")
    465 	public native float volume();
    466 }
    467