Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-fonts
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Aleksandr Isakov
wine-fonts
Commits
9f53b7a8
Commit
9f53b7a8
authored
Mar 27, 2015
by
Mark Harmstone
Committed by
Vitaly Lipatov
Jul 30, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dsound: Support getting and setting EAX buffer properties.
parent
92376c01
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
72 additions
and
0 deletions
+72
-0
buffer.c
dlls/dsound/buffer.c
+2
-0
dsound_eax.h
dlls/dsound/dsound_eax.h
+4
-0
dsound_private.h
dlls/dsound/dsound_private.h
+2
-0
eax.c
dlls/dsound/eax.c
+64
-0
No files found.
dlls/dsound/buffer.c
View file @
9f53b7a8
...
...
@@ -1127,6 +1127,8 @@ HRESULT secondarybuffer_create(DirectSoundDevice *device, const DSBUFFERDESC *ds
return
DSERR_OUTOFMEMORY
;
}
dsb
->
eax
.
reverb_mix
=
EAX_REVERBMIX_USEDISTANCE
;
if
(
dsb
->
dsbd
.
dwFlags
&
DSBCAPS_CTRL3D
)
{
dsb
->
ds3db_ds3db
.
dwSize
=
sizeof
(
DS3DBUFFER
);
dsb
->
ds3db_ds3db
.
vPosition
.
x
=
0
.
0
;
...
...
dlls/dsound/dsound_eax.h
View file @
9f53b7a8
...
...
@@ -119,6 +119,10 @@ typedef struct {
EFXEAXREVERBPROPERTIES
eax_props
;
}
eax_info
;
typedef
struct
{
float
reverb_mix
;
}
eax_buffer_info
;
#ifdef __cplusplus
}
#endif
...
...
dlls/dsound/dsound_private.h
View file @
9f53b7a8
...
...
@@ -177,6 +177,8 @@ struct IDirectSoundBufferImpl
int
num_filters
;
DSFilter
*
filters
;
eax_buffer_info
eax
;
struct
list
entry
;
};
...
...
dlls/dsound/eax.c
View file @
9f53b7a8
...
...
@@ -179,6 +179,38 @@ HRESULT WINAPI EAX_Get(IDirectSoundBufferImpl *buf, REFGUID guidPropSet,
}
return
S_OK
;
}
else
if
(
IsEqualGUID
(
&
DSPROPSETID_EAXBUFFER_ReverbProperties
,
guidPropSet
))
{
EAXBUFFER_REVERBPROPERTIES
*
props
;
if
(
!
buf
->
device
->
eax
.
using_eax
)
init_eax
(
buf
->
device
);
switch
(
dwPropID
)
{
case
DSPROPERTY_EAXBUFFER_ALL
:
if
(
cbPropData
<
sizeof
(
EAXBUFFER_REVERBPROPERTIES
))
return
E_FAIL
;
props
=
pPropData
;
props
->
fMix
=
buf
->
eax
.
reverb_mix
;
*
pcbReturned
=
sizeof
(
EAXBUFFER_REVERBPROPERTIES
);
break
;
case
DSPROPERTY_EAXBUFFER_REVERBMIX
:
if
(
cbPropData
<
sizeof
(
float
))
return
E_FAIL
;
*
(
float
*
)
pPropData
=
buf
->
eax
.
reverb_mix
;
*
pcbReturned
=
sizeof
(
float
);
break
;
default:
return
E_PROP_ID_UNSUPPORTED
;
}
return
S_OK
;
}
return
E_PROP_ID_UNSUPPORTED
;
...
...
@@ -276,6 +308,38 @@ HRESULT WINAPI EAX_Set(IDirectSoundBufferImpl *buf, REFGUID guidPropSet,
}
return
S_OK
;
}
else
if
(
IsEqualGUID
(
&
DSPROPSETID_EAXBUFFER_ReverbProperties
,
guidPropSet
))
{
EAXBUFFER_REVERBPROPERTIES
*
props
;
if
(
!
buf
->
device
->
eax
.
using_eax
)
init_eax
(
buf
->
device
);
switch
(
dwPropID
)
{
case
DSPROPERTY_EAXBUFFER_ALL
:
if
(
cbPropData
!=
sizeof
(
EAXBUFFER_REVERBPROPERTIES
))
return
E_FAIL
;
props
=
pPropData
;
TRACE
(
"setting reverb mix to %f
\n
"
,
props
->
fMix
);
buf
->
eax
.
reverb_mix
=
props
->
fMix
;
break
;
case
DSPROPERTY_EAXBUFFER_REVERBMIX
:
if
(
cbPropData
!=
sizeof
(
float
))
return
E_FAIL
;
TRACE
(
"setting reverb mix to %f
\n
"
,
*
(
float
*
)
pPropData
);
buf
->
eax
.
reverb_mix
=
*
(
float
*
)
pPropData
;
break
;
default:
return
E_PROP_ID_UNSUPPORTED
;
}
return
S_OK
;
}
return
E_PROP_ID_UNSUPPORTED
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment