# Recording to WAV file in Studio API

**URL:** <https://qa.fmod.com/t/recording-to-wav-file-in-studio-api/16526>\
**Category:** FMOD Engine\
**Tags:** csharp\
**Created:** [December 6, 2020, 3:44pm UTC](https://qa.fmod.com/t/recording-to-wav-file-in-studio-api/16526 "2020-12-06T15:44:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Feuertopf1](https://avatars.discourse-cdn.com/v4/letter/f/839c29/32.png) [@Feuertopf1](https://qa.fmod.com/u/Feuertopf1)\
**Post date:** [December 6, 2020, 3:44pm UTC](https://qa.fmod.com/t/recording-to-wav-file-in-studio-api/16526/1 "2020-12-06T15:44:07Z")

</div>

Hi everyone,

I’d like to record all Fmod Studio output to a WAV file. Here’s how I attempted do it:

```
FMOD.Studio.System sys;
FMOD.Studio.System.create(out sys);

sys.initialize(64,
	FMOD.Studio.INITFLAGS.SYNCHRONOUS_UPDATE,
	FMOD.INITFLAGS.NORMAL,
	NativeUtf8FromString("c:\\temp\\output.wav"));

sys.getCoreSystem(out var coreSystem);
coreSystem.setOutput(OUTPUTTYPE.WAVWRITER_NRT);
for (int i = 0; i < 100; i++) // process 100 blocks of [dspSize] samples each
	sys.update();
sys.release();

```

I expect this code to write 100 \* [dspBufferSize] samples of silence to the wav file.

All my calls succeed, but nothing gets written to the WAV file. What am I missing?

---

<div class="post-metadata">

**Author:** ![Feuertopf1](https://avatars.discourse-cdn.com/v4/letter/f/839c29/32.png) [@Feuertopf1](https://qa.fmod.com/u/Feuertopf1)\
**Post date:** [December 12, 2020, 4:28pm UTC](https://qa.fmod.com/t/recording-to-wav-file-in-studio-api/16526/2 "2020-12-12T16:28:04Z")

</div>

> [@Feuertopf1](#):
>
> ```auto
> sys.getCoreSystem(out var coreSystem);
> coreSystem.setOutput(OUTPUTTYPE.WAVWRITER_NRT);
> 
> ```

This needs to be done before calling sys.initialize.
