# Play hosted .wav

**URL:** <https://forums.unrealengine.com/t/play-hosted-wav/342540>\
**Category:** Audio\
**Tags:** wave, unreal-engine, question\
**Created:** [December 28, 2015, 2:22am UTC](https://forums.unrealengine.com/t/play-hosted-wav/342540 "2015-12-28T02:22:03Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Taurian](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Taurian](https://forums.unrealengine.com/u/Taurian)\
**Post date:** [December 28, 2015, 2:22am UTC](https://forums.unrealengine.com/t/play-hosted-wav/342540/1 "2015-12-28T02:22:03Z")

</div>

Can UE4 play a hosted .wav file? Either using BP or C++?

---

<div class="post-metadata">

**Author:** ![calembendell](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@calembendell](https://forums.unrealengine.com/u/calembendell)\
**Post date:** [December 28, 2015, 3:11am UTC](https://forums.unrealengine.com/t/play-hosted-wav/342540/2 "2015-12-28T03:11:13Z")

</div>

So far as I know there is nothing in BP for doing this easily.

You can do this in C++, but most implementations will be platform dependent.  
I recommend the CWave project: [CWave - A Simple C++ Class to Manipulate WAV Files - CodeProject](http://www.codeproject.com/Articles/29676/CWave-A-Simple-C-Class-to-Manipulate-WAV-Files)  
You will need to set up buffering in chunks from the server yourself.

Streaming wav is nontrivial because of the size of the files and the necessary size of the buffers.  
If there’s any way to avoid streaming wav, do it!  
Consider using irrKlang and streaming OGG instead.

---

<div class="post-metadata">

**Author:** ![Taurian](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Taurian](https://forums.unrealengine.com/u/Taurian)\
**Post date:** [December 29, 2015, 2:48pm UTC](https://forums.unrealengine.com/t/play-hosted-wav/342540/3 "2015-12-29T14:48:04Z")

</div>

I don’t think it can play a hosted wav (on a fileserver). ☹

---

<div class="post-metadata">

**Author:** ![calembendell](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@calembendell](https://forums.unrealengine.com/u/calembendell)\
**Post date:** [December 29, 2015, 7:17pm UTC](https://forums.unrealengine.com/t/play-hosted-wav/342540/4 "2015-12-29T19:17:06Z")

</div>

No, you’ll need to absract the hosted wav as a remote file. Read the remote file as an istream with a 512 char buffer, and maintain 4096 chars of the stream in advance. Then point CWave to that buffer 🙂

---

<div class="post-metadata">

**Author:** ![calembendell](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@calembendell](https://forums.unrealengine.com/u/calembendell)\
**Post date:** [December 29, 2015, 7:29pm UTC](https://forums.unrealengine.com/t/play-hosted-wav/342540/5 "2015-12-29T19:29:40Z")

</div>

(i’m sorry that still isn’t particularly specific but what you’re wanting to do isn’t a simple task. maybe i’ll hammer out a full solution next week)

---

<div class="post-metadata">

**Author:** ![calembendell](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@calembendell](https://forums.unrealengine.com/u/calembendell)\
**Post date:** [April 5, 2016, 3:32am UTC](https://forums.unrealengine.com/t/play-hosted-wav/342540/6 "2016-04-05T03:32:39Z")

</div>

Did you manage to implement a solution to this yet, @Taurian?
