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
639db3ef
Commit
639db3ef
authored
May 11, 2003
by
Eric Pouech
Committed by
Alexandre Julliard
May 11, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Stop wavemap lookup if a device isn't functional (spotted by Lionel
Ulmer).
parent
cadffabd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
7 deletions
+22
-7
wavemap.c
dlls/winmm/wavemap/wavemap.c
+16
-4
audio.c
dlls/winmm/wineoss/audio.c
+6
-3
No files found.
dlls/winmm/wavemap/wavemap.c
View file @
639db3ef
...
...
@@ -185,8 +185,11 @@ static DWORD wodOpen(LPDWORD lpdwUser, LPWAVEOPENDESC lpDesc, DWORD dwFlags)
/* try some ACM stuff */
#define TRY(sps,bps) wfx.nSamplesPerSec = (sps); wfx.wBitsPerSample = (bps); \
if (wodOpenHelper(wom, i, lpDesc, &wfx, dwFlags | WAVE_FORMAT_DIRECT) == MMSYSERR_NOERROR) \
{wom->avgSpeedInner = wfx.nAvgBytesPerSec; goto found;}
switch (wodOpenHelper(wom, i, lpDesc, &wfx, dwFlags | WAVE_FORMAT_DIRECT)) { \
case MMSYSERR_NOERROR: wom->avgSpeedInner = wfx.nAvgBytesPerSec; goto found; \
case WAVERR_BADFORMAT: break; \
default: goto error; \
}
/* Our resampling algorithm is quite primitive so first try
* to just change the bit depth and number of channels
...
...
@@ -248,6 +251,9 @@ found:
*
lpdwUser
=
(
DWORD
)
wom
;
}
return
MMSYSERR_NOERROR
;
error:
HeapFree
(
GetProcessHeap
(),
0
,
wom
);
return
MMSYSERR_ERROR
;
}
static
DWORD
wodClose
(
WAVEMAPDATA
*
wom
)
...
...
@@ -627,8 +633,11 @@ static DWORD widOpen(LPDWORD lpdwUser, LPWAVEOPENDESC lpDesc, DWORD dwFlags)
/* try some ACM stuff */
#define TRY(sps,bps) wfx.nSamplesPerSec = (sps); wfx.wBitsPerSample = (bps); \
if (widOpenHelper(wim, i, lpDesc, &wfx, dwFlags | WAVE_FORMAT_DIRECT) == MMSYSERR_NOERROR) \
{wim->avgSpeedInner = wfx.nAvgBytesPerSec; goto found;}
switch (widOpenHelper(wim, i, lpDesc, &wfx, dwFlags | WAVE_FORMAT_DIRECT)) { \
case MMSYSERR_NOERROR: wim->avgSpeedInner = wfx.nAvgBytesPerSec; goto found; \
case WAVERR_BADFORMAT: break; \
default: goto error; \
}
for
(
i
=
ndlo
;
i
<
ndhi
;
i
++
)
{
wfx
.
nSamplesPerSec
=
lpDesc
->
lpFormat
->
nSamplesPerSec
;
...
...
@@ -689,6 +698,9 @@ found:
}
TRACE
(
"Ok (stream=%08lx)
\n
"
,
(
DWORD
)
wim
->
hAcmStream
);
return
MMSYSERR_NOERROR
;
error:
HeapFree
(
GetProcessHeap
(),
0
,
wim
);
return
MMSYSERR_ERROR
;
}
static
DWORD
widClose
(
WAVEMAPDATA
*
wim
)
...
...
dlls/winmm/wineoss/audio.c
View file @
639db3ef
...
...
@@ -284,7 +284,7 @@ static DWORD OSS_RawOpenDevice(OSS_DEVICE* ossdev, int strict_format)
*/
if
(
rc
!=
0
&&
errno
!=
EINVAL
)
{
ERR
(
"ioctl(%s, SNDCTL_DSP_SETDUPLEX) failed (%s)
\n
"
,
ossdev
->
dev_name
,
strerror
(
errno
));
goto
error
;
goto
error
2
;
}
}
...
...
@@ -292,7 +292,7 @@ static DWORD OSS_RawOpenDevice(OSS_DEVICE* ossdev, int strict_format)
rc
=
ioctl
(
fd
,
SNDCTL_DSP_SETFRAGMENT
,
&
ossdev
->
audio_fragment
);
if
(
rc
!=
0
)
{
ERR
(
"ioctl(%s, SNDCTL_DSP_SETFRAGMENT) failed (%s)
\n
"
,
ossdev
->
dev_name
,
strerror
(
errno
));
goto
error
;
goto
error
2
;
}
}
...
...
@@ -350,6 +350,9 @@ static DWORD OSS_RawOpenDevice(OSS_DEVICE* ossdev, int strict_format)
error:
close
(
fd
);
return
WAVERR_BADFORMAT
;
error2:
close
(
fd
);
return
MMSYSERR_ERROR
;
}
/******************************************************************
...
...
@@ -1455,7 +1458,7 @@ static DWORD wodOpen(WORD wDevID, LPWAVEOPENDESC lpDesc, DWORD dwFlags)
audio_buf_info
info
;
DWORD
ret
;
TRACE
(
"(%u, %p
, %08lX);
\n
"
,
wDevID
,
lpDesc
,
dwFlags
);
TRACE
(
"(%u, %p
[cb=%08lx], %08lX);
\n
"
,
wDevID
,
lpDesc
,
lpDesc
->
dwCallback
,
dwFlags
);
if
(
lpDesc
==
NULL
)
{
WARN
(
"Invalid Parameter !
\n
"
);
return
MMSYSERR_INVALPARAM
;
...
...
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