<!DOCTYPE html><html><head><title></title><style type="text/css">
p.MsoNormal,p.MsoNoSpacing{margin:0}</style></head><body><div><br></div><div>On Fri, Oct 25, 2019, at 13:13, Rémi Denis-Courmont wrote:<br></div><blockquote type="cite" id="qt"><div>Hi,<br></div><div><br></div><div>Up-converting to 24-bits is not going to improve quality in any way. Down-converting from float or S32 to 24-bits works just as well in the HAL as it does in this patch.<br></div></blockquote><div><br></div><div>Some sound card only support 24bit, so if exclusive mode is enabled, we will have to up convert to 24bit.<br></div><div><br></div><div>But the main use case is to be able to do 24bit to 24bit.<br></div><div><br></div><blockquote type="cite" id="qt"><div><br></div><div>This patch does *not* add any perceived improvement for so-called pros, not even the loonies that think they can hear frequencies above 48 kHz or dynamic ranges beyond 16 bits.<br></div><div><br></div><div>Adding exclusive mode is fine. Adding conversion without any valid technical reasons is not. Nor is duplicating code that already exists in the raw audio encoder.<br></div><div><br></div><div>There are literally no reasons to add this. That's not what the so-called audiophiles want.<br></div><div><br></div><div class="qt-gmail_quote"><div>Le 25 octobre 2019 14:02:54 GMT+03:00, Thomas Guillem <thomas@gllm.fr> a écrit :<br></div><blockquote style="margin-top:0pt;margin-right:0pt;margin-bottom:0pt;margin-left:0.8ex;border-left-color:rgb(204, 204, 204);border-left-style:solid;border-left-width:1px;padding-left:1ex;" class="qt-gmail_quote"><div><br></div><div>On Fri, Oct 25, 2019, at 12:47, Rémi Denis-Courmont wrote:<br></div><blockquote id="qt-qt" type="cite"><div>Here by people here in this decade.<br></div></blockquote><div><br></div><div>Then, I hereby ask the VLC's community if this old decision should be kept. Maybe I should ask the VLC-TC ?<br></div><div><br></div><div>VLC will continue to be denigrated by pro users if we don't offer them some options for "high quality audio".<br></div><div><br></div><div>A lot of applications are offering exclusive 24bit support. By doing a quick research I found MPV and Qobuz.<br></div><div><br></div><div>Yes I know 24bit 96k is useless, cf. <a href="https://people.xiph.org/~xiphmont/demo/neil-young.html">https://people.xiph.org/~xiphmont/demo/neil-young.html</a><br></div><div><br></div><div>This is not a reason to refuse this patch set, we should always offer a choice to pro users. Furthermore, this patch set doesn't affect the normal behavior,<br></div><div><br></div><div><br></div><blockquote id="qt-qt" type="cite"><div><br></div><div class="qt-qt-gmail_quote"><div>Le 25 octobre 2019 13:35:36 GMT+03:00, Thomas Guillem <<a href="mailto:thomas@gllm.fr">thomas@gllm.fr</a>> a écrit :<br></div><blockquote class="qt-qt-gmail_quote" style="margin-top:0pt;margin-right:0pt;margin-bottom:0pt;margin-left:0.8ex;border-left-color:rgb(204, 204, 204);border-left-style:solid;border-left-width:1px;padding-left:1ex;"><div><br></div><div>On Fri, Oct 25, 2019, at 12:17, Rémi Denis-Courmont wrote:<br></div><blockquote type="cite" id="qt-qt-qt"><div>I disagree and this contradicts earlier decisions here.<br></div></blockquote><div><br></div><div>Yes that is what you said in the first reply and I asked you:<br></div><div><br></div><div>Who ? when ? Do you have a trace of this decision ?<br></div><div><br></div><blockquote type="cite" id="qt-qt-qt"><div><br></div><div class="qt-qt-qt-gmail_quote"><div>Le 25 octobre 2019 10:16:28 GMT+03:00, Thomas Guillem <<a href="mailto:thomas@gllm.fr">thomas@gllm.fr</a>> a écrit :<br></div><blockquote style="margin-top:0pt;margin-right:0pt;margin-bottom:0pt;margin-left:0.8ex;border-left-color:rgb(204, 204, 204);border-left-style:solid;border-left-width:1px;padding-left:1ex;" class="qt-qt-qt-gmail_quote"><div><br></div><div>On Thu, Oct 24, 2019, at 18:29, Rémi Denis-Courmont wrote:<br></div><blockquote id="qt-qt-qt-qt" type="cite"><div>So what? Some cards don't support PCM at all, or only some really weird formats. That's why we use the OS-provided HAL.<br></div></blockquote><div><br></div><div>In that case, we can also add support for such format.<br></div><div><br></div><div>Yes, we must use the OS-provided HAL by default. But we can still add an advanced option to enable exclusive mode. I know a lot of audiophile would like to play their 24bit 96khz directly. Even if I know that 16bit 48khz cover fully the hearing range.<br></div><div><br></div><blockquote id="qt-qt-qt-qt" type="cite"><div><br></div><div>I don't think this belongs in VLC. We already decided to drop 24-bits PCM earlier.<br></div></blockquote><div><br></div><div>Who ? when ? Do you have a trace ?<br></div><div><br></div><blockquote id="qt-qt-qt-qt" type="cite"><div><br></div><div class="qt-qt-qt-qt-gmail_quote"><div>Le 24 octobre 2019 15:37:12 GMT+03:00, Thomas Guillem <<a href="mailto:thomas@gllm.fr">thomas@gllm.fr</a>> a écrit :<br></div><blockquote class="qt-qt-qt-qt-gmail_quote" style="margin-top:0pt;margin-right:0pt;margin-bottom:0pt;margin-left:0.8ex;border-left-color:rgb(204, 204, 204);border-left-style:solid;border-left-width:1px;padding-left:1ex;"><pre class="qt-qt-qt-qt-k9mail"><div>But don't use VLC_CODEC_S24N as this fourcc is not handled by any audio<br></div><div>filters. Instead, request VLC_CODEC_S32N to VLC and do the conversion<br></div><div>internally.<br></div><div><br></div><div>This commit is needed by the next commit since some sound cards only support<br></div><div>24bits.<hr> modules/audio_output/wasapi.c | 30 +++++++++++++++++++++++++++---<br></div><div> 1 file changed, 27 insertions(+), 3 deletions(-)<br></div><div><br></div><div>diff --git a/modules/audio_output/wasapi.c b/modules/audio_output/wasapi.c<br></div><div>index d6105169b8e..daa946f8afc 100644<br></div><div>--- a/modules/audio_output/wasapi.c<br></div><div>+++ b/modules/audio_output/wasapi.c<br></div><div>@@ -106,6 +106,7 @@ typedef struct aout_stream_sys<br></div><div>     unsigned block_align;<br></div><div>     UINT64 written; /**< Frames written to the buffer */<br></div><div>     UINT32 frames; /**< Total buffer size (frames) */<br></div><div>+    bool s24s32; /**< Output configured as S24N, but input as S32N */<br></div><div> } aout_stream_sys_t;<br></div><div> <br></div><div> static void ResetTimer(aout_stream_t *s)<br></div><div>@@ -268,7 +269,28 @@ static HRESULT Play(aout_stream_t *s, block_t *block, vlc_tick_t date)<br></div><div> <br></div><div>         const size_t copy = frames * sys->block_align;<br></div><div> <br></div><div>-        memcpy(dst, block->p_buffer, copy);<br></div><div>+        if (!sys->s24s32)<br></div><div>+        {<br></div><div>+            memcpy(dst, block->p_buffer, copy);<br></div><div>+            block->p_buffer += copy;<br></div><div>+            block->i_buffer -= copy;<br></div><div>+        }<br></div><div>+        else<br></div><div>+        {<br></div><div>+            /* Convert back S32L to S24L. The following is doing the opposite<br></div><div>+             * of S24LDecode() from codec/araw.c */<br></div><div>+            BYTE *end = dst + copy;<br></div><div>+            while (dst < end)<br></div><div>+            {<br></div><div>+                dst[0] = block->p_buffer[1];<br></div><div>+                dst[1] = block->p_buffer[2];<br></div><div>+                dst[2] = block->p_buffer[3];<br></div><div>+                dst += 3;<br></div><div>+                block->p_buffer += 4;<br></div><div>+                block->i_buffer -= 4;<br></div><div>+            }<br></div><div>+<br></div><div>+        }<br></div><div>         hr = IAudioRenderClient_ReleaseBuffer(render, frames, 0);<br></div><div>         if (FAILED(hr))<br></div><div>         {<br></div><div>@@ -276,8 +298,6 @@ static HRESULT Play(aout_stream_t *s, block_t *block, vlc_tick_t date)<br></div><div>             break;<br></div><div>         }<br></div><div> <br></div><div>-        block->p_buffer += copy;<br></div><div>-        block->i_buffer -= copy;<br></div><div>         block->i_nb_samples -= frames;<br></div><div>         sys->written += frames;<br></div><div>         if (block->i_nb_samples == 0)<br></div><div>@@ -512,6 +532,7 @@ static int vlc_FromWave(const WAVEFORMATEX *restrict wf,<br></div><div>             switch (wf->wBitsPerSample)<br></div><div>             {<br></div><div>                 case 32:<br></div><div>+                case 24:<br></div><div>                     audio->i_format = VLC_CODEC_S32N;<br></div><div>                     break;<br></div><div>                 case 16:<br></div><div>@@ -679,6 +700,9 @@ static HRESULT Start(aout_stream_t *s, audio_sample_format_t *restrict pfmt,<br></div><div>     sys->format = fmt.i_format;<br></div><div>     sys->block_align = pwf->nBlockAlign;<br></div><div>     sys->rate = pwf->nSamplesPerSec;<br></div><div>+    sys->s24s32 = pwf->wBitsPerSample == 24 && fmt.i_format == VLC_CODEC_S32N;<br></div><div>+    if (sys->s24s32)<br></div><div>+        msg_Dbg(s, "audio device configured as s24");<br></div><div> <br></div><div>     hr = IAudioClient_Initialize(sys->client, shared_mode, 0, buffer_duration,<br></div><div>                                  0, pwf, sid);<br></div></pre></blockquote></div><div><br></div><div>-- <br></div><div>Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté. <br></div><div>_______________________________________________<br></div><div>vlc-devel mailing list<br></div><div>To unsubscribe or modify your subscription options:<br></div><div><a href="https://mailman.videolan.org/listinfo/vlc-devel">https://mailman.videolan.org/listinfo/vlc-devel</a><br></div></blockquote><div><br></div></blockquote></div><div><br></div><div>-- <br></div><div>Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté. <br></div><div>_______________________________________________<br></div><div>vlc-devel mailing list<br></div><div>To unsubscribe or modify your subscription options:<br></div><div><a href="https://mailman.videolan.org/listinfo/vlc-devel">https://mailman.videolan.org/listinfo/vlc-devel</a><br></div></blockquote><div><br></div></blockquote></div><div><br></div><div>-- <br></div><div>Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté. <br></div><div>_______________________________________________<br></div><div>vlc-devel mailing list<br></div><div>To unsubscribe or modify your subscription options:<br></div><div><a href="https://mailman.videolan.org/listinfo/vlc-devel">https://mailman.videolan.org/listinfo/vlc-devel</a><br></div></blockquote><div><br></div></blockquote></div><div><br></div><div>-- <br></div><div>Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté. <br></div><div>_______________________________________________<br></div><div>vlc-devel mailing list<br></div><div>To unsubscribe or modify your subscription options:<br></div><div>https://mailman.videolan.org/listinfo/vlc-devel<br></div></blockquote><div><br></div></body></html>