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
8ed553c3
Commit
8ed553c3
authored
Nov 03, 2015
by
Andrew Eikum
Committed by
Alexandre Julliard
Nov 04, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winepulse: Always mute buffer.
Signed-off-by:
Andrew Eikum
<
aeikum@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
0d7cee0d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
10 deletions
+14
-10
mmdevdrv.c
dlls/winepulse.drv/mmdevdrv.c
+14
-10
No files found.
dlls/winepulse.drv/mmdevdrv.c
View file @
8ed553c3
...
...
@@ -572,6 +572,11 @@ static HRESULT pulse_stream_valid(ACImpl *This) {
return
S_OK
;
}
static
void
silence_buffer
(
pa_sample_format_t
format
,
BYTE
*
buffer
,
UINT32
bytes
)
{
memset
(
buffer
,
format
==
PA_SAMPLE_U8
?
0x80
:
0
,
bytes
);
}
static
void
dump_attr
(
const
pa_buffer_attr
*
attr
)
{
TRACE
(
"maxlength: %u
\n
"
,
attr
->
maxlength
);
TRACE
(
"minreq: %u
\n
"
,
attr
->
minreq
);
...
...
@@ -1315,7 +1320,7 @@ static HRESULT WINAPI AudioClient_Initialize(IAudioClient *iface,
else
{
ACPacket
*
cur_packet
=
(
ACPacket
*
)((
char
*
)
This
->
tmp_buffer
+
This
->
bufsize_bytes
);
BYTE
*
data
=
This
->
tmp_buffer
;
memset
(
This
->
tmp_buffer
,
This
->
ss
.
format
==
PA_SAMPLE_U8
?
0x80
:
0
,
This
->
bufsize_bytes
);
silence_buffer
(
This
->
ss
.
format
,
This
->
tmp_buffer
,
This
->
bufsize_bytes
);
list_init
(
&
This
->
packet_free_head
);
list_init
(
&
This
->
packet_filled_head
);
for
(
i
=
0
;
i
<
capture_packets
;
++
i
,
++
cur_packet
)
{
...
...
@@ -1985,18 +1990,17 @@ static HRESULT WINAPI AudioRenderClient_ReleaseBuffer(
return
AUDCLNT_E_INVALID_SIZE
;
}
if
(
flags
&
AUDCLNT_BUFFERFLAGS_SILENT
)
{
if
(
This
->
ss
.
format
==
PA_SAMPLE_U8
)
memset
(
This
->
tmp_buffer
,
128
,
written_bytes
);
else
memset
(
This
->
tmp_buffer
,
0
,
written_bytes
);
}
This
->
locked
=
0
;
if
(
This
->
locked_ptr
)
if
(
This
->
locked_ptr
)
{
if
(
flags
&
AUDCLNT_BUFFERFLAGS_SILENT
)
silence_buffer
(
This
->
ss
.
format
,
This
->
locked_ptr
,
written_bytes
);
pa_stream_write
(
This
->
stream
,
This
->
locked_ptr
,
written_bytes
,
NULL
,
0
,
PA_SEEK_RELATIVE
);
else
}
else
{
if
(
flags
&
AUDCLNT_BUFFERFLAGS_SILENT
)
silence_buffer
(
This
->
ss
.
format
,
This
->
tmp_buffer
,
written_bytes
);
pa_stream_write
(
This
->
stream
,
This
->
tmp_buffer
,
written_bytes
,
pulse_free_noop
,
0
,
PA_SEEK_RELATIVE
);
}
This
->
pad
+=
written_bytes
;
This
->
locked_ptr
=
NULL
;
TRACE
(
"Released %u, pad %zu
\n
"
,
written_frames
,
This
->
pad
/
pa_frame_size
(
&
This
->
ss
));
...
...
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