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
aef4a77d
Commit
aef4a77d
authored
Jan 27, 2006
by
Eric Pouech
Committed by
Alexandre Julliard
Jan 27, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wineoss: Proper support in OSS driver for audio when no mixer is present.
Fixed a couple of potential fd leaks.
parent
df5bd5f8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
8 deletions
+5
-8
audio.c
dlls/winmm/wineoss/audio.c
+5
-8
No files found.
dlls/winmm/wineoss/audio.c
View file @
aef4a77d
...
@@ -740,9 +740,7 @@ static BOOL OSS_WaveOutInit(OSS_DEVICE* ossdev)
...
@@ -740,9 +740,7 @@ static BOOL OSS_WaveOutInit(OSS_DEVICE* ossdev)
}
}
close
(
mixer
);
close
(
mixer
);
}
else
{
}
else
{
ERR
(
"open(%s) failed (%s)
\n
"
,
ossdev
->
mixer_name
,
strerror
(
errno
));
WARN
(
"open(%s) failed (%s)
\n
"
,
ossdev
->
mixer_name
,
strerror
(
errno
));
OSS_CloseDevice
(
ossdev
);
return
FALSE
;
}
}
}
}
#endif
/* SOUND_MIXER_INFO */
#endif
/* SOUND_MIXER_INFO */
...
@@ -892,9 +890,7 @@ static BOOL OSS_WaveInInit(OSS_DEVICE* ossdev)
...
@@ -892,9 +890,7 @@ static BOOL OSS_WaveInInit(OSS_DEVICE* ossdev)
}
}
close
(
mixer
);
close
(
mixer
);
}
else
{
}
else
{
ERR
(
"open(%s) failed (%s)
\n
"
,
ossdev
->
mixer_name
,
strerror
(
errno
));
WARN
(
"open(%s) failed (%s)
\n
"
,
ossdev
->
mixer_name
,
strerror
(
errno
));
OSS_CloseDevice
(
ossdev
);
return
FALSE
;
}
}
}
}
#endif
/* SOUND_MIXER_INFO */
#endif
/* SOUND_MIXER_INFO */
...
@@ -2254,6 +2250,7 @@ static DWORD wodGetVolume(WORD wDevID, LPDWORD lpdwVol)
...
@@ -2254,6 +2250,7 @@ static DWORD wodGetVolume(WORD wDevID, LPDWORD lpdwVol)
return
MMSYSERR_NOTENABLED
;
return
MMSYSERR_NOTENABLED
;
}
}
if
(
ioctl
(
mixer
,
SOUND_MIXER_READ_PCM
,
&
volume
)
==
-
1
)
{
if
(
ioctl
(
mixer
,
SOUND_MIXER_READ_PCM
,
&
volume
)
==
-
1
)
{
close
(
mixer
);
WARN
(
"ioctl(%s, SOUND_MIXER_READ_PCM) failed (%s)
\n
"
,
WARN
(
"ioctl(%s, SOUND_MIXER_READ_PCM) failed (%s)
\n
"
,
WOutDev
[
wDevID
].
ossdev
->
mixer_name
,
strerror
(
errno
));
WOutDev
[
wDevID
].
ossdev
->
mixer_name
,
strerror
(
errno
));
return
MMSYSERR_NOTENABLED
;
return
MMSYSERR_NOTENABLED
;
...
@@ -2297,12 +2294,12 @@ DWORD wodSetVolume(WORD wDevID, DWORD dwParam)
...
@@ -2297,12 +2294,12 @@ DWORD wodSetVolume(WORD wDevID, DWORD dwParam)
return
MMSYSERR_NOTENABLED
;
return
MMSYSERR_NOTENABLED
;
}
}
if
(
ioctl
(
mixer
,
SOUND_MIXER_WRITE_PCM
,
&
volume
)
==
-
1
)
{
if
(
ioctl
(
mixer
,
SOUND_MIXER_WRITE_PCM
,
&
volume
)
==
-
1
)
{
close
(
mixer
);
WARN
(
"ioctl(%s, SOUND_MIXER_WRITE_PCM) failed (%s)
\n
"
,
WARN
(
"ioctl(%s, SOUND_MIXER_WRITE_PCM) failed (%s)
\n
"
,
WOutDev
[
wDevID
].
ossdev
->
mixer_name
,
strerror
(
errno
));
WOutDev
[
wDevID
].
ossdev
->
mixer_name
,
strerror
(
errno
));
return
MMSYSERR_NOTENABLED
;
return
MMSYSERR_NOTENABLED
;
}
else
{
TRACE
(
"volume=%04x
\n
"
,
(
unsigned
)
volume
);
}
}
TRACE
(
"volume=%04x
\n
"
,
(
unsigned
)
volume
);
close
(
mixer
);
close
(
mixer
);
/* save requested volume */
/* save requested volume */
...
...
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