@@ -11,12 +11,14 @@ CSoundRender_CoreA::CSoundRender_CoreA() : CSoundRender_Core()
1111 pDevice = nullptr ;
1212 pDeviceList = nullptr ;
1313 pContext = nullptr ;
14+ #if defined(WINDOWS)
1415 eaxSet = nullptr ;
1516 eaxGet = nullptr ;
17+ #endif
1618}
1719
1820CSoundRender_CoreA::~CSoundRender_CoreA () {}
19-
21+ # if defined(WINDOWS)
2022bool CSoundRender_CoreA::EAXQuerySupport (bool isDeferred, const GUID* guid, u32 prop, void * val, u32 sz)
2123{
2224 if (AL_NO_ERROR != eaxGet (guid, prop, 0 , val, sz))
@@ -67,6 +69,7 @@ bool CSoundRender_CoreA::EAXTestSupport(bool isDeferred)
6769 return false ;
6870 return true ;
6971}
72+ #endif
7073
7174void CSoundRender_CoreA::_restart () { inherited::_restart (); }
7275void CSoundRender_CoreA::_initialize ()
@@ -115,9 +118,9 @@ void CSoundRender_CoreA::_initialize()
115118 A_CHK (alListener3f (AL_POSITION, 0 .f , 0 .f , 0 .f ));
116119 A_CHK (alListener3f (AL_VELOCITY, 0 .f , 0 .f , 0 .f ));
117120 Fvector orient[2 ] = {{0 .f , 0 .f , 1 .f }, {0 .f , 1 .f , 0 .f }};
118- A_CHK (alListenerfv (AL_ORIENTATION, &orient[0 ].x ));
121+ A_CHK (alListenerfv (AL_ORIENTATION, ( const ALfloat*) &orient[0 ].x ));
119122 A_CHK (alListenerf (AL_GAIN, 1 .f ));
120-
123+ # if defined(WINDOWS)
121124 // Check for EAX extension
122125 bEAX = deviceDesc.props .eax && !deviceDesc.props .eax_unwanted ;
123126
@@ -133,7 +136,7 @@ void CSoundRender_CoreA::_initialize()
133136 bDeferredEAX = EAXTestSupport (true );
134137 bEAX = EAXTestSupport (false );
135138 }
136-
139+ # endif
137140 inherited::_initialize ();
138141
139142 // Pre-create targets
@@ -182,8 +185,10 @@ void CSoundRender_CoreA::_clear()
182185 xr_delete (pDeviceList);
183186}
184187
188+ #if defined(WINDOWS)
185189void CSoundRender_CoreA::i_eax_set (const GUID* guid, u32 prop, void * val, u32 sz) { eaxSet (guid, prop, 0 , val, sz); }
186190void CSoundRender_CoreA::i_eax_get (const GUID* guid, u32 prop, void * val, u32 sz) { eaxGet (guid, prop, 0 , val, sz); }
191+ #endif
187192void CSoundRender_CoreA::update_listener (const Fvector& P, const Fvector& D, const Fvector& N, float dt)
188193{
189194 inherited::update_listener (P, D, N, dt);
@@ -198,5 +203,5 @@ void CSoundRender_CoreA::update_listener(const Fvector& P, const Fvector& D, con
198203
199204 A_CHK (alListener3f (AL_POSITION, Listener.position .x , Listener.position .y , -Listener.position .z ));
200205 A_CHK (alListener3f (AL_VELOCITY, 0 .f , 0 .f , 0 .f ));
201- A_CHK (alListenerfv (AL_ORIENTATION, &Listener.orientation [0 ].x ));
206+ A_CHK (alListenerfv (AL_ORIENTATION, ( const ALfloat*) &Listener.orientation [0 ].x ));
202207}
0 commit comments