Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
f45128c2
Commit
f45128c2
authored
Jul 05, 2007
by
Maarten Lankhorst
Committed by
Alexandre Julliard
Jul 30, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winealsa: Increase performance of wavein getposition.
parent
03d19b57
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
9 deletions
+3
-9
wavein.c
dlls/winealsa.drv/wavein.c
+3
-9
No files found.
dlls/winealsa.drv/wavein.c
View file @
f45128c2
...
...
@@ -154,7 +154,7 @@ static DWORD CALLBACK widRecorder(LPVOID pmt)
DWORD
frames_per_period
;
wwi
->
state
=
WINE_WS_STOPPED
;
wwi
->
dwTotalRecorded
=
0
;
InterlockedExchange
((
LONG
*
)
&
wwi
->
dwTotalRecorded
,
0
)
;
wwi
->
lpQueuePtr
=
NULL
;
SetEvent
(
wwi
->
hStartUpEvent
);
...
...
@@ -198,7 +198,7 @@ static DWORD CALLBACK widRecorder(LPVOID pmt)
{
/* update number of bytes recorded in current buffer and by this device */
lpWaveHdr
->
dwBytesRecorded
+=
bytesRead
;
wwi
->
dwTotalRecorded
+=
bytesRead
;
InterlockedExchangeAdd
((
LONG
*
)
&
wwi
->
dwTotalRecorded
,
bytesRead
)
;
/* buffer is full. notify client */
if
(
lpWaveHdr
->
dwBytesRecorded
==
lpWaveHdr
->
dwBufferLength
)
...
...
@@ -247,7 +247,7 @@ static DWORD CALLBACK widRecorder(LPVOID pmt)
/* update number of bytes recorded in current buffer and by this device */
lpWaveHdr
->
dwBytesRecorded
+=
dwToCopy
;
wwi
->
dwTotalRecorded
+=
dwToCopy
;
InterlockedExchangeAdd
((
LONG
*
)
&
wwi
->
dwTotalRecorded
,
dwToCopy
)
;
bytesRead
-=
dwToCopy
;
pOffset
+=
dwToCopy
;
...
...
@@ -385,10 +385,6 @@ static DWORD CALLBACK widRecorder(LPVOID pmt)
HeapFree
(
GetProcessHeap
(),
0
,
buffer
);
ExitThread
(
0
);
/* shouldn't go here */
case
WINE_WM_UPDATE
:
SetEvent
(
ev
);
break
;
default:
FIXME
(
"unknown message %d
\n
"
,
msg
);
break
;
...
...
@@ -784,8 +780,6 @@ static DWORD widGetPosition(WORD wDevID, LPMMTIME lpTime, DWORD uSize)
}
wwi
=
&
WInDev
[
wDevID
];
ALSA_AddRingMessage
(
&
wwi
->
msgRing
,
WINE_WM_UPDATE
,
0
,
TRUE
);
return
ALSA_bytes_to_mmtime
(
lpTime
,
wwi
->
dwTotalRecorded
,
&
wwi
->
format
);
}
...
...
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