Skip to main content

CCSoundHandle

CCSoundHandle

CocosDenshion

A handle to an individual sound effect instance, providing per-instance control over volume, pan, pitch, and playback state. Obtained from CCSimpleAudioEngine.PlayEffectHandled(). The caller owns this handle and must call Dispose() when finished to release the underlying SoundEffectInstance.

Inheritance: System.Object

Implements: System.IDisposable

Properties

IsDisposed(System.Boolean)

Whether this handle has been disposed or its instance is no longer valid.

IsLooped(System.Boolean)

Gets or sets whether this sound instance loops.

IsPaused(System.Boolean)

Whether this handle's sound instance is paused.

IsPlaying(System.Boolean)

Whether this handle's sound instance is currently playing.

Pan(System.Single)

Gets or sets the pan for this sound instance (-1.0 left to 1.0 right).

Pitch(System.Single)

Gets or sets the pitch adjustment for this sound instance (-1.0 to 1.0).

SoundId(System.Int32)

The sound ID (hash of the file path) for this effect.

Volume(System.Single)

Gets or sets the volume for this sound instance (0.0 to 1.0).

Methods

Dispose()

Dispose()()

Disposes the underlying SoundEffectInstance, freeing resources.

Example

Pause()

Pause()()

Pauses playback of this sound instance.

Example

Resume()

Resume()()

Resumes playback of this paused sound instance.

Example

Stop()

Stop()()

Stops playback of this sound instance.

Example