Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
1394bd28
Commit
1394bd28
authored
Sep 21, 2012
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Add test cases for the libvlc equalizer API."
This reverts commit
15498896
.
parent
6f74124e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
163 deletions
+0
-163
test/Makefile.am
test/Makefile.am
+0
-3
test/libvlc/equalizer.c
test/libvlc/equalizer.c
+0
-160
No files found.
test/Makefile.am
View file @
1394bd28
...
...
@@ -14,7 +14,6 @@ extra_check_verbose__0 = $(extra_check_verbose_0)
###############################################################################
check_PROGRAMS
=
\
test_libvlc_core
\
test_libvlc_equalizer
\
test_libvlc_media
\
test_libvlc_media_list
\
test_libvlc_media_player
\
...
...
@@ -59,8 +58,6 @@ LIBVLC = ../lib/libvlc.la
test_libvlc_core_SOURCES
=
libvlc/core.c
test_libvlc_core_LDADD
=
$(LIBVLC)
test_libvlc_equalizer_SOURCES
=
libvlc/equalizer.c
test_libvlc_equalizer_LDADD
=
$(LIBVLC)
test_libvlc_media_SOURCES
=
libvlc/media.c
test_libvlc_media_LDADD
=
$(LIBVLC)
test_libvlc_media_list_player_SOURCES
=
libvlc/media_list_player.c
...
...
test/libvlc/equalizer.c
deleted
100644 → 0
View file @
6f74124e
/*
* equalizer.c - libvlc smoke test
*/
#include <string.h>
#include "test.h"
static
void
test_equalizer
(
const
char
**
argv
,
int
argc
)
{
libvlc_instance_t
*
vlc
;
libvlc_media_player_t
*
mp
;
libvlc_equalizer_t
*
equalizer
;
unsigned
u_presets
,
u_bands
;
log
(
"Testing equalizer
\n
"
);
vlc
=
libvlc_new
(
argc
,
argv
);
assert
(
NULL
!=
vlc
);
mp
=
libvlc_media_player_new
(
vlc
);
assert
(
NULL
!=
mp
);
// presets
log
(
"Testing equalizer presets
\n
"
);
u_presets
=
libvlc_audio_equalizer_get_preset_count
();
assert
(
u_presets
>
0
);
for
(
unsigned
i
=
0
;
i
<
u_presets
;
i
++
)
{
assert
(
NULL
!=
libvlc_audio_equalizer_get_preset_name
(
i
));
equalizer
=
libvlc_audio_equalizer_new_from_preset
(
i
);
assert
(
equalizer
);
libvlc_audio_equalizer_release
(
equalizer
);
}
// preset out of range
assert
(
NULL
==
libvlc_audio_equalizer_get_preset_name
(
u_presets
));
assert
(
NULL
==
libvlc_audio_equalizer_new_from_preset
(
u_presets
));
// bands
log
(
"Testing equalizer bands
\n
"
);
u_bands
=
libvlc_audio_equalizer_get_band_count
();
assert
(
u_bands
>
0
);
for
(
unsigned
i
=
0
;
i
<
u_bands
;
i
++
)
assert
(
-
1
.
0
f
!=
libvlc_audio_equalizer_get_band_frequency
(
i
));
// band out of range
assert
(
-
1
.
0
f
==
libvlc_audio_equalizer_get_band_frequency
(
u_bands
));
// initialisation
log
(
"Testing equalizer initialisation
\n
"
);
equalizer
=
libvlc_audio_equalizer_new
();
assert
(
equalizer
);
assert
(
libvlc_audio_equalizer_get_preamp
(
equalizer
)
==
0
.
0
f
);
for
(
unsigned
i
=
0
;
i
<
u_bands
;
i
++
)
assert
(
libvlc_audio_equalizer_get_amp_at_index
(
equalizer
,
i
)
==
0
.
0
f
);
// preamp (range -20.0 to 20.0)
log
(
"Testing equalizer preamp
\n
"
);
assert
(
0
==
libvlc_audio_equalizer_set_preamp
(
equalizer
,
19
.
9
f
));
assert
(
libvlc_audio_equalizer_get_preamp
(
equalizer
)
==
19
.
9
f
);
assert
(
0
==
libvlc_audio_equalizer_set_preamp
(
equalizer
,
20
.
0
f
));
assert
(
libvlc_audio_equalizer_get_preamp
(
equalizer
)
==
20
.
0
f
);
assert
(
0
==
libvlc_audio_equalizer_set_preamp
(
equalizer
,
20
.
1
f
));
assert
(
libvlc_audio_equalizer_get_preamp
(
equalizer
)
==
20
.
0
f
);
assert
(
0
==
libvlc_audio_equalizer_set_preamp
(
equalizer
,
-
19
.
9
f
));
assert
(
libvlc_audio_equalizer_get_preamp
(
equalizer
)
==
-
19
.
9
f
);
assert
(
0
==
libvlc_audio_equalizer_set_preamp
(
equalizer
,
-
20
.
0
f
));
assert
(
libvlc_audio_equalizer_get_preamp
(
equalizer
)
==
-
20
.
0
f
);
assert
(
0
==
libvlc_audio_equalizer_set_preamp
(
equalizer
,
-
20
.
1
f
));
assert
(
libvlc_audio_equalizer_get_preamp
(
equalizer
)
==
-
20
.
0
f
);
// amp at index (range -20.0 to 20.0)
log
(
"Testing equalizer amp at index
\n
"
);
for
(
unsigned
i
=
0
;
i
<
u_bands
;
i
++
)
{
assert
(
0
==
libvlc_audio_equalizer_set_amp_at_index
(
equalizer
,
19
.
9
f
,
i
));
assert
(
libvlc_audio_equalizer_get_amp_at_index
(
equalizer
,
i
)
==
19
.
9
f
);
assert
(
0
==
libvlc_audio_equalizer_set_amp_at_index
(
equalizer
,
20
.
0
f
,
i
));
assert
(
libvlc_audio_equalizer_get_amp_at_index
(
equalizer
,
i
)
==
20
.
0
f
);
assert
(
0
==
libvlc_audio_equalizer_set_amp_at_index
(
equalizer
,
20
.
1
f
,
i
));
assert
(
libvlc_audio_equalizer_get_amp_at_index
(
equalizer
,
i
)
==
20
.
0
f
);
assert
(
0
==
libvlc_audio_equalizer_set_amp_at_index
(
equalizer
,
-
19
.
9
f
,
i
));
assert
(
libvlc_audio_equalizer_get_amp_at_index
(
equalizer
,
i
)
==
-
19
.
9
f
);
assert
(
0
==
libvlc_audio_equalizer_set_amp_at_index
(
equalizer
,
-
20
.
0
f
,
i
));
assert
(
libvlc_audio_equalizer_get_amp_at_index
(
equalizer
,
i
)
==
-
20
.
0
f
);
assert
(
0
==
libvlc_audio_equalizer_set_amp_at_index
(
equalizer
,
-
20
.
1
f
,
i
));
assert
(
libvlc_audio_equalizer_get_amp_at_index
(
equalizer
,
i
)
==
-
20
.
0
f
);
}
// amp at index out of range
assert
(
0
.
0
f
==
libvlc_audio_equalizer_get_amp_at_index
(
equalizer
,
u_bands
));
assert
(
-
1
==
libvlc_audio_equalizer_set_amp_at_index
(
equalizer
,
19
.
9
f
,
u_bands
));
// no equalizer
log
(
"Testing equalizer null
\n
"
);
assert
(
0
.
0
f
==
libvlc_audio_equalizer_get_preamp
(
NULL
));
assert
(
-
1
==
libvlc_audio_equalizer_set_preamp
(
NULL
,
0
.
0
f
));
assert
(
0
.
0
f
==
libvlc_audio_equalizer_get_amp_at_index
(
NULL
,
0
));
assert
(
-
1
==
libvlc_audio_equalizer_set_amp_at_index
(
NULL
,
0
.
0
f
,
0
));
libvlc_audio_equalizer_release
(
NULL
);
// media player
assert
(
0
==
libvlc_media_player_set_equalizer
(
mp
,
NULL
));
assert
(
0
==
libvlc_media_player_set_equalizer
(
mp
,
equalizer
));
// cleanup
log
(
"Testing equalizer cleanup
\n
"
);
libvlc_audio_equalizer_release
(
equalizer
);
log
(
"Finished testing equalizer
\n
"
);
libvlc_media_player_release
(
mp
);
libvlc_release
(
vlc
);
}
int
main
(
void
)
{
test_init
();
test_equalizer
(
test_defaults_args
,
test_defaults_nargs
);
return
0
;
}
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