# net\_stream\_ios can't play net stream audio (iOS)

**URL:** https://qa.fmod.com/t/net-stream-ios-cant-play-net-stream-audio-ios/13741
**Category:** FMOD Engine
**Created:** [March 6, 2018, 12:37pm UTC](https://qa.fmod.com/t/net-stream-ios-cant-play-net-stream-audio-ios/13741 "2018-03-06T12:37:54Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![vicczhang](https://avatars.discourse-cdn.com/v4/letter/v/e480ec/32.png) [@vicczhang](https://qa.fmod.com/u/vicczhang)
#### Post date: [March 6, 2018, 12:37pm UTC](https://qa.fmod.com/t/net-stream-ios-cant-play-net-stream-audio-ios/13741/1 "2018-03-06T12:37:54Z")

</div>

Hello, when I use fmod net\_stream library run in iOS, I want to play a net stream audio music, it throw a error, and can’t continue to play in this code:

```
    result = sound->getOpenState(&openstate, &percent, &starving, 0);

```

it sounds like can’t get sound’s state, my iOS version is iOS11, hope some one can help me to solve this problem, it is appreciate!

---

<div class="post-metadata">

### Author: ![cameron-fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/cameron-fmod/32/261_2.png) [@cameron-fmod](https://qa.fmod.com/u/cameron-fmod)
#### Post date: [March 7, 2018, 12:41am UTC](https://qa.fmod.com/t/net-stream-ios-cant-play-net-stream-audio-ios/13741/2 "2018-03-07T00:41:51Z")

</div>

> [@](#):
>
> Hello, when I use fmod net\_stream library run in iOS, I want to play a net stream audio music, it throw a error, and can’t continue to play in this code:
> 
> ```
> result = sound->getOpenState(&openstate, &percent, &starving, 0);
> 
> ```
> 
> it sounds like can’t get sound’s state, my iOS version is iOS11, hope some one can help me to solve this problem, it is appreciate!

What is the error you are getting?

---

<div class="post-metadata">

### Author: ![vicczhang](https://avatars.discourse-cdn.com/v4/letter/v/e480ec/32.png) [@vicczhang](https://qa.fmod.com/u/vicczhang)
#### Post date: [March 7, 2018, 1:41am UTC](https://qa.fmod.com/t/net-stream-ios-cant-play-net-stream-audio-ios/13741/3 "2018-03-07T01:41:12Z")

</div>

when i run your net\_stream demo it can’t play music in internets,but in android it can play.

---

<div class="post-metadata">

### Author: ![cameron-fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/cameron-fmod/32/261_2.png) [@cameron-fmod](https://qa.fmod.com/u/cameron-fmod)
#### Post date: [March 7, 2018, 3:45am UTC](https://qa.fmod.com/t/net-stream-ios-cant-play-net-stream-audio-ios/13741/4 "2018-03-07T03:45:57Z")

</div>

It sounds like the Offline Render Audio Queue is not compatible with that net stream.

Try setting the exinfo.suggestedsoundtype, used to create the sound, to FMOD\_SOUND\_TYPE\_MPEG. This will force it to use the mpeg codec first.

---

<div class="post-metadata">

### Author: ![vicczhang](https://avatars.discourse-cdn.com/v4/letter/v/e480ec/32.png) [@vicczhang](https://qa.fmod.com/u/vicczhang)
#### Post date: [March 7, 2018, 7:32am UTC](https://qa.fmod.com/t/net-stream-ios-cant-play-net-stream-audio-ios/13741/5 "2018-03-07T07:32:20Z")

</div>

> [@](#):
>
> It sounds like the Offline Render Audio Queue is not compatible with that net stream.
> 
> Try setting the exinfo.suggestedsoundtype, used to create the sound, to FMOD\_SOUND\_TYPE\_MPEG. This will force it to use the mpeg codec first.

it works!, Thank you very much, you save my life!
