# How to stop sounds played with "Notify - PlaySound" in AnimInstance ?

**URL:** <https://forums.unrealengine.com/t/how-to-stop-sounds-played-with-notify-playsound-in-animinstance/362986>\
**Category:** Audio\
**Tags:** notify, unreal-engine, stop, CPP, question\
**Created:** [July 5, 2016, 9:20am UTC](https://forums.unrealengine.com/t/how-to-stop-sounds-played-with-notify-playsound-in-animinstance/362986 "2016-07-05T09:20:27Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_e1600e71](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e1600e71](https://forums.unrealengine.com/u/anonymous_user_e1600e71)\
**Post date:** [July 5, 2016, 9:20am UTC](https://forums.unrealengine.com/t/how-to-stop-sounds-played-with-notify-playsound-in-animinstance/362986/1 "2016-07-05T09:20:27Z")

</div>

Hi everyone,

I’m currently working on animations.

I have some “hard coded” animation among a dialog sound (since I’m not using FaceFX). So when an animation starts, I play the dialog sound using a “Notify - PlaySound”. This works pretty much as I want to.

But how can I stop the sound when the animation is cut off before the end ? For now, the sound will just continue to play even if the animation is stopped.

What I found so far:

- Use a **custom C++ AnimInstance** class which store all the possible sounds for my animations but it’s dirty as f\*\*\* and really not convenient.
- Create a custom **AnimNotifyState** and overriding `Received_NotifyBegin` & `Received_NotifyBegin` for each animation which is better but still not very convenient.
- Use a **Matinee** for each animations

What do you guys think about that ?

Thanks for reading. Best regards.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_e1600e71](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e1600e71](https://forums.unrealengine.com/u/anonymous_user_e1600e71)\
**Post date:** [July 5, 2016, 12:20pm UTC](https://forums.unrealengine.com/t/how-to-stop-sounds-played-with-notify-playsound-in-animinstance/362986/2 "2016-07-05T12:20:43Z")

</div>

All right so finally I came with this solution. Just posting it if anyone is looking for the same thing :).

**I’ve made it in C++ but you can do it in blueprints as well**

1. First I created a child class of UAnimNotifyState and add some sounds property to it

2. Add the custom notify **UPOLICE\_AnimNotifyState** in the animation notifies section and set its duration to the whole animation duration (so the notify will be alive during the whole animation).

3. Select the sound you want to play in the details panel.

 ![97172-sans+titre.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/3/6/13651f0db88b1f96954c134c207dec34bebfbea9.jpeg)

**Results:**

The sound will starts when the animation starts, and stop whenever the animation is stoped.  
If you have any feedback I would be glad to hear them !

**Possible improve**

Right now, if the animation is paused (for example in the animation blueprint editor), the sound will stop, but not resume where is was before.

Cheers! Good luck, have fun \<3

---

<div class="post-metadata">

**Author:** ![Ross90](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ross90](https://forums.unrealengine.com/u/Ross90)\
**Post date:** [January 2, 2017, 8:22pm UTC](https://forums.unrealengine.com/t/how-to-stop-sounds-played-with-notify-playsound-in-animinstance/362986/3 "2017-01-02T20:22:44Z")

</div>

Hello, how can you do this with blueprint? I tried to reproduce it, but seems not possible to get the “audio component” and stop it, can you please explain it a little bit? Thank you.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_e1600e71](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e1600e71](https://forums.unrealengine.com/u/anonymous_user_e1600e71)\
**Post date:** [January 3, 2017, 8:26am UTC](https://forums.unrealengine.com/t/how-to-stop-sounds-played-with-notify-playsound-in-animinstance/362986/4 "2017-01-03T08:26:19Z")

</div>

As you can see in my header file I’ve manually add an **UAudioComponent** and initialize it at runtime with **UGameplayStatics::SpawnSoundAttached**.  
You can do this in blueprints to. Create a blueprint class inheriting from **AnimNotifyState** and add an **Audio** component in the components section. Then you should be able to do the exact same thing I did with C++

Good luck 🙂

---

<div class="post-metadata">

**Author:** ![Ross90](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ross90](https://forums.unrealengine.com/u/Ross90)\
**Post date:** [January 3, 2017, 3:24pm UTC](https://forums.unrealengine.com/t/how-to-stop-sounds-played-with-notify-playsound-in-animinstance/362986/5 "2017-01-03T15:24:54Z")

</div>

Yeah, I already did that, but how can you know when to stop it? Also, how to stop it with the “stop” node?

 ![120663-cattura.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/8/1/481e58bb0b128beae30971f65b71b9aacfc8f944.jpeg)

\*Regarding on how the resume the sound, you just need to split the audio file, so when the animation is paused you cut the audio at that moment and when you resume it play the next audio file you splitted.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_e1600e71](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e1600e71](https://forums.unrealengine.com/u/anonymous_user_e1600e71)\
**Post date:** [January 3, 2017, 10:40pm UTC](https://forums.unrealengine.com/t/how-to-stop-sounds-played-with-notify-playsound-in-animinstance/362986/6 "2017-01-03T22:40:48Z")

</div>

> how can you know when to stop it ?

In C++ the **YOURAnimNotifyState::NotifyEnd** is automatically called when your notify ends (the notify you add in your animation) so you be able to override the same kind of event in your blueprint.

> Also, how to stop it with the “stop” node?

The answer is in the question :D. Just use the stop node using the reference returned from **SpawnSoundAttached**

I don’t know about pausing and I didn’t explore this issue yet.

---

<div class="post-metadata">

**Author:** ![Ross90](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ross90](https://forums.unrealengine.com/u/Ross90)\
**Post date:** [January 4, 2017, 2:44pm UTC](https://forums.unrealengine.com/t/how-to-stop-sounds-played-with-notify-playsound-in-animinstance/362986/7 "2017-01-04T14:44:14Z")

</div>

Sorry to bother you, but in notify blueprint you can’t set variables, can’t call functions within it, can’t create custom events, it’s very limited, how can you reference that **SpawnSoundAttached** in NotifyEnd?  
Did you tried this in blueprint?  
Can you post an image of what to be done?

Thanks for your time and patience with me 🙂

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_e1600e71](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e1600e71](https://forums.unrealengine.com/u/anonymous_user_e1600e71)\
**Post date:** [January 4, 2017, 5:59pm UTC](https://forums.unrealengine.com/t/how-to-stop-sounds-played-with-notify-playsound-in-animinstance/362986/8 "2017-01-04T17:59:43Z")

</div>

All right let’s do this step by step:

1. Create a blueprint inheriting from AnimNotifyState
2. Create a variable of type **Audio Component Reference** and make it editable
3. Override the **Recieved Notify Begin** and **Recieved Notify End** function. In theses functions, you will be able to play and stop the AudioComponentReference you just created
4. In your animation, add a notify and select the notify type you just created at 1.
5. You should be able to select the sound to play in the animation directly ;). It should be the same thing we can see in my answer’s screenshot

Example:

 ![120806-override.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/9/0/d9032bfe9d2274797894d1df42da456f52c12df8.png)

However, like I said before, you won’t be able to pause the sound when the animation is paused.

---

<div class="post-metadata">

**Author:** ![Ross90](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ross90](https://forums.unrealengine.com/u/Ross90)\
**Post date:** [January 5, 2017, 2:29pm UTC](https://forums.unrealengine.com/t/how-to-stop-sounds-played-with-notify-playsound-in-animinstance/362986/9 "2017-01-05T14:29:56Z")

</div>

I don’t know if it’s me that don’t understand, but with AudioComponent you can’t set a sound, you need a SoundBase reference to set a sound, also AudioComponent is empty, it doesn’t work…

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_e1600e71](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e1600e71](https://forums.unrealengine.com/u/anonymous_user_e1600e71)\
**Post date:** [January 5, 2017, 4:14pm UTC](https://forums.unrealengine.com/t/how-to-stop-sounds-played-with-notify-playsound-in-animinstance/362986/10 "2017-01-05T16:14:25Z")

</div>

Yeah sorry, you are right I mixed both. As you can see in my C++ header I have two member:

1. An USoundBase to hold the sound reference to play (you will be able to set the sound here)
2. An UAudioComponent to handle the player (so you will be able to play and stop the previous sound)

In **Recieved Notify Begin** , just do as you did in your previous comment, use **SpawnSoundAttached** and save the **Audio Component Reference** you get here. (But if I remember well, you may not be able to change the variable in the notify blueprint, which sucks)

In **Recieved Notify End** just call stop on your **Audio Component Reference**

If you can modify variable in the notify blueprint, just go for the C++ solution since it’s working (I used it already). Sometimes, you just can’t do what you need in blueprints.

---

<div class="post-metadata">

**Author:** ![Ross90](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ross90](https://forums.unrealengine.com/u/Ross90)\
**Post date:** [January 6, 2017, 2:04pm UTC](https://forums.unrealengine.com/t/how-to-stop-sounds-played-with-notify-playsound-in-animinstance/362986/11 "2017-01-06T14:04:38Z")

</div>

I found a solution for blueprint 🙂

1. Add an **AudioComponent** in the character blueprint of the mesh you want to animate.
2. Create a blueprint inheriting from **AnimNotifyState**
3. Override the RecievedNotifyBegin and RecievedNotifyEnd
4. In NotifyBegin call the AudioComponent you added in the character blueprint and do this:

 ![121092-cattura.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/e/b/ceb1028dadc469c5a070b597a3326e8eb48949d7.jpeg)

1. In NotifyEnd do this:

 ![121097-cattura1.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/2/0/a20fc5a1ccc9e9191cd5c3577353f62b8e25425c.jpeg)

Now call this NotifyState in the animation you want to stop the sound, select the sound you want to play and you are done.

You can call this notify in any animation of that character you want to stop the sound at a certain point 🙂

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_e1600e71](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e1600e71](https://forums.unrealengine.com/u/anonymous_user_e1600e71)\
**Post date:** [January 6, 2017, 4:09pm UTC](https://forums.unrealengine.com/t/how-to-stop-sounds-played-with-notify-playsound-in-animinstance/362986/12 "2017-01-06T16:09:05Z")

</div>

Nice one 😉

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_9a6f689f](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_9a6f689f](https://forums.unrealengine.com/u/anonymous_user_9a6f689f)\
**Post date:** [March 3, 2017, 9:29pm UTC](https://forums.unrealengine.com/t/how-to-stop-sounds-played-with-notify-playsound-in-animinstance/362986/13 "2017-03-03T21:29:16Z")

</div>

Just came across this, and it’s exactly what I needed. Thanks!

---

<div class="post-metadata">

**Author:** ![Milantique](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Milantique](https://forums.unrealengine.com/u/Milantique)\
**Post date:** [February 10, 2024, 5:40am UTC](https://forums.unrealengine.com/t/how-to-stop-sounds-played-with-notify-playsound-in-animinstance/362986/14 "2024-02-10T05:40:52Z")

</div>

Hey guys. Can you tell me what I am doing wrong? I keep going over the what y’all said and it looks identical doesn’t it? I created a new AnimNotify blueprint \> clicked override in the functions and hit notify begin and end \> created an audio component variable in my character blueprint \> created a sound base variable in the AnimNotify blueprint \> copied what Ross90 has and added the notify state to the character animation. But I keep getting this error. It is driving me up the wall.

 ![BlueprintClass](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/6/8/5682a0565a8f3d2be131a426ab5285ff45470106.jpeg)  
 ![PlayerBlueprint](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/8/2/c82c34b5c38df2685e6c491de8b6d9b90a7ca9d3.jpeg)  
 ![NotifyBegin](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/4/e/44ef10560ae72cd108a6533f1f098ae52affbb63.jpeg)  
 ![NotifyEnd](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/4/6/c462144af41a7f896f93362c20ec0bda37f97eec.jpeg)  
 ![PlayerAnimation](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/2/a/82adee6b680a7272e7676b1f420531e65a057fba.jpeg)  
 ![Error](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/8/f/b8f86f4b4a36d58caf878e0acb9f8d904da90a3a.jpeg)

---

<div class="post-metadata">

**Author:** ![Milantique](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Milantique](https://forums.unrealengine.com/u/Milantique)\
**Post date:** [February 10, 2024, 5:42am UTC](https://forums.unrealengine.com/t/how-to-stop-sounds-played-with-notify-playsound-in-animinstance/362986/15 "2024-02-10T05:42:34Z")

</div>

Holy sh\*t. This is a 7 year old post. Ok well it is the only thing I have seen on the internet exactly to what I want so hopefully someone knows what is being said here and can help me out

---

<div class="post-metadata">

**Author:** ![hydronics3111](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@hydronics3111](https://forums.unrealengine.com/u/hydronics3111)\
**Post date:** [July 11, 2025, 6:38pm UTC](https://forums.unrealengine.com/t/how-to-stop-sounds-played-with-notify-playsound-in-animinstance/362986/16 "2025-07-11T18:38:21Z")

</div>

The error means you haven’t initialized or created the AudioToBeStopped component. my guess is you added the Component into the Variables list… but rather what you need is to add it into the COmponent list of the Character directly. essentially that’s not a Component you’ve ATTACHED to the character, but rather a variable that will reference an already existing component. Instead go to the Component List above the variables list and use the green Add button, where you would add a Collision or Mesh component. this will instantiate and attach it to the component hierarchy of your Character. everything else should work the same after that. happy hunting!
