# System::initialize failed in DSOUND output type

**URL:** <https://qa.fmod.com/t/system-initialize-failed-in-dsound-output-type/11208>\
**Category:** FMOD Studio\
**Created:** [November 6, 2013, 8:02am UTC](https://qa.fmod.com/t/system-initialize-failed-in-dsound-output-type/11208 "2013-11-06T08:02:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![gdkid1412](https://avatars.discourse-cdn.com/v4/letter/g/898d66/32.png) [@gdkid1412](https://qa.fmod.com/u/gdkid1412)\
**Post date:** [November 6, 2013, 8:02am UTC](https://qa.fmod.com/t/system-initialize-failed-in-dsound-output-type/11208/1 "2013-11-06T08:02:07Z")

</div>

When FMOD\_OUTPUTTYPE is FMOD\_OUTPUTTYPE\_DSOUND and the value of extradriverdata is 0 System::initialize returns FMOD\_OK.  
But if I pass the address of CWnd::m\_hWnd to extradriverdata(my app based on a MFC application),the return value of System::initialize is FMOD\_ERR\_OUTPUT\_DRIVER\_CALL.  
How to solve this?

---

<div class="post-metadata">

**Author:** ![gdkid1412](https://avatars.discourse-cdn.com/v4/letter/g/898d66/32.png) [@gdkid1412](https://qa.fmod.com/u/gdkid1412)\
**Post date:** [November 6, 2013, 8:11am UTC](https://qa.fmod.com/t/system-initialize-failed-in-dsound-output-type/11208/2 "2013-11-06T08:11:37Z")

</div>

The reason why I want to pass &m\_hWnd to extradriverdata is the sound still playing after I minimize the window (I called SetMute when minimize is triggered). And it stuttered for a while after I close the window. There problem didn’t happen in other output type such as WASAPI.  
So I guess it could be solved if I pass the &m\_hWnd to extradrivardata. But failed.

---

<div class="post-metadata">

**Author:** ![gdkid1412](https://avatars.discourse-cdn.com/v4/letter/g/898d66/32.png) [@gdkid1412](https://qa.fmod.com/u/gdkid1412)\
**Post date:** [November 7, 2013, 1:09am UTC](https://qa.fmod.com/t/system-initialize-failed-in-dsound-output-type/11208/3 "2013-11-07T01:09:35Z")

</div>

When creating a IDirectSound we need to call SetCooperativeLevel method which need a HWND parameter.  
So how can it initialize successful if extradriverdata is set to 0,but failed with &m\_hWnd?  
Thanks in advance if someone can explain about this to we.I’m a little puzzled.

---

<div class="post-metadata">

**Author:** ![brett](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/brett/32/261_2.png) [@brett](https://qa.fmod.com/u/brett)\
**Post date:** [November 12, 2013, 3:40am UTC](https://qa.fmod.com/t/system-initialize-failed-in-dsound-output-type/11208/4 "2013-11-12T03:40:15Z")

</div>

I think the issue is that you are using &m\_hwnd instead of just passing the m\_hwnd directly.

The documentation does say pointer to, so i’ll update that to say cast to instead, apologies for the hassle.
