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
11805e0a
Commit
11805e0a
authored
Oct 19, 2000
by
Francois Jacques
Committed by
Alexandre Julliard
Oct 19, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Should test unixdev against -1 (see wodOpen/widOpen).
widRecorder: bytesRead is now tested against (DWORD) -1.
parent
49851f88
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
audio.c
dlls/winmm/wineoss/audio.c
+13
-13
No files found.
dlls/winmm/wineoss/audio.c
View file @
11805e0a
...
@@ -806,7 +806,7 @@ static DWORD wodClose(WORD wDevID)
...
@@ -806,7 +806,7 @@ static DWORD wodClose(WORD wDevID)
TRACE
(
"(%u);
\n
"
,
wDevID
);
TRACE
(
"(%u);
\n
"
,
wDevID
);
if
(
wDevID
>=
MAX_WAVEOUTDRV
||
WOutDev
[
wDevID
].
unixdev
==
0
)
{
if
(
wDevID
>=
MAX_WAVEOUTDRV
||
WOutDev
[
wDevID
].
unixdev
==
-
1
)
{
WARN
(
"bad device ID !
\n
"
);
WARN
(
"bad device ID !
\n
"
);
return
MMSYSERR_BADDEVICEID
;
return
MMSYSERR_BADDEVICEID
;
}
}
...
@@ -847,7 +847,7 @@ static DWORD wodWrite(WORD wDevID, LPWAVEHDR lpWaveHdr, DWORD dwSize)
...
@@ -847,7 +847,7 @@ static DWORD wodWrite(WORD wDevID, LPWAVEHDR lpWaveHdr, DWORD dwSize)
TRACE
(
"(%u, %p, %08lX);
\n
"
,
wDevID
,
lpWaveHdr
,
dwSize
);
TRACE
(
"(%u, %p, %08lX);
\n
"
,
wDevID
,
lpWaveHdr
,
dwSize
);
/* first, do the sanity checks... */
/* first, do the sanity checks... */
if
(
wDevID
>=
MAX_WAVEOUTDRV
||
WOutDev
[
wDevID
].
unixdev
==
0
)
{
if
(
wDevID
>=
MAX_WAVEOUTDRV
||
WOutDev
[
wDevID
].
unixdev
==
-
1
)
{
WARN
(
"bad dev ID !
\n
"
);
WARN
(
"bad dev ID !
\n
"
);
return
MMSYSERR_BADDEVICEID
;
return
MMSYSERR_BADDEVICEID
;
}
}
...
@@ -916,7 +916,7 @@ static DWORD wodPause(WORD wDevID)
...
@@ -916,7 +916,7 @@ static DWORD wodPause(WORD wDevID)
{
{
TRACE
(
"(%u);!
\n
"
,
wDevID
);
TRACE
(
"(%u);!
\n
"
,
wDevID
);
if
(
wDevID
>=
MAX_WAVEOUTDRV
||
WOutDev
[
wDevID
].
unixdev
==
0
)
{
if
(
wDevID
>=
MAX_WAVEOUTDRV
||
WOutDev
[
wDevID
].
unixdev
==
-
1
)
{
WARN
(
"bad device ID !
\n
"
);
WARN
(
"bad device ID !
\n
"
);
return
MMSYSERR_BADDEVICEID
;
return
MMSYSERR_BADDEVICEID
;
}
}
...
@@ -935,7 +935,7 @@ static DWORD wodRestart(WORD wDevID)
...
@@ -935,7 +935,7 @@ static DWORD wodRestart(WORD wDevID)
{
{
TRACE
(
"(%u);
\n
"
,
wDevID
);
TRACE
(
"(%u);
\n
"
,
wDevID
);
if
(
wDevID
>=
MAX_WAVEOUTDRV
||
WOutDev
[
wDevID
].
unixdev
==
0
)
{
if
(
wDevID
>=
MAX_WAVEOUTDRV
||
WOutDev
[
wDevID
].
unixdev
==
-
1
)
{
WARN
(
"bad device ID !
\n
"
);
WARN
(
"bad device ID !
\n
"
);
return
MMSYSERR_BADDEVICEID
;
return
MMSYSERR_BADDEVICEID
;
}
}
...
@@ -964,7 +964,7 @@ static DWORD wodReset(WORD wDevID)
...
@@ -964,7 +964,7 @@ static DWORD wodReset(WORD wDevID)
{
{
TRACE
(
"(%u);
\n
"
,
wDevID
);
TRACE
(
"(%u);
\n
"
,
wDevID
);
if
(
wDevID
>=
MAX_WAVEOUTDRV
||
WOutDev
[
wDevID
].
unixdev
==
0
)
{
if
(
wDevID
>=
MAX_WAVEOUTDRV
||
WOutDev
[
wDevID
].
unixdev
==
-
1
)
{
WARN
(
"bad device ID !
\n
"
);
WARN
(
"bad device ID !
\n
"
);
return
MMSYSERR_BADDEVICEID
;
return
MMSYSERR_BADDEVICEID
;
}
}
...
@@ -988,7 +988,7 @@ static DWORD wodGetPosition(WORD wDevID, LPMMTIME lpTime, DWORD uSize)
...
@@ -988,7 +988,7 @@ static DWORD wodGetPosition(WORD wDevID, LPMMTIME lpTime, DWORD uSize)
TRACE
(
"(%u, %p, %lu);
\n
"
,
wDevID
,
lpTime
,
uSize
);
TRACE
(
"(%u, %p, %lu);
\n
"
,
wDevID
,
lpTime
,
uSize
);
if
(
wDevID
>=
MAX_WAVEOUTDRV
||
WOutDev
[
wDevID
].
unixdev
==
0
)
{
if
(
wDevID
>=
MAX_WAVEOUTDRV
||
WOutDev
[
wDevID
].
unixdev
==
-
1
)
{
WARN
(
"bad device ID !
\n
"
);
WARN
(
"bad device ID !
\n
"
);
return
MMSYSERR_BADDEVICEID
;
return
MMSYSERR_BADDEVICEID
;
}
}
...
@@ -1616,7 +1616,7 @@ static DWORD CALLBACK widRecorder(LPVOID pmt)
...
@@ -1616,7 +1616,7 @@ static DWORD CALLBACK widRecorder(LPVOID pmt)
bytesRead
=
read
(
wwi
->
unixdev
,
lpWaveHdr
->
lpData
+
lpWaveHdr
->
dwBytesRecorded
,
bytesRead
=
read
(
wwi
->
unixdev
,
lpWaveHdr
->
lpData
+
lpWaveHdr
->
dwBytesRecorded
,
lpWaveHdr
->
dwBufferLength
-
lpWaveHdr
->
dwBytesRecorded
);
lpWaveHdr
->
dwBufferLength
-
lpWaveHdr
->
dwBytesRecorded
);
if
(
bytesRead
>
0
)
{
if
(
bytesRead
!=
(
DWORD
)
-
1
)
{
TRACE
(
"Read=%lu (%ld)
\n
"
,
bytesRead
,
lpWaveHdr
->
dwBufferLength
);
TRACE
(
"Read=%lu (%ld)
\n
"
,
bytesRead
,
lpWaveHdr
->
dwBufferLength
);
lpWaveHdr
->
dwBytesRecorded
+=
bytesRead
;
lpWaveHdr
->
dwBytesRecorded
+=
bytesRead
;
wwi
->
dwTotalRecorded
+=
bytesRead
;
wwi
->
dwTotalRecorded
+=
bytesRead
;
...
@@ -1813,7 +1813,7 @@ static DWORD widClose(WORD wDevID)
...
@@ -1813,7 +1813,7 @@ static DWORD widClose(WORD wDevID)
WINE_WAVEIN
*
wwi
;
WINE_WAVEIN
*
wwi
;
TRACE
(
"(%u);
\n
"
,
wDevID
);
TRACE
(
"(%u);
\n
"
,
wDevID
);
if
(
wDevID
>=
MAX_WAVEINDRV
||
WInDev
[
wDevID
].
unixdev
==
0
)
{
if
(
wDevID
>=
MAX_WAVEINDRV
||
WInDev
[
wDevID
].
unixdev
==
-
1
)
{
WARN
(
"can't close !
\n
"
);
WARN
(
"can't close !
\n
"
);
return
MMSYSERR_INVALHANDLE
;
return
MMSYSERR_INVALHANDLE
;
}
}
...
@@ -1845,7 +1845,7 @@ static DWORD widAddBuffer(WORD wDevID, LPWAVEHDR lpWaveHdr, DWORD dwSize)
...
@@ -1845,7 +1845,7 @@ static DWORD widAddBuffer(WORD wDevID, LPWAVEHDR lpWaveHdr, DWORD dwSize)
{
{
TRACE
(
"(%u, %p, %08lX);
\n
"
,
wDevID
,
lpWaveHdr
,
dwSize
);
TRACE
(
"(%u, %p, %08lX);
\n
"
,
wDevID
,
lpWaveHdr
,
dwSize
);
if
(
wDevID
>=
MAX_WAVEINDRV
||
WInDev
[
wDevID
].
unixdev
==
0
)
{
if
(
wDevID
>=
MAX_WAVEINDRV
||
WInDev
[
wDevID
].
unixdev
==
-
1
)
{
WARN
(
"can't do it !
\n
"
);
WARN
(
"can't do it !
\n
"
);
return
MMSYSERR_INVALHANDLE
;
return
MMSYSERR_INVALHANDLE
;
}
}
...
@@ -1907,7 +1907,7 @@ static DWORD widUnprepare(WORD wDevID, LPWAVEHDR lpWaveHdr, DWORD dwSize)
...
@@ -1907,7 +1907,7 @@ static DWORD widUnprepare(WORD wDevID, LPWAVEHDR lpWaveHdr, DWORD dwSize)
static
DWORD
widStart
(
WORD
wDevID
)
static
DWORD
widStart
(
WORD
wDevID
)
{
{
TRACE
(
"(%u);
\n
"
,
wDevID
);
TRACE
(
"(%u);
\n
"
,
wDevID
);
if
(
wDevID
>=
MAX_WAVEINDRV
||
WInDev
[
wDevID
].
unixdev
==
0
)
{
if
(
wDevID
>=
MAX_WAVEINDRV
||
WInDev
[
wDevID
].
unixdev
==
-
1
)
{
WARN
(
"can't start recording !
\n
"
);
WARN
(
"can't start recording !
\n
"
);
return
MMSYSERR_INVALHANDLE
;
return
MMSYSERR_INVALHANDLE
;
}
}
...
@@ -1924,7 +1924,7 @@ static DWORD widStart(WORD wDevID)
...
@@ -1924,7 +1924,7 @@ static DWORD widStart(WORD wDevID)
static
DWORD
widStop
(
WORD
wDevID
)
static
DWORD
widStop
(
WORD
wDevID
)
{
{
TRACE
(
"(%u);
\n
"
,
wDevID
);
TRACE
(
"(%u);
\n
"
,
wDevID
);
if
(
wDevID
>=
MAX_WAVEINDRV
||
WInDev
[
wDevID
].
unixdev
==
0
)
{
if
(
wDevID
>=
MAX_WAVEINDRV
||
WInDev
[
wDevID
].
unixdev
==
-
1
)
{
WARN
(
"can't stop !
\n
"
);
WARN
(
"can't stop !
\n
"
);
return
MMSYSERR_INVALHANDLE
;
return
MMSYSERR_INVALHANDLE
;
}
}
...
@@ -1941,7 +1941,7 @@ static DWORD widStop(WORD wDevID)
...
@@ -1941,7 +1941,7 @@ static DWORD widStop(WORD wDevID)
static
DWORD
widReset
(
WORD
wDevID
)
static
DWORD
widReset
(
WORD
wDevID
)
{
{
TRACE
(
"(%u);
\n
"
,
wDevID
);
TRACE
(
"(%u);
\n
"
,
wDevID
);
if
(
wDevID
>=
MAX_WAVEINDRV
||
WInDev
[
wDevID
].
unixdev
==
0
)
{
if
(
wDevID
>=
MAX_WAVEINDRV
||
WInDev
[
wDevID
].
unixdev
==
-
1
)
{
WARN
(
"can't reset !
\n
"
);
WARN
(
"can't reset !
\n
"
);
return
MMSYSERR_INVALHANDLE
;
return
MMSYSERR_INVALHANDLE
;
}
}
...
@@ -1960,7 +1960,7 @@ static DWORD widGetPosition(WORD wDevID, LPMMTIME lpTime, DWORD uSize)
...
@@ -1960,7 +1960,7 @@ static DWORD widGetPosition(WORD wDevID, LPMMTIME lpTime, DWORD uSize)
TRACE
(
"(%u, %p, %lu);
\n
"
,
wDevID
,
lpTime
,
uSize
);
TRACE
(
"(%u, %p, %lu);
\n
"
,
wDevID
,
lpTime
,
uSize
);
if
(
wDevID
>=
MAX_WAVEINDRV
||
WInDev
[
wDevID
].
unixdev
==
0
)
{
if
(
wDevID
>=
MAX_WAVEINDRV
||
WInDev
[
wDevID
].
unixdev
==
-
1
)
{
WARN
(
"can't get pos !
\n
"
);
WARN
(
"can't get pos !
\n
"
);
return
MMSYSERR_INVALHANDLE
;
return
MMSYSERR_INVALHANDLE
;
}
}
...
...
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