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
1a23836f
Commit
1a23836f
authored
Jun 25, 2007
by
Alex Villacís Lasso
Committed by
Alexandre Julliard
Jun 26, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dsound: Reset device playpos/mixpos on buflen change.
parent
f2626bab
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
primary.c
dlls/dsound/primary.c
+10
-0
No files found.
dlls/dsound/primary.c
View file @
1a23836f
...
...
@@ -100,6 +100,8 @@ static HRESULT DSOUND_PrimaryOpen(DirectSoundDevice *device)
merr
=
DSERR_OUTOFMEMORY
;
/* but the old buffer might still exist and must be re-prepared */
}
else
{
device
->
playpos
=
0
;
device
->
mixpos
=
0
;
device
->
buffer
=
newbuf
;
device
->
buflen
=
buflen
;
}
...
...
@@ -139,6 +141,8 @@ static HRESULT DSOUND_PrimaryOpen(DirectSoundDevice *device)
if
((
err
==
DS_OK
)
&&
(
merr
!=
DS_OK
))
err
=
merr
;
}
else
if
(
!
device
->
hwbuf
)
{
device
->
playpos
=
0
;
device
->
mixpos
=
0
;
err
=
IDsDriver_CreateSoundBuffer
(
device
->
driver
,
device
->
pwfx
,
DSBCAPS_PRIMARYBUFFER
,
0
,
&
(
device
->
buflen
),
&
(
device
->
buffer
),
...
...
@@ -190,6 +194,8 @@ HRESULT DSOUND_PrimaryCreate(DirectSoundDevice *device)
HRESULT
err
=
DS_OK
;
TRACE
(
"(%p)
\n
"
,
device
);
device
->
playpos
=
0
;
device
->
mixpos
=
0
;
device
->
buflen
=
device
->
pwfx
->
nAvgBytesPerSec
;
/* FIXME: verify that hardware capabilities (DSCAPS_PRIMARY flags) match */
...
...
@@ -299,6 +305,8 @@ HRESULT DSOUND_PrimaryStop(DirectSoundDevice *device)
device
->
pwfx
,
(
DWORD_PTR
)
DSOUND_callback
,
(
DWORD
)
device
,
flags
));
if
(
err
==
DS_OK
)
{
device
->
playpos
=
0
;
device
->
mixpos
=
0
;
err
=
IDsDriver_CreateSoundBuffer
(
device
->
driver
,
device
->
pwfx
,
DSBCAPS_PRIMARYBUFFER
,
0
,
&
(
device
->
buflen
),
&
(
device
->
buffer
),
...
...
@@ -425,6 +433,8 @@ HRESULT DSOUND_PrimarySetFormat(DirectSoundDevice *device, LPCWAVEFORMATEX wfex)
if
(
err
==
DSERR_BUFFERLOST
)
{
/* Wine-only: the driver wants us to recreate the HW buffer */
IDsDriverBuffer_Release
(
device
->
hwbuf
);
device
->
playpos
=
0
;
device
->
mixpos
=
0
;
err
=
IDsDriver_CreateSoundBuffer
(
device
->
driver
,
device
->
pwfx
,
DSBCAPS_PRIMARYBUFFER
,
0
,
&
(
device
->
buflen
),
&
(
device
->
buffer
),
...
...
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