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
e1f58fdc
You need to sign in or sign up before continuing.
Commit
e1f58fdc
authored
Feb 26, 2009
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oss: use unsigned integers
Convert the num_supported and num_unsupported variables from signed to unsigned.
parent
4958a6f5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
14 deletions
+9
-14
oss_plugin.c
src/output/oss_plugin.c
+9
-14
No files found.
src/output/oss_plugin.c
View file @
e1f58fdc
...
...
@@ -52,9 +52,9 @@ struct oss_data {
struct
audio_format
audio_format
;
int
bitFormat
;
int
*
supported
[
3
];
int
num_supported
[
3
];
unsigned
num_supported
[
3
];
int
*
unsupported
[
3
];
int
num_unsupported
[
3
];
unsigned
num_unsupported
[
3
];
/** the mixer object associated with this output */
struct
mixer
*
mixer
;
...
...
@@ -95,10 +95,9 @@ oss_param_from_ioctl(unsigned param)
static
int
oss_find_supported_param
(
struct
oss_data
*
od
,
unsigned
param
,
int
val
)
{
int
i
;
enum
oss_param
idx
=
oss_param_from_ioctl
(
param
);
for
(
i
=
0
;
i
<
od
->
num_supported
[
idx
];
i
++
)
for
(
unsigned
i
=
0
;
i
<
od
->
num_supported
[
idx
];
i
++
)
if
(
od
->
supported
[
idx
][
i
]
==
val
)
return
1
;
...
...
@@ -125,13 +124,12 @@ oss_can_convert(int idx, int val)
static
int
oss_get_supported_param
(
struct
oss_data
*
od
,
unsigned
param
,
int
val
)
{
int
i
;
enum
oss_param
idx
=
oss_param_from_ioctl
(
param
);
int
ret
=
-
1
;
int
least
=
val
;
int
diff
;
for
(
i
=
0
;
i
<
od
->
num_supported
[
idx
];
i
++
)
{
for
(
unsigned
i
=
0
;
i
<
od
->
num_supported
[
idx
];
i
++
)
{
diff
=
od
->
supported
[
idx
][
i
]
-
val
;
if
(
diff
<
0
)
diff
=
-
diff
;
...
...
@@ -150,10 +148,9 @@ oss_get_supported_param(struct oss_data *od, unsigned param, int val)
static
int
oss_find_unsupported_param
(
struct
oss_data
*
od
,
unsigned
param
,
int
val
)
{
int
i
;
enum
oss_param
idx
=
oss_param_from_ioctl
(
param
);
for
(
i
=
0
;
i
<
od
->
num_unsupported
[
idx
];
i
++
)
{
for
(
unsigned
i
=
0
;
i
<
od
->
num_unsupported
[
idx
];
i
++
)
{
if
(
od
->
unsupported
[
idx
][
i
]
==
val
)
return
1
;
}
...
...
@@ -187,11 +184,10 @@ oss_add_unsupported_param(struct oss_data *od, unsigned param, int val)
static
void
oss_remove_supported_param
(
struct
oss_data
*
od
,
unsigned
param
,
int
val
)
{
int
i
;
int
j
=
0
;
unsigned
j
=
0
;
enum
oss_param
idx
=
oss_param_from_ioctl
(
param
);
for
(
i
=
0
;
i
<
od
->
num_supported
[
idx
]
-
1
;
i
++
)
{
for
(
unsigned
i
=
0
;
i
<
od
->
num_supported
[
idx
]
-
1
;
i
++
)
{
if
(
od
->
supported
[
idx
][
i
]
==
val
)
j
=
1
;
od
->
supported
[
idx
][
i
]
=
od
->
supported
[
idx
][
i
+
j
];
...
...
@@ -205,11 +201,10 @@ oss_remove_supported_param(struct oss_data *od, unsigned param, int val)
static
void
oss_remove_unsupported_param
(
struct
oss_data
*
od
,
unsigned
param
,
int
val
)
{
int
i
;
int
j
=
0
;
unsigned
j
=
0
;
enum
oss_param
idx
=
oss_param_from_ioctl
(
param
);
for
(
i
=
0
;
i
<
od
->
num_unsupported
[
idx
]
-
1
;
i
++
)
{
for
(
unsigned
i
=
0
;
i
<
od
->
num_unsupported
[
idx
]
-
1
;
i
++
)
{
if
(
od
->
unsupported
[
idx
][
i
]
==
val
)
j
=
1
;
od
->
unsupported
[
idx
][
i
]
=
od
->
unsupported
[
idx
][
i
+
j
];
...
...
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