# How to save audio .wav format to variable ?

**URL:** <https://forums.unrealengine.com/t/how-to-save-audio-wav-format-to-variable/465883>\
**Category:** Audio\
**Tags:** Variable, cue, Struct, play-sound-at-locati, unreal-engine, question\
**Created:** [May 27, 2020, 1:13pm UTC](https://forums.unrealengine.com/t/how-to-save-audio-wav-format-to-variable/465883 "2020-05-27T13:13:41Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![HVS\_RHS](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@HVS\_RHS](https://forums.unrealengine.com/u/HVS_RHS)\
**Post date:** [May 27, 2020, 1:13pm UTC](https://forums.unrealengine.com/t/how-to-save-audio-wav-format-to-variable/465883/1 "2020-05-27T13:13:41Z")

</div>

Hello,

I am using struct variable for weapon, containing all detail of weapon. I want to save audio file (.wav) to struct but i don’t know which variable type it should be. I tried variable type as “sound cue” and “sound base” but i cannot store value in it. Like in blueprint you can store value as default value but as soon as you place it in world it removes value from it and i cannot set it.  
Hope you understand my question

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [May 27, 2020, 2:16pm UTC](https://forums.unrealengine.com/t/how-to-save-audio-wav-format-to-variable/465883/2 "2020-05-27T14:16:32Z")

</div>

Sound wave object reference?

---

<div class="post-metadata">

**Author:** ![HVS\_RHS](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@HVS\_RHS](https://forums.unrealengine.com/u/HVS_RHS)\
**Post date:** [May 27, 2020, 3:29pm UTC](https://forums.unrealengine.com/t/how-to-save-audio-wav-format-to-variable/465883/3 "2020-05-27T15:29:18Z")

</div>

Hello again ClockworkOcean,

Thanks for replay and tried your suggestion but still the same.

I have many types of weapons and almost everything runs on struct so i thought that sound of each weapon would be easy as struct is passing all values.

Do you think that unreal cannot save sound on editable variable?

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [May 27, 2020, 3:44pm UTC](https://forums.unrealengine.com/t/how-to-save-audio-wav-format-to-variable/465883/4 "2020-05-27T15:44:50Z")

</div>

![302959-default.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/8/3/183c4b51fcd42686ecb9d681724e6d354c933520.jpeg)

 ![302960-read-write.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/6/1/4613ed58cf254d0e49ae835b1b03fdd39bd031f7.jpeg)

What am I missing?

---

<div class="post-metadata">

**Author:** ![HVS\_RHS](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@HVS\_RHS](https://forums.unrealengine.com/u/HVS_RHS)\
**Post date:** [May 27, 2020, 5:15pm UTC](https://forums.unrealengine.com/t/how-to-save-audio-wav-format-to-variable/465883/5 "2020-05-27T17:15:27Z")

</div>

You made struct.  
added that struct to blueprint actor.  
And changed it’s value.

You did this all.  
Now if you make struct editable in blue print. And place that blueprint actor in your map.  
All values of variable should be there.  
But in my project, when i place blueprint actor with struct in map, all struct variable values are there except that sound value.

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [May 27, 2020, 5:48pm UTC](https://forums.unrealengine.com/t/how-to-save-audio-wav-format-to-variable/465883/6 "2020-05-27T17:48:02Z")

</div>

In the level:

 ![302972-in-level.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/e/c/4ec0a56ffdd5758809f917e8484bc7c60204e9b0.jpeg)

But you will only get the default values when you place in the level. When you place the BP in the level, you get a fresh instance, so all parts of the struct that are not intialized by default will be empty.

---

<div class="post-metadata">

**Author:** ![HVS\_RHS](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@HVS\_RHS](https://forums.unrealengine.com/u/HVS_RHS)\
**Post date:** [May 27, 2020, 5:54pm UTC](https://forums.unrealengine.com/t/how-to-save-audio-wav-format-to-variable/465883/7 "2020-05-27T17:54:25Z")

</div>

hummm , that’s strange !!!  
i set value as default. But still mine value show empty.  
Even if i try to set value in placed actor, it won’t let me.  
Which UE version you are using?  
Mine is 4.25  
And is there limit of variables in struct ?

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [May 27, 2020, 5:57pm UTC](https://forums.unrealengine.com/t/how-to-save-audio-wav-format-to-variable/465883/8 "2020-05-27T17:57:04Z")

</div>

4.25 here, no limit as far as I know.

When you click it do you get a list?

---

<div class="post-metadata">

**Author:** ![HVS\_RHS](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@HVS\_RHS](https://forums.unrealengine.com/u/HVS_RHS)\
**Post date:** [May 27, 2020, 6:08pm UTC](https://forums.unrealengine.com/t/how-to-save-audio-wav-format-to-variable/465883/9 "2020-05-27T18:08:22Z")

</div>

yes i do get list

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [May 27, 2020, 6:10pm UTC](https://forums.unrealengine.com/t/how-to-save-audio-wav-format-to-variable/465883/10 "2020-05-27T18:10:20Z")

</div>

Try using type ‘sound base object reference’ it should fit anything you try and throw at it…

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [May 27, 2020, 6:11pm UTC](https://forums.unrealengine.com/t/how-to-save-audio-wav-format-to-variable/465883/11 "2020-05-27T18:11:00Z")

</div>

Well, that’s how you set it, no?

---

<div class="post-metadata">

**Author:** ![HVS\_RHS](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@HVS\_RHS](https://forums.unrealengine.com/u/HVS_RHS)\
**Post date:** [May 27, 2020, 6:14pm UTC](https://forums.unrealengine.com/t/how-to-save-audio-wav-format-to-variable/465883/12 "2020-05-27T18:14:27Z")

</div>

HAHAHAHAHA, You are right. But if select any of those, the list menu just collapsed and no value is stored.

---

<div class="post-metadata">

**Author:** ![HVS\_RHS](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@HVS\_RHS](https://forums.unrealengine.com/u/HVS_RHS)\
**Post date:** [May 27, 2020, 6:17pm UTC](https://forums.unrealengine.com/t/how-to-save-audio-wav-format-to-variable/465883/13 "2020-05-27T18:17:17Z")

</div>

![302975-abc.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/c/0/dc09c294c046c7d71767771360e56a12d715705d.jpeg)

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [May 27, 2020, 6:17pm UTC](https://forums.unrealengine.com/t/how-to-save-audio-wav-format-to-variable/465883/14 "2020-05-27T18:17:49Z")

</div>

Have you tried type ‘sound base object reference’?

---

<div class="post-metadata">

**Author:** ![HVS\_RHS](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@HVS\_RHS](https://forums.unrealengine.com/u/HVS_RHS)\
**Post date:** [May 27, 2020, 6:21pm UTC](https://forums.unrealengine.com/t/how-to-save-audio-wav-format-to-variable/465883/15 "2020-05-27T18:21:57Z")

</div>

I just tried that, still same result.

---

<div class="post-metadata">

**Author:** ![HVS\_RHS](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@HVS\_RHS](https://forums.unrealengine.com/u/HVS_RHS)\
**Post date:** [May 27, 2020, 6:23pm UTC](https://forums.unrealengine.com/t/how-to-save-audio-wav-format-to-variable/465883/16 "2020-05-27T18:23:54Z")

</div>

I think my engine is broken

![302981-worrying-emoji.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/4/0/940b12b170c426d11351e9a60a32cc473a4642f5.png)

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [May 27, 2020, 6:26pm UTC](https://forums.unrealengine.com/t/how-to-save-audio-wav-format-to-variable/465883/17 "2020-05-27T18:26:00Z")

</div>

Ok can you do me pics of: structure, and variable declaration in the blueprint?

---

<div class="post-metadata">

**Author:** ![HVS\_RHS](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@HVS\_RHS](https://forums.unrealengine.com/u/HVS_RHS)\
**Post date:** [May 27, 2020, 6:28pm UTC](https://forums.unrealengine.com/t/how-to-save-audio-wav-format-to-variable/465883/18 "2020-05-27T18:28:13Z")

</div>

![302982-ccc.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/c/c/7ccc2184fbf192503062530d1281a75f8ff8c12a.png)

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [May 27, 2020, 6:34pm UTC](https://forums.unrealengine.com/t/how-to-save-audio-wav-format-to-variable/465883/19 "2020-05-27T18:34:10Z")

</div>

I need the top bit actually, and the variable or array declaration in the blueprint.

---

<div class="post-metadata">

**Author:** ![HVS\_RHS](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@HVS\_RHS](https://forums.unrealengine.com/u/HVS_RHS)\
**Post date:** [May 27, 2020, 6:39pm UTC](https://forums.unrealengine.com/t/how-to-save-audio-wav-format-to-variable/465883/20 "2020-05-27T18:39:05Z")

</div>

That is all I have one struct only

[Next page](https://forums.unrealengine.com/t/how-to-save-audio-wav-format-to-variable/465883.md?page=2)
