次の方法で共有


SoundEffectInstance.Play Method

Plays or resumes a SoundEffectInstance.

Namespace: Microsoft.Xna.Framework.Audio
Assembly: Microsoft.Xna.Framework (in microsoft.xna.framework.dll)

Syntax

public virtual void Play ()

Remarks

If the SoundEffectInstance is paused, Play resumes playing it at the last played position. If the SoundEffectInstance is stopped, Play begins to play it.

On Windows Phone, a game can have a maximum of 16 total playing SoundEffectInstance instances at one time, combined across all loaded SoundEffect objects. The only limit to the total number of loaded SoundEffectInstance and SoundEffect objects is available memory. However, the user can play only 16 sound effects at one time. Attempts to play a SoundEffectInstance beyond this limit will fail. On Windows, there is no hard limit. Playing too many instances can lead to performance degradation. On Xbox 360, the limit is 300 sound effect instances loaded or playing. Dispose of old instances if you need more.

See Also

Reference

SoundEffectInstance.Stop Method
SoundEffectInstance.Pause Method
SoundEffectInstance Class
SoundEffectInstance Members
Microsoft.Xna.Framework.Audio Namespace

Platforms

Xbox 360, Windows 7, Windows Vista, Windows XP, Windows Phone