Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
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
Иван Мажукин
mpd
Commits
c37567a1
Commit
c37567a1
authored
Mar 12, 2009
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
audio: converted device number check to assertion
No caller must ever pass an invalid device number to mixer_control_setvol() or mixer_control_getvol().
parent
e9cbb6be
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
mixer_control.c
src/mixer_control.c
+4
-4
No files found.
src/mixer_control.c
View file @
c37567a1
...
...
@@ -22,14 +22,15 @@
#include "output_plugin.h"
#include "output_internal.h"
#include <assert.h>
bool
mixer_control_setvol
(
unsigned
int
device
,
int
volume
,
int
rel
)
{
struct
audio_output
*
output
;
struct
mixer
*
mixer
;
if
(
device
>=
audio_output_count
())
return
false
;
assert
(
device
<
audio_output_count
());
output
=
audio_output_get
(
device
);
mixer
=
ao_plugin_get_mixer
(
output
->
plugin
,
output
->
data
);
...
...
@@ -57,8 +58,7 @@ mixer_control_getvol(unsigned int device, int *volume)
struct
audio_output
*
output
;
struct
mixer
*
mixer
;
if
(
device
>=
audio_output_count
())
return
false
;
assert
(
device
<
audio_output_count
());
output
=
audio_output_get
(
device
);
mixer
=
ao_plugin_get_mixer
(
output
->
plugin
,
output
->
data
);
...
...
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