# For what formats I can create a stream via createStream?

**URL:** <https://qa.fmod.com/t/for-what-formats-i-can-create-a-stream-via-createstream/17457>\
**Category:** Unity\
**Tags:** android, unity, csharp\
**Created:** [July 18, 2021, 11:49am UTC](https://qa.fmod.com/t/for-what-formats-i-can-create-a-stream-via-createstream/17457 "2021-07-18T11:49:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![SilentAndroid](https://avatars.discourse-cdn.com/v4/letter/s/b5ac83/32.png) [@SilentAndroid](https://qa.fmod.com/u/SilentAndroid)\
**Post date:** [July 18, 2021, 11:49am UTC](https://qa.fmod.com/t/for-what-formats-i-can-create-a-stream-via-createstream/17457/1 "2021-07-18T11:49:45Z")

</div>

Hi!

I try to create a stream from an audio file.  
I use unity and make build for android.

var result = FMODUnity.RuntimeManager.CoreSystem.createStream(filename, FMOD.MODE.CREATESTREAM, out Sound);

This code works for wav or mp3 formats.  
But not works and return ERR\_FORMAT in result for wma, amr and others.

So my question: for what formats I can create a stream via createStream?

if createStream supports NOT only wav or mp3, then why I get ERR\_FORMAT?

If createStream supports ONLY wav and mp3, then how to open other formats from disk?

Thanks!

---

<div class="post-metadata">

**Author:** ![mathew](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/mathew/32/431_2.png) [@mathew](https://qa.fmod.com/u/mathew)\
**Post date:** [July 19, 2021, 3:01am UTC](https://qa.fmod.com/t/for-what-formats-i-can-create-a-stream-via-createstream/17457/2 "2021-07-19T03:01:45Z")

</div>

I was hoping to point you at our docs, specifically our [FMOD\_SOUND\_TYPE](https://fmod.com/resources/documentation-api?version=2.01&page=core-api-sound.html#fmod_sound_type) docs for a full list of supported formats. However those docs are a little dated, while mostly correct they missed some detail. To answer your question directly, WMA can only be decoded on Windows platforms, not Android. Generally I recommend our container format FSB, for Android use FADPCM or Vorbis compression with it. If that’s not an option, try .ogg or .m4a as an alternative.

Here is a trimmed down version of my update to the docs that highlights all of our supported formats:

- FMOD Sample Bank (.fsb). Proprietary multi-sound bank format. Supported encodings: PCM16, FADPCM, Vorbis, AT9, XMA, Opus.
- Audio Interchange File Format (.aif, .aiff). Uncompressed integer formats only.
- Microsoft Advanced Systems Format (.asf, .wma, .wmv). Platform provided decoder, available only on Windows.
- Downloadable Sound (.dls). Multi-sound bank format used by MIDI (.mid).
- Free Lossless Audio Codec (.flac).
- Impulse Tracker (.it).
- Musical Instrument Digital Interface (.mid).
- Protracker / Fasttracker Module File (.mod).
- Moving Picture Experts Group (.mp2, .mp3). Also supports .wav (RIFF) container format.
- Ogg Vorbis (.ogg).
- Play list information container (.asx, .pls, .m3u, .wax). No audio, tags only.
- Raw uncompressed PCM data (.raw).
- ScreamTracker 3 Module (.s3m).
- Microsoft Waveform Audio File Format (.wav). Supported encodings: Uncompressed PCM, IMA ADPCM. Platform provided ACM decoder extensions, available only on Windows.
- FastTracker 2 Extended Module (.xm).
- Apple Audio Queue decoder (.mp4, .m4a, .mp3). Supported encodings: AAC, ALAC, MP3. Platform provided decoder, available only on iOS / tvOS devices.
- Microsoft Media Foundation decoder (.asf, .wma, .wmv, .mp4, .m4a). Platform provided decoder, available only on UWP.
- Google Media Codec decoder (.m4a, .mp4). Platform provided decoder, available only on Android.

---

<div class="post-metadata">

**Author:** ![SilentAndroid](https://avatars.discourse-cdn.com/v4/letter/s/b5ac83/32.png) [@SilentAndroid](https://qa.fmod.com/u/SilentAndroid)\
**Post date:** [July 20, 2021, 12:07pm UTC](https://qa.fmod.com/t/for-what-formats-i-can-create-a-stream-via-createstream/17457/3 "2021-07-20T12:07:06Z")

</div>

Thanks! Very helpful!
