summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimo Wischer <twischer@de.adit-jv.com>2018-11-20 15:51:42 +0100
committerFilipe Coelho <falktx@falktx.com>2019-01-17 00:56:39 +0100
commit148c8d8e6acf3242bcc27b62f7f51bbdeee6472b (patch)
treec2d9ea4844d0e488d099bdebc40dcb75aaaa0ad7
parentd017e1fffeb15c9baee46220642dda5030409a02 (diff)
downloadjack2-148c8d8e6acf3242bcc27b62f7f51bbdeee6472b.tar.gz
alsa_in/out: Use float to S32 conversion if requested
sample_move_d32u24_sS() converts into samples like 0x00****** but S32 format expects samples like 0x********. Therefore it will not use the full volume range when also using sample_move_d32u24_sS() for S32. Signed-off-by: Timo Wischer <twischer@de.adit-jv.com>
-rw-r--r--example-clients/alsa_in.c4
-rw-r--r--example-clients/alsa_out.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/example-clients/alsa_in.c b/example-clients/alsa_in.c
index de694e07..cd0e2a6c 100644
--- a/example-clients/alsa_in.c
+++ b/example-clients/alsa_in.c
@@ -95,9 +95,9 @@ typedef struct alsa_format {
alsa_format_t formats[] = {
{ SND_PCM_FORMAT_FLOAT_LE, 4, sample_move_dS_floatLE, sample_move_floatLE_sSs, "float" },
- { SND_PCM_FORMAT_S32, 4, sample_move_d32u24_sS, sample_move_dS_s32u24, "32bit" },
+ { SND_PCM_FORMAT_S32, 4, sample_move_d32_sS, sample_move_dS_s32, "32bit" },
{ SND_PCM_FORMAT_S24_3LE, 3, sample_move_d24_sS, sample_move_dS_s24, "24bit - real" },
- { SND_PCM_FORMAT_S24, 4, sample_move_d24_sS, sample_move_dS_s24, "24bit" },
+ { SND_PCM_FORMAT_S24, 4, sample_move_d32u24_sS, sample_move_dS_s32u24, "24bit" },
{ SND_PCM_FORMAT_S16, 2, sample_move_d16_sS, sample_move_dS_s16, "16bit" }
#ifdef __ANDROID__
,{ SND_PCM_FORMAT_S16_LE, 2, sample_move_d16_sS, sample_move_dS_s16, "16bit little-endian" }
diff --git a/example-clients/alsa_out.c b/example-clients/alsa_out.c
index 04122603..5b1a4f8c 100644
--- a/example-clients/alsa_out.c
+++ b/example-clients/alsa_out.c
@@ -96,9 +96,9 @@ typedef struct alsa_format {
alsa_format_t formats[] = {
{ SND_PCM_FORMAT_FLOAT_LE, 4, sample_move_dS_floatLE, sample_move_floatLE_sSs, "float" },
- { SND_PCM_FORMAT_S32, 4, sample_move_d32u24_sS, sample_move_dS_s32u24, "32bit" },
+ { SND_PCM_FORMAT_S32, 4, sample_move_d32_sS, sample_move_dS_s32, "32bit" },
{ SND_PCM_FORMAT_S24_3LE, 3, sample_move_d24_sS, sample_move_dS_s24, "24bit - real" },
- { SND_PCM_FORMAT_S24, 4, sample_move_d24_sS, sample_move_dS_s24, "24bit" },
+ { SND_PCM_FORMAT_S24, 4, sample_move_d32u24_sS, sample_move_dS_s32u24, "24bit" },
{ SND_PCM_FORMAT_S16, 2, sample_move_d16_sS, sample_move_dS_s16, "16bit" }
#ifdef __ANDROID__
,{ SND_PCM_FORMAT_S16_LE, 2, sample_move_d16_sS, sample_move_dS_s16, "16bit little-endian" }