Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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
wine
wine-winehq
Commits
3747fb74
Commit
3747fb74
authored
Aug 31, 2011
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Aug 31, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dsound: Move the primary buffer description into the buffer object.
parent
c0565143
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
19 deletions
+17
-19
dsound.c
dlls/dsound/dsound.c
+10
-10
dsound_private.h
dlls/dsound/dsound_private.h
+0
-1
primary.c
dlls/dsound/primary.c
+7
-8
No files found.
dlls/dsound/dsound.c
View file @
3747fb74
...
@@ -1552,16 +1552,16 @@ HRESULT DirectSoundDevice_CreateSoundBuffer(
...
@@ -1552,16 +1552,16 @@ HRESULT DirectSoundDevice_CreateSoundBuffer(
IDirectSoundBuffer_AddRef
((
LPDIRECTSOUNDBUFFER8
)(
device
->
primary
));
IDirectSoundBuffer_AddRef
((
LPDIRECTSOUNDBUFFER8
)(
device
->
primary
));
*
ppdsb
=
(
LPDIRECTSOUNDBUFFER
)(
device
->
primary
);
*
ppdsb
=
(
LPDIRECTSOUNDBUFFER
)(
device
->
primary
);
}
else
{
}
else
{
device
->
dsbd
=
*
dsbd
;
hres
=
primarybuffer_create
(
device
,
&
device
->
primary
,
dsbd
)
;
device
->
dsbd
.
dwFlags
&=
~
(
DSBCAPS_LOCHARDWARE
|
DSBCAPS_LOCSOFTWARE
);
if
(
device
->
primary
)
{
if
(
device
->
hwbuf
)
*
ppdsb
=
(
IDirectSoundBuffer
*
)
&
device
->
primary
->
IDirectSoundBuffer8_iface
;
device
->
dsbd
.
dwFlags
|=
DSBCAPS_LOCHARDWARE
;
device
->
primary
->
dsbd
.
dwFlags
&=
~
(
DSBCAPS_LOCHARDWARE
|
DSBCAPS_LOCSOFTWARE
)
;
else
device
->
dsbd
.
dwFlags
|=
DSBCAPS_LOCSOFTWARE
;
if
(
device
->
hwbuf
)
hres
=
primarybuffer_create
(
device
,
&
(
device
->
primary
),
&
(
device
->
dsbd
))
;
device
->
primary
->
dsbd
.
dwFlags
|=
DSBCAPS_LOCHARDWARE
;
if
(
device
->
primary
)
else
*
ppdsb
=
(
IDirectSoundBuffer
*
)
&
device
->
primary
->
IDirectSoundBuffer8_iface
;
device
->
primary
->
dsbd
.
dwFlags
|=
DSBCAPS_LOCSOFTWARE
;
else
}
else
WARN
(
"primarybuffer_create() failed
\n
"
);
WARN
(
"primarybuffer_create() failed
\n
"
);
}
}
}
else
{
}
else
{
IDirectSoundBufferImpl
*
dsb
;
IDirectSoundBufferImpl
*
dsb
;
...
...
dlls/dsound/dsound_private.h
View file @
3747fb74
...
@@ -93,7 +93,6 @@ struct DirectSoundDevice
...
@@ -93,7 +93,6 @@ struct DirectSoundDevice
RTL_RWLOCK
buffer_list_lock
;
RTL_RWLOCK
buffer_list_lock
;
CRITICAL_SECTION
mixlock
;
CRITICAL_SECTION
mixlock
;
IDirectSoundBufferImpl
*
primary
;
IDirectSoundBufferImpl
*
primary
;
DSBUFFERDESC
dsbd
;
DWORD
speaker_config
;
DWORD
speaker_config
;
LPBYTE
tmp_buffer
,
mix_buffer
;
LPBYTE
tmp_buffer
,
mix_buffer
;
DWORD
tmp_buffer_len
,
mix_buffer_len
;
DWORD
tmp_buffer_len
,
mix_buffer_len
;
...
...
dlls/dsound/primary.c
View file @
3747fb74
...
@@ -642,7 +642,7 @@ static HRESULT WINAPI PrimaryBufferImpl_SetVolume(
...
@@ -642,7 +642,7 @@ static HRESULT WINAPI PrimaryBufferImpl_SetVolume(
HRESULT
hres
=
DS_OK
;
HRESULT
hres
=
DS_OK
;
TRACE
(
"(%p,%d)
\n
"
,
iface
,
vol
);
TRACE
(
"(%p,%d)
\n
"
,
iface
,
vol
);
if
(
!
(
device
->
dsbd
.
dwFlags
&
DSBCAPS_CTRLVOLUME
))
{
if
(
!
(
This
->
dsbd
.
dwFlags
&
DSBCAPS_CTRLVOLUME
))
{
WARN
(
"control unavailable
\n
"
);
WARN
(
"control unavailable
\n
"
);
return
DSERR_CONTROLUNAVAIL
;
return
DSERR_CONTROLUNAVAIL
;
}
}
...
@@ -686,7 +686,7 @@ static HRESULT WINAPI PrimaryBufferImpl_GetVolume(
...
@@ -686,7 +686,7 @@ static HRESULT WINAPI PrimaryBufferImpl_GetVolume(
DWORD
ampfactors
;
DWORD
ampfactors
;
TRACE
(
"(%p,%p)
\n
"
,
iface
,
vol
);
TRACE
(
"(%p,%p)
\n
"
,
iface
,
vol
);
if
(
!
(
device
->
dsbd
.
dwFlags
&
DSBCAPS_CTRLVOLUME
))
{
if
(
!
(
This
->
dsbd
.
dwFlags
&
DSBCAPS_CTRLVOLUME
))
{
WARN
(
"control unavailable
\n
"
);
WARN
(
"control unavailable
\n
"
);
return
DSERR_CONTROLUNAVAIL
;
return
DSERR_CONTROLUNAVAIL
;
}
}
...
@@ -985,7 +985,7 @@ static HRESULT WINAPI PrimaryBufferImpl_SetPan(
...
@@ -985,7 +985,7 @@ static HRESULT WINAPI PrimaryBufferImpl_SetPan(
HRESULT
hres
=
DS_OK
;
HRESULT
hres
=
DS_OK
;
TRACE
(
"(%p,%d)
\n
"
,
iface
,
pan
);
TRACE
(
"(%p,%d)
\n
"
,
iface
,
pan
);
if
(
!
(
device
->
dsbd
.
dwFlags
&
DSBCAPS_CTRLPAN
))
{
if
(
!
(
This
->
dsbd
.
dwFlags
&
DSBCAPS_CTRLPAN
))
{
WARN
(
"control unavailable
\n
"
);
WARN
(
"control unavailable
\n
"
);
return
DSERR_CONTROLUNAVAIL
;
return
DSERR_CONTROLUNAVAIL
;
}
}
...
@@ -1032,7 +1032,7 @@ static HRESULT WINAPI PrimaryBufferImpl_GetPan(
...
@@ -1032,7 +1032,7 @@ static HRESULT WINAPI PrimaryBufferImpl_GetPan(
DWORD
ampfactors
;
DWORD
ampfactors
;
TRACE
(
"(%p,%p)
\n
"
,
iface
,
pan
);
TRACE
(
"(%p,%p)
\n
"
,
iface
,
pan
);
if
(
!
(
device
->
dsbd
.
dwFlags
&
DSBCAPS_CTRLPAN
))
{
if
(
!
(
This
->
dsbd
.
dwFlags
&
DSBCAPS_CTRLPAN
))
{
WARN
(
"control unavailable
\n
"
);
WARN
(
"control unavailable
\n
"
);
return
DSERR_CONTROLUNAVAIL
;
return
DSERR_CONTROLUNAVAIL
;
}
}
...
@@ -1102,7 +1102,7 @@ static HRESULT WINAPI PrimaryBufferImpl_GetFrequency(
...
@@ -1102,7 +1102,7 @@ static HRESULT WINAPI PrimaryBufferImpl_GetFrequency(
return
DSERR_INVALIDPARAM
;
return
DSERR_INVALIDPARAM
;
}
}
if
(
!
(
device
->
dsbd
.
dwFlags
&
DSBCAPS_CTRLFREQUENCY
))
{
if
(
!
(
This
->
dsbd
.
dwFlags
&
DSBCAPS_CTRLFREQUENCY
))
{
WARN
(
"control unavailable
\n
"
);
WARN
(
"control unavailable
\n
"
);
return
DSERR_CONTROLUNAVAIL
;
return
DSERR_CONTROLUNAVAIL
;
}
}
...
@@ -1138,7 +1138,7 @@ static HRESULT WINAPI PrimaryBufferImpl_GetCaps(
...
@@ -1138,7 +1138,7 @@ static HRESULT WINAPI PrimaryBufferImpl_GetCaps(
return
DSERR_INVALIDPARAM
;
return
DSERR_INVALIDPARAM
;
}
}
caps
->
dwFlags
=
device
->
dsbd
.
dwFlags
;
caps
->
dwFlags
=
This
->
dsbd
.
dwFlags
;
caps
->
dwBufferBytes
=
device
->
buflen
;
caps
->
dwBufferBytes
=
device
->
buflen
;
/* Windows reports these as zero */
/* Windows reports these as zero */
...
@@ -1258,8 +1258,7 @@ HRESULT primarybuffer_create(DirectSoundDevice *device, IDirectSoundBufferImpl *
...
@@ -1258,8 +1258,7 @@ HRESULT primarybuffer_create(DirectSoundDevice *device, IDirectSoundBufferImpl *
dsb
->
numIfaces
=
1
;
dsb
->
numIfaces
=
1
;
dsb
->
device
=
device
;
dsb
->
device
=
device
;
dsb
->
IDirectSoundBuffer8_iface
.
lpVtbl
=
(
IDirectSoundBuffer8Vtbl
*
)
&
dspbvt
;
dsb
->
IDirectSoundBuffer8_iface
.
lpVtbl
=
(
IDirectSoundBuffer8Vtbl
*
)
&
dspbvt
;
dsb
->
dsbd
=
*
dsbd
;
device
->
dsbd
=
*
dsbd
;
TRACE
(
"Created primary buffer at %p
\n
"
,
dsb
);
TRACE
(
"Created primary buffer at %p
\n
"
,
dsb
);
TRACE
(
"(formattag=0x%04x,chans=%d,samplerate=%d,"
TRACE
(
"(formattag=0x%04x,chans=%d,samplerate=%d,"
...
...
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