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
d9024653
You need to sign in or sign up before continuing.
Commit
d9024653
authored
Feb 25, 2009
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mvp: use G_N_ELEMENTS(mvp_sample_rates)
Instead of manually calculating the number of elements in the mvp_sample_rates array, use GLib's convenience macro G_N_ELEMENTS().
parent
fff52ac5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
5 deletions
+2
-5
mvp_plugin.c
src/output/mvp_plugin.c
+2
-5
No files found.
src/output/mvp_plugin.c
View file @
d9024653
...
...
@@ -89,9 +89,6 @@ static unsigned mvp_sample_rates[][3] = {
{
15
,
96000
,
48000
}
};
static
const
unsigned
numfrequencies
=
sizeof
(
mvp_sample_rates
)
/
sizeof
(
mvp_sample_rates
[
0
]);
static
bool
mvp_output_test_default_device
(
void
)
{
...
...
@@ -161,14 +158,14 @@ mvp_set_pcm_params(struct mvp_data *md, unsigned long rate, int channels,
/*
* if there is an exact match for the frequency, use it.
*/
for
(
iloop
=
0
;
iloop
<
numfrequencies
;
iloop
++
)
{
for
(
iloop
=
0
;
iloop
<
G_N_ELEMENTS
(
mvp_sample_rates
)
;
iloop
++
)
{
if
(
rate
==
mvp_sample_rates
[
iloop
][
1
])
{
mix
[
2
]
=
mvp_sample_rates
[
iloop
][
0
];
break
;
}
}
if
(
iloop
>=
numfrequencies
)
{
if
(
iloop
>=
G_N_ELEMENTS
(
mvp_sample_rates
)
)
{
g_warning
(
"Can not find suitable output frequency for %ld
\n
"
,
rate
);
return
-
1
;
...
...
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