aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_pcm_volume.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-08-03 21:00:50 +0200
committerMax Kellermann <max@duempel.org>2013-08-03 21:37:56 +0200
commitd1e7b4e38136f9342aad76c685a13adf0e69f869 (patch)
tree49643b937ddfe735511b566a71398da5a945d7aa /test/test_pcm_volume.cxx
parent67f591a9ce60651da41afc499bd9a22e25314e35 (diff)
downloadmpd-d1e7b4e38136f9342aad76c685a13adf0e69f869.tar.gz
mpd-d1e7b4e38136f9342aad76c685a13adf0e69f869.tar.xz
mpd-d1e7b4e38136f9342aad76c685a13adf0e69f869.zip
audio_format: convert to C++
Diffstat (limited to '')
-rw-r--r--test/test_pcm_volume.cxx30
1 files changed, 15 insertions, 15 deletions
diff --git a/test/test_pcm_volume.cxx b/test/test_pcm_volume.cxx
index ec3ac23b9..d5aa3782e 100644
--- a/test/test_pcm_volume.cxx
+++ b/test/test_pcm_volume.cxx
@@ -37,17 +37,17 @@ test_pcm_volume_8()
int8_t dest[N];
std::copy(src.begin(), src.end(), dest);
- g_assert_cmpint(pcm_volume(dest, sizeof(dest), SAMPLE_FORMAT_S8,
+ g_assert_cmpint(pcm_volume(dest, sizeof(dest), SampleFormat::S8,
0), ==, true);
g_assert_cmpint(memcmp(dest, zero, sizeof(zero)), ==, 0);
std::copy(src.begin(), src.end(), dest);
- g_assert_cmpint(pcm_volume(dest, sizeof(dest), SAMPLE_FORMAT_S8,
+ g_assert_cmpint(pcm_volume(dest, sizeof(dest), SampleFormat::S8,
PCM_VOLUME_1), ==, true);
g_assert_cmpint(memcmp(dest, src, sizeof(src)), ==, 0);
std::copy(src.begin(), src.end(), dest);
- g_assert_cmpint(pcm_volume(dest, sizeof(dest), SAMPLE_FORMAT_S8,
+ g_assert_cmpint(pcm_volume(dest, sizeof(dest), SampleFormat::S8,
PCM_VOLUME_1 / 2), ==, true);
for (unsigned i = 0; i < N; ++i) {
@@ -66,17 +66,17 @@ test_pcm_volume_16()
int16_t dest[N];
std::copy(src.begin(), src.end(), dest);
- g_assert_cmpint(pcm_volume(dest, sizeof(dest), SAMPLE_FORMAT_S16,
+ g_assert_cmpint(pcm_volume(dest, sizeof(dest), SampleFormat::S16,
0), ==, true);
g_assert_cmpint(memcmp(dest, zero, sizeof(zero)), ==, 0);
std::copy(src.begin(), src.end(), dest);
- g_assert_cmpint(pcm_volume(dest, sizeof(dest), SAMPLE_FORMAT_S16,
+ g_assert_cmpint(pcm_volume(dest, sizeof(dest), SampleFormat::S16,
PCM_VOLUME_1), ==, true);
g_assert_cmpint(memcmp(dest, src, sizeof(src)), ==, 0);
std::copy(src.begin(), src.end(), dest);
- g_assert_cmpint(pcm_volume(dest, sizeof(dest), SAMPLE_FORMAT_S16,
+ g_assert_cmpint(pcm_volume(dest, sizeof(dest), SampleFormat::S16,
PCM_VOLUME_1 / 2), ==, true);
for (unsigned i = 0; i < N; ++i) {
@@ -95,17 +95,17 @@ test_pcm_volume_24()
int32_t dest[N];
std::copy(src.begin(), src.end(), dest);
- g_assert_cmpint(pcm_volume(dest, sizeof(dest), SAMPLE_FORMAT_S24_P32,
+ g_assert_cmpint(pcm_volume(dest, sizeof(dest), SampleFormat::S24_P32,
0), ==, true);
g_assert_cmpint(memcmp(dest, zero, sizeof(zero)), ==, 0);
std::copy(src.begin(), src.end(), dest);
- g_assert_cmpint(pcm_volume(dest, sizeof(dest), SAMPLE_FORMAT_S24_P32,
+ g_assert_cmpint(pcm_volume(dest, sizeof(dest), SampleFormat::S24_P32,
PCM_VOLUME_1), ==, true);
g_assert_cmpint(memcmp(dest, src, sizeof(src)), ==, 0);
std::copy(src.begin(), src.end(), dest);
- g_assert_cmpint(pcm_volume(dest, sizeof(dest), SAMPLE_FORMAT_S24_P32,
+ g_assert_cmpint(pcm_volume(dest, sizeof(dest), SampleFormat::S24_P32,
PCM_VOLUME_1 / 2), ==, true);
for (unsigned i = 0; i < N; ++i) {
@@ -124,17 +124,17 @@ test_pcm_volume_32()
int32_t dest[N];
std::copy(src.begin(), src.end(), dest);
- g_assert_cmpint(pcm_volume(dest, sizeof(dest), SAMPLE_FORMAT_S32,
+ g_assert_cmpint(pcm_volume(dest, sizeof(dest), SampleFormat::S32,
0), ==, true);
g_assert_cmpint(memcmp(dest, zero, sizeof(zero)), ==, 0);
std::copy(src.begin(), src.end(), dest);
- g_assert_cmpint(pcm_volume(dest, sizeof(dest), SAMPLE_FORMAT_S32,
+ g_assert_cmpint(pcm_volume(dest, sizeof(dest), SampleFormat::S32,
PCM_VOLUME_1), ==, true);
g_assert_cmpint(memcmp(dest, src, sizeof(src)), ==, 0);
std::copy(src.begin(), src.end(), dest);
- g_assert_cmpint(pcm_volume(dest, sizeof(dest), SAMPLE_FORMAT_S32,
+ g_assert_cmpint(pcm_volume(dest, sizeof(dest), SampleFormat::S32,
PCM_VOLUME_1 / 2), ==, true);
for (unsigned i = 0; i < N; ++i) {
@@ -153,17 +153,17 @@ test_pcm_volume_float()
float dest[N];
std::copy(src.begin(), src.end(), dest);
- g_assert_cmpint(pcm_volume(dest, sizeof(dest), SAMPLE_FORMAT_FLOAT,
+ g_assert_cmpint(pcm_volume(dest, sizeof(dest), SampleFormat::FLOAT,
0), ==, true);
g_assert_cmpint(memcmp(dest, zero, sizeof(zero)), ==, 0);
std::copy(src.begin(), src.end(), dest);
- g_assert_cmpint(pcm_volume(dest, sizeof(dest), SAMPLE_FORMAT_FLOAT,
+ g_assert_cmpint(pcm_volume(dest, sizeof(dest), SampleFormat::FLOAT,
PCM_VOLUME_1), ==, true);
g_assert_cmpint(memcmp(dest, src, sizeof(src)), ==, 0);
std::copy(src.begin(), src.end(), dest);
- g_assert_cmpint(pcm_volume(dest, sizeof(dest), SAMPLE_FORMAT_FLOAT,
+ g_assert_cmpint(pcm_volume(dest, sizeof(dest), SampleFormat::FLOAT,
PCM_VOLUME_1 / 2), ==, true);
for (unsigned i = 0; i < N; ++i)