# Opening PLS or M3U doesnt seem to work in Unity Plugin

**URL:** https://qa.fmod.com/t/opening-pls-or-m3u-doesnt-seem-to-work-in-unity-plugin/11560
**Category:** Unity
**Created:** [July 16, 2014, 10:04pm UTC](https://qa.fmod.com/t/opening-pls-or-m3u-doesnt-seem-to-work-in-unity-plugin/11560 "2014-07-16T22:04:46Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Alexander](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/alexander/32/12_2.png) [@Alexander](https://qa.fmod.com/u/Alexander)
#### Post date: [July 16, 2014, 10:04pm UTC](https://qa.fmod.com/t/opening-pls-or-m3u-doesnt-seem-to-work-in-unity-plugin/11560/1 "2014-07-16T22:04:46Z")

</div>

I have this code working with the older FMOD EX API, AND, I have this working in C++ with a straight 1:1 translation of function calls.

WHen I try it in Unity, it seemingly opens the stream, sets the “open state” to Ready, but on an immediate read of the format throws an ERR\_FILE\_EOF.

```
result = music.getOpenState(out openstate, out percentbuffered, out starving, out busy);
ERRCHECK(result);

if (openstate == FMOD.OPENSTATE.READY)
{
    int dead1 = 0;
    int dead2 = 0;
    FMOD.SOUND_TYPE soundtype;
    FMOD.SOUND_FORMAT refSoundFormat;
    result = music.getFormat(out soundtype, out refSoundFormat, out dead1, out dead2);
    ERRCHECK(result); <-- prints out that the stream is ERR_FILE_EOF and not ready?!
}

```

  
Again, same code, more or less 1:1 in C++ (pointers, etc...) works perfectly fine to parse the urls (e.g.):

[http://hot108.com/hot108.pls](http://hot108.com/hot108.pls)

supplied.

Note that if I stick the raw URL to the MP3 or OGG it also works fine, just not on .pls or .m3u resources anymore.

---

<div class="post-metadata">

### Author: ![Alexander](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/alexander/32/12_2.png) [@Alexander](https://qa.fmod.com/u/Alexander)
#### Post date: [July 18, 2014, 5:31pm UTC](https://qa.fmod.com/t/opening-pls-or-m3u-doesnt-seem-to-work-in-unity-plugin/11560/2 "2014-07-18T17:31:52Z")

</div>

Just to clarify, I have it working with both the older API FMOD EX in C# and I have it working with the new studio API examples in C++.

Just not with the Unity plugin version in C#.

---

<div class="post-metadata">

### Author: ![Alexander](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/alexander/32/12_2.png) [@Alexander](https://qa.fmod.com/u/Alexander)
#### Post date: [July 30, 2014, 8:02pm UTC](https://qa.fmod.com/t/opening-pls-or-m3u-doesnt-seem-to-work-in-unity-plugin/11560/3 "2014-07-30T20:02:11Z")

</div>

Buehler? Acknowledged bug? Anything?

---

<div class="post-metadata">

### Author: ![Alexander](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/alexander/32/12_2.png) [@Alexander](https://qa.fmod.com/u/Alexander)
#### Post date: [August 22, 2014, 5:52pm UTC](https://qa.fmod.com/t/opening-pls-or-m3u-doesnt-seem-to-work-in-unity-plugin/11560/4 "2014-08-22T17:52:36Z")

</div>

Seriously? Are we not supposed to post questions for answers here? 1.5 months and not even an acknowledgement this is a bug, incorrect code? nothing?

Again, works 100% in C++ version, c# wrapper wont play PLS/M3U announcement streams, but will play the raw URLs.

…
