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
985df9cd
Commit
985df9cd
authored
Sep 05, 2007
by
Maarten Lankhorst
Committed by
Alexandre Julliard
Sep 10, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winealsa: Remove forceformat and 2 orphan LeaveCriticalSection.
parent
5eabdff6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
12 deletions
+1
-12
dsoutput.c
dlls/winealsa.drv/dsoutput.c
+1
-12
No files found.
dlls/winealsa.drv/dsoutput.c
View file @
985df9cd
...
...
@@ -73,7 +73,6 @@ struct IDsDriverImpl
/* IDsDriverImpl fields */
IDsDriverBufferImpl
*
primary
;
UINT
wDevID
;
DWORD
forceformat
;
};
struct
IDsDriverBufferImpl
...
...
@@ -396,8 +395,6 @@ static HRESULT SetFormat(IDsDriverBufferImpl *This, LPWAVEFORMATEX pwfx)
{
if
(
errno
!=
EBUSY
||
!
This
->
pcm
)
{
/* **** */
LeaveCriticalSection
(
&
This
->
pcm_crst
);
WARN
(
"Cannot open sound device: %s
\n
"
,
snd_strerror
(
err
));
return
DSERR_GENERIC
;
}
...
...
@@ -407,8 +404,6 @@ static HRESULT SetFormat(IDsDriverBufferImpl *This, LPWAVEFORMATEX pwfx)
err
=
snd_pcm_open
(
&
pcm
,
WOutDev
[
This
->
drv
->
wDevID
].
pcmname
,
SND_PCM_STREAM_PLAYBACK
,
SND_PCM_NONBLOCK
);
if
(
err
<
0
)
{
/* **** */
LeaveCriticalSection
(
&
This
->
pcm_crst
);
WARN
(
"Cannot open sound device: %s
\n
"
,
snd_strerror
(
err
));
return
DSERR_BUFFERLOST
;
}
...
...
@@ -433,12 +428,7 @@ static HRESULT SetFormat(IDsDriverBufferImpl *This, LPWAVEFORMATEX pwfx)
err
=
snd_pcm_hw_params_set_rate_near
(
pcm
,
hw_params
,
&
rate
,
NULL
);
if
(
err
<
0
)
{
rate
=
pwfx
->
nSamplesPerSec
;
WARN
(
"Could not set rate
\n
"
);
goto
err
;
}
if
(
!
ALSA_NearMatch
(
rate
,
pwfx
->
nSamplesPerSec
)
&&
(
This
->
drv
->
forceformat
++
))
{
WARN
(
"Could not set exact rate %d, instead %d, bombing out
\n
"
,
pwfx
->
nSamplesPerSec
,
rate
);
goto
err
;
}
else
if
(
!
ALSA_NearMatch
(
rate
,
pwfx
->
nSamplesPerSec
))
if
(
!
ALSA_NearMatch
(
rate
,
pwfx
->
nSamplesPerSec
))
{
WARN
(
"Could not set sound rate to %d, but instead to %d
\n
"
,
pwfx
->
nSamplesPerSec
,
rate
);
pwfx
->
nSamplesPerSec
=
rate
;
...
...
@@ -496,7 +486,6 @@ static HRESULT WINAPI IDsDriverBufferImpl_SetFormat(PIDSDRIVERBUFFER iface, LPWA
/* **** */
EnterCriticalSection
(
&
This
->
pcm_crst
);
This
->
drv
->
forceformat
=
FALSE
;
hr
=
SetFormat
(
This
,
pwfx
);
/* **** */
LeaveCriticalSection
(
&
This
->
pcm_crst
);
...
...
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