# \[PLUGIN\] Play Sound Files From Disk (OGG)

**URL:** <https://forums.unrealengine.com/t/plugin-play-sound-files-from-disk-ogg/9173>\
**Category:** Game Development\
**Tags:** unreal-engine, Work-in-Progress, Showcase\
**Created:** [August 11, 2014, 2:54am UTC](https://forums.unrealengine.com/t/plugin-play-sound-files-from-disk-ogg/9173 "2014-08-11T02:54:06Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![n00854180t](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@n00854180t](https://forums.unrealengine.com/u/n00854180t)\
**Post date:** [August 11, 2014, 2:54am UTC](https://forums.unrealengine.com/t/plugin-play-sound-files-from-disk-ogg/9173/1 "2014-08-11T02:54:06Z")

</div>

These nodes are all in Rama’s BP library now, check it out! [(39) Rama's Extra Blueprint Nodes for You as a Plugin, No C++ Required! - Blueprint - Unreal Engine Forums](https://forums.unrealengine.com/showthread.php?3851-(39)-Rama-s-Extra-Blueprint-Nodes-for-You-as-a-Plugin-No-C-Required!&p=118564&viewfull=1#post118564)

* * *

Hey everyone!

I was listening to an audiobook yesterday and thought it would be cool to build an immersive environment (campire w/ old man storyteller) for listening to audiobooks in VR. Seemed like a nice little side project to promote my game and get something finished and released early on. I looked around but didn’t find any way to play a sound file from disk, which of course would be the ideal way do a VR audiobook player. I did find [this helpful code from @keru](https://forums.unrealengine.com/showthread.php?7936-Custom-Music-Player&p=97659&viewfull=1#post97659) in his forays into making a music player, and using that I was able to whip up a couple of blueprint nodes.

**Play Sound From Disk Blueprint Lib**

_[Github Repo](https://github.com/ChairGraveyard/ue4-playsoundfromdisk-plugin)_  
_[Zip File Download](https://www.mediafire.com/?nxs22thhbuaha22)_

This plugin provides two blueprint nodes, _Play Sound At Location From File_, and _Play Sound Attached From File_. They are identical to _Play Sound At Location_ and _Play Sound Attached_ except that they take a file path rather than a sound asset.

Thanks to @keru for the sound loading code, and @Rama for the blueprint library plugin example code.

**Future Work**

- Currently this doesn’t have the other nodes, like those for playing Dialogue. It should be very easy to implement those, feel free to submit a pull request!

Edit: Links added.

Edit: There was no bug (there is no spoon, Neo). User error. The time is in seconds. For some odd reason I figured it would be 0-1. Derp. Plugin works!

---

<div class="post-metadata">

**Author:** ![Jacky](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jacky/32/918690_2.png) [@Jacky](https://forums.unrealengine.com/u/Jacky)\
**Post date:** [August 14, 2014, 8:56pm UTC](https://forums.unrealengine.com/t/plugin-play-sound-files-from-disk-ogg/9173/2 "2014-08-14T20:56:14Z")

</div>

Posting here too to bump for publicity. Thank you! 🙂

---

<div class="post-metadata">

**Author:** ![Arixsus](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Arixsus](https://forums.unrealengine.com/u/Arixsus)\
**Post date:** [August 14, 2014, 9:57pm UTC](https://forums.unrealengine.com/t/plugin-play-sound-files-from-disk-ogg/9173/3 "2014-08-14T21:57:40Z")

</div>

This is a really awesome. I can think of hundreds of ways to utilize this. Thanks!

---

<div class="post-metadata">

**Author:** ![n00854180t](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@n00854180t](https://forums.unrealengine.com/u/n00854180t)\
**Post date:** [August 14, 2014, 10:08pm UTC](https://forums.unrealengine.com/t/plugin-play-sound-files-from-disk-ogg/9173/4 "2014-08-14T22:08:25Z")

</div>

Thanks guys for the kind words 🙂 Glad you like it.

BTW I had added another BP node after I made the initial post - it just returns the SoundWave object instead of playing it directly.

I looked into setting up the Dialogue nodes as well, but it seems like they don’t load a sound directly anyway, so the node for loading to a SoundWave should be sufficient to use the Dialogue BP nodes already.

I’ll be looking into adding MP3 decoding support to the plugin sometime soon.

Massive thanks go to @keru for his original snippet for loading Ogg files into a SoundWave, and to @Rama for his BP library plugin, which I used as an example to set this one up.

---

<div class="post-metadata">

**Author:** ![Jacky](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jacky/32/918690_2.png) [@Jacky](https://forums.unrealengine.com/u/Jacky)\
**Post date:** [August 14, 2014, 10:16pm UTC](https://forums.unrealengine.com/t/plugin-play-sound-files-from-disk-ogg/9173/5 "2014-08-14T22:16:45Z")

</div>

MP3 support would make it perfect. Good luck and keep us posted!

---

<div class="post-metadata">

**Author:** ![n00854180t](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@n00854180t](https://forums.unrealengine.com/u/n00854180t)\
**Post date:** [August 14, 2014, 10:39pm UTC](https://forums.unrealengine.com/t/plugin-play-sound-files-from-disk-ogg/9173/6 "2014-08-14T22:39:37Z")

</div>

> [@Jacky;118452](#):
>
> MP3 support would make it perfect. Good luck and keep us posted!

It’s a tricky situation due to the patent issues with MP3 - there are few libs with compatible licensing (LAME, for instance, is LGPL for encoding, but GPL for decoding - d’oh). Can’t wait until it expires - I guess it’s 2017 in the US and a bit sooner elsewhere.

I _think_ it should be appropriate to use a LGPL DLL linked against a UE4 plugin, but I’m no lawyer or LGPL specialist. I think it works because the plugin code is open, though. Not sure.

In any case, I’ll try to provide MP3 support through an LGPL library and leave it at that (I’m not super concerned about having the MP3 people come after me, honestly…worst case I have to take the plugin down).

---

<div class="post-metadata">

**Author:** ![TechLord](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/techlord/32/1040563_2.png) [@TechLord](https://forums.unrealengine.com/u/TechLord)\
**Post date:** [August 16, 2014, 1:20am UTC](https://forums.unrealengine.com/t/plugin-play-sound-files-from-disk-ogg/9173/7 "2014-08-16T01:20:46Z")

</div>

Awesome n00854180t. This is exactly what I needed to build a prototype for a [Mood Jukebox](https://forums.epicgames.com/threads/984043-The-Official-Idea-Guy-Thread?p=31805628&viewfull=1#post31805628). I eventually want to wire up a online music service like Spotify.

---

<div class="post-metadata">

**Author:** ![n00854180t](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@n00854180t](https://forums.unrealengine.com/u/n00854180t)\
**Post date:** [August 16, 2014, 11:36am UTC](https://forums.unrealengine.com/t/plugin-play-sound-files-from-disk-ogg/9173/8 "2014-08-16T11:36:45Z")

</div>

> [@TechLord;119224](#):
>
> Awesome n00854180t. This is exactly what I needed to build a prototype for a [Mood Jukebox](https://forums.epicgames.com/threads/984043-The-Official-Idea-Guy-Thread?p=31805628&viewfull=1#post31805628). I eventually want to wire up a online music service like Spotify.

Cool idea!

BTW if you use Rama’s BP library, both this plugin and the load (dds) texture from disk plugins are integrated there now.

---

<div class="post-metadata">

**Author:** ![QLQXD1](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/qlqxd1/32/778376_2.png) [@QLQXD1](https://forums.unrealengine.com/u/QLQXD1)\
**Post date:** [March 23, 2023, 3:28am UTC](https://forums.unrealengine.com/t/plugin-play-sound-files-from-disk-ogg/9173/9 "2023-03-23T03:28:24Z")

</div>

THNX
