Manages all properties relating to an OpenAL sound source.
More...
#import <ALSoundSource.h>
|
(id< ALSoundSource >) | - play: |
| Play a sound. More...
|
|
(id< ALSoundSource >) | - play:loop: |
| Play a sound, optionally looping. More...
|
|
(id< ALSoundSource >) | - play:gain:pitch:pan:loop: |
| Play a sound, setting gain, pitch, pan, and looping. More...
|
|
(void) | - stop |
| Stop playing the current sound. More...
|
|
(void) | - rewind |
| Stop playing the current sound and set its state to AL_INITIAL. More...
|
|
(void) | - fadeTo:duration:target:selector: |
| Fade to the specified gain value. More...
|
|
(void) | - stopFade |
| Stop the currently running fade operation, if any. More...
|
|
(void) | - panTo:duration:target:selector: |
| pan to the specified value. More...
|
|
(void) | - stopPan |
| Stop the currently running pan operation, if any. More...
|
|
(void) | - pitchTo:duration:target:selector: |
| Gradually change pitch to the specified value. More...
|
|
(void) | - stopPitch |
| Stop the currently running pitch operation, if any. More...
|
|
(void) | - stopActions |
| Stop any currently running fade, pan, or pitch operations. More...
|
|
(void) | - clear |
| Clear any buffers this source is currently using. More...
|
|
Manages all properties relating to an OpenAL sound source.
There are currently two classes that adhere to this protocol: ALSource and ChannelSource (which collectively manipulates a set of ALSource objects). A full description of the properties themselves is available in the OpenAL 1.1 Specification and Reference: http://connect.creativelabs.com/openal/Documentation
Clear any buffers this source is currently using.
- (void) fadeTo: |
|
(float) |
gain |
duration: |
|
(float) |
duration |
target: |
|
(id) |
target |
selector: |
|
(SEL) |
selector |
|
|
| |
Fade to the specified gain value.
- Parameters
-
gain | The gain to fade to. |
duration | The duration of the fade operation in seconds. |
target | The target to notify when the fade completes (can be nil). |
selector | The selector to call when the fade completes. The selector must accept a single parameter, which will be the object that performed the fade. |
- (void) panTo: |
|
(float) |
pan |
duration: |
|
(float) |
duration |
target: |
|
(id) |
target |
selector: |
|
(SEL) |
selector |
|
|
| |
pan to the specified value.
- Parameters
-
pan | The value to pan to. |
duration | The duration of the pan operation in seconds. |
target | The target to notify when the pan completes (can be nil). |
selector | The selector to call when the pan completes. The selector must accept a single parameter, which will be the object that performed the pan. |
- (void) pitchTo: |
|
(float) |
pitch |
duration: |
|
(float) |
duration |
target: |
|
(id) |
target |
selector: |
|
(SEL) |
selector |
|
|
| |
Gradually change pitch to the specified value.
- Parameters
-
pitch | The value to change pitch to. |
duration | The duration of the pitch operation in seconds. |
target | The target to notify when the pitch change completes (can be nil). |
selector | The selector to call when the pitch change completes. The selector must accept a single parameter, which will be the object that performed the pitch change. |
Play a sound.
- Parameters
-
buffer | the buffer to play. |
- Returns
- the source playing the sound, or nil if the sound could not be played.
Play a sound, setting gain, pitch, pan, and looping.
- Parameters
-
buffer | the buffer to play. |
gain | The gain (volume) to play at (0.0 - 1.0). |
pitch | The pitch to play at (1.0 = normal pitch). |
pan | Left-right panning (-1.0 = far left, 1.0 = far right). |
loop | If TRUE, the sound will loop until you call "stop" on the returned sound source. |
- Returns
- the source playing the sound, or nil if the sound could not be played.
Play a sound, optionally looping.
- Parameters
-
buffer | the buffer to play. |
loop | If TRUE, the sound will loop until you call "stop" on the returned sound source. |
- Returns
- the source playing the sound, or nil if the sound could not be played.
Stop playing the current sound and set its state to AL_INITIAL.
Stop playing the current sound.
Stop any currently running fade, pan, or pitch operations.
Stop the currently running fade operation, if any.
Stop the currently running pan operation, if any.
Stop the currently running pitch operation, if any.
Cone inner angle (OpenAL property).
Cone outer angle (OpenAL property).
Cone outer gain (OpenAL property).
Direction (OpenAL property).
Gain (volume) (OpenAL property).
If true, this source may be interrupted when resources are low.
Looping (OpenAL property).
Max distance (OpenAL property).
Max gain (OpenAL property).
Min gain (OpenAL property).
If true, this source is muted.
Pan value (-1.0 = far left, 1.0 = far right).
Note: This effect is simulated by changing the source's X position. Do not use this property if you are modifying the position property as well.
If true, this source is currently paused.
If true, this source is currently playing audio.
Position (OpenAL property).
- (float) referenceDistance |
|
readwritenonatomicassign |
Reference distance (OpenAL property).
- (float) reverbObstruction |
|
readwritenonatomicassign |
Reverb obstruction (object between listener and source).
(iOS 5.0+) -100.0db (most obstruction) to 0.0 (no obstruction). Default 0.
- (float) reverbOcclusion |
|
readwritenonatomicassign |
Reverb occlusion (wall/door between listener and source).
(iOS 5.0+) -100.0db (most occlusion) to 0.0 (no occlusion). Default 0.
- (float) reverbSendLevel |
|
readwritenonatomicassign |
Reverb send level (how much reverb affects this source).
(iOS 5.0+) 0.0 = fully dry, 1.0 = fully wet. Default 0.
Rolloff factor (OpenAL property).
Source relative (OpenAL property).
Source type (OpenAL property).
Velocity (OpenAL property).
The documentation for this protocol was generated from the following file: