<!doctype html><html><head><title></title><style type="text/css">
p.MsoNormal,p.MsoNoSpacing{margin:0}</style></head><body>Here by people here in this decade.<br><br><div class="gmail_quote">Le 25 octobre 2019 13:35:36 GMT+03:00, Thomas Guillem <thomas@gllm.fr> a écrit :<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); 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"><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"><div><br></div><div class="qt-gmail_quote"><div>Le 25 octobre 2019 10:16:28 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 Thu, Oct 24, 2019, at 18:29, Rémi Denis-Courmont wrote:<br></div><blockquote id="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" 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" type="cite"><div><br></div><div class="qt-qt-gmail_quote"><div>Le 24 octobre 2019 15:37:12 GMT+03:00, Thomas Guillem <thomas@gllm.fr> 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;"><pre class="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>https://mailman.videolan.org/listinfo/vlc-devel<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></blockquote></div><br>-- <br>Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.</body></html>