> For the complete documentation index, see [llms.txt](https://docs.flatredball.com/flatredball/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flatredball.com/flatredball/api/microsoft-xna-framework/audio/soundeffectinstance.md).

# SoundEffectInstance

### Introduction

The SoundEffectInstance is a copy of a SoundEffect which can be played on its own. Each SoundEffectInstance can only be played once at a time. Therefore if two sounds must overlap, then two SoundEffectInstances are needed. By contrast, calling SoundEffect.Play multiple times will result in overlapping sounds. Although the SoundEffectInstance requires multiple instances for simultaneous plays, it provides the number of benefits:

* It can be stopped at any time
* It provides parameters for modifying how the sound effect is played (such as pitch)
* You can inspect if a SoundEffectInstance is playing

For information on using SoundEffectInstances in the FlatRedBall Editor, see the FlatRedBall Editor's [SoundEffectInstance page](/flatredball/glue-reference/objects/object-types/glue-reference-soundeffectinstance.md). For a more detail on the SoundEffectInstance class, see [MonoGame's SoundEffectInstance reference](https://docs.monogame.net/api/Microsoft.Xna.Framework.Audio.SoundEffectInstance.html).

### SoundEffectInstance errors on iOS

If you are running the iOS simulator on a Mac then you may experience an error at runtime. A work-around for this error has not yet been discovered but it is occurs in MonoGame and not FlatRedBall. More information on the issue can be found here: <http://community.monogame.net/t/error-while-playing-soundeffect/1605>.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.flatredball.com/flatredball/api/microsoft-xna-framework/audio/soundeffectinstance.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
