]> git.sesse.net Git - vlc/commitdiff
aout: use S16N rather than S16L in audio outputs
authorRémi Denis-Courmont <remi@remlab.net>
Tue, 18 Dec 2012 22:45:11 +0000 (00:45 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Tue, 18 Dec 2012 22:45:52 +0000 (00:45 +0200)
(In practice, all of these were only used in little endian anyway.)

modules/audio_output/audioqueue.c
modules/audio_output/audiotrack.c
modules/audio_output/directx.c
modules/audio_output/kai.c
modules/audio_output/opensles_android.c
modules/audio_output/waveout.c

index b67baeb74cbce06caf143ad8f7712c12055a9d57..cc33c92e68048d9276e72aefba05b1a05d31f2bc 100644 (file)
@@ -108,7 +108,7 @@ static int Start(audio_output_t *p_aout, audio_sample_format_t *restrict fmt)
     if (status != noErr)
         return VLC_EGENERIC;
 
-    fmt->i_format = VLC_CODEC_S16L;
+    fmt->i_format = VLC_CODEC_S16N;
     fmt->i_physical_channels = AOUT_CHANS_STEREO;
     fmt->i_rate = 44100;
     aout_FormatPrepare(fmt);
index 5e76fa8f0d5c307253da6a6e36269df49c9cec2c..83858cf27da264e47ac7ab5dfe8ea8946636c2a7 100644 (file)
@@ -239,10 +239,10 @@ static int Start(audio_output_t *aout, audio_sample_format_t *restrict fmt)
 
     stream_type = MUSIC;
 
-    /* We can only accept U8 and S16L */
-    if (fmt->i_format != VLC_CODEC_U8 && fmt->i_format != VLC_CODEC_S16L)
-        fmt->i_format = VLC_CODEC_S16L;
-    format = (fmt->i_format == VLC_CODEC_S16L) ? PCM_16_BIT : PCM_8_BIT;
+    /* We can only accept U8 and S16N */
+    if (fmt->i_format != VLC_CODEC_U8 && fmt->i_format != VLC_CODEC_S16N)
+        fmt->i_format = VLC_CODEC_S16N;
+    format = (fmt->i_format == VLC_CODEC_S16N) ? PCM_16_BIT : PCM_8_BIT;
 
     /* TODO: android supports more channels */
     fmt->i_original_channels = fmt->i_physical_channels;
index 1c5c057ef8c7b5fd4c26da57b69123b2f6d94d31..ae15bed277620b70e22bb8abeba0efeda5cec97c 100644 (file)
@@ -708,7 +708,7 @@ static int CreateDSBuffer( audio_output_t *p_aout, int i_format,
         waveformat.SubFormat = _KSDATAFORMAT_SUBTYPE_IEEE_FLOAT;
         break;
 
-    case VLC_CODEC_S16L:
+    case VLC_CODEC_S16N:
         waveformat.Format.wBitsPerSample = 16;
         waveformat.Samples.wValidBitsPerSample =
             waveformat.Format.wBitsPerSample;
@@ -816,7 +816,7 @@ static int CreateDSBufferPCM( audio_output_t *p_aout, vlc_fourcc_t *i_format,
                         (i_rate / 20) * 4 * i_nb_channels, b_probe )
         != VLC_SUCCESS )
     {
-        if ( CreateDSBuffer( p_aout, VLC_CODEC_S16L,
+        if ( CreateDSBuffer( p_aout, VLC_CODEC_S16N,
                              i_channels, i_nb_channels, i_rate,
                              (i_rate / 20) * 2 * i_nb_channels, b_probe )
              != VLC_SUCCESS )
@@ -825,7 +825,7 @@ static int CreateDSBufferPCM( audio_output_t *p_aout, vlc_fourcc_t *i_format,
         }
         else
         {
-            *i_format = VLC_CODEC_S16L;
+            *i_format = VLC_CODEC_S16N;
             return VLC_SUCCESS;
         }
     }
index e2298af372aedfbf4781a522ee70863da725c25f..f5b04463ed56e833d56c4d3936c8a42f14d08fba 100644 (file)
@@ -149,8 +149,8 @@ static int Start ( audio_output_t *p_aout, audio_sample_format_t *fmt )
             = AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT;
     }
 
-    /* Support s16l only */
-    format.i_format = VLC_CODEC_S16L;
+    /* Support S16 only */
+    format.i_format = VLC_CODEC_S16N;
 
     aout_FormatPrepare( &format );
 
index 147d44ad812991dabe3b1a9ea0a70ce8e1852412..dd2438ed26fd2cccce23a156ff3df94d7b1e57a7 100644 (file)
@@ -448,8 +448,8 @@ static int Start( audio_output_t *p_aout, audio_sample_format_t *restrict fmt )
     p_sys->p_buffer_chain = NULL;
     p_sys->pp_buffer_last = &p_sys->p_buffer_chain;
 
-    // we want 16bit signed data little endian.
-    fmt->i_format              = VLC_CODEC_S16L;
+    // we want 16bit signed data native endian.
+    fmt->i_format              = VLC_CODEC_S16N;
     fmt->i_physical_channels   = AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT;
     p_aout->play               = Play;
     p_aout->pause              = Pause;
index 424ffd135ddb73a86fc68130799e528d17fd7095..8c9b79df44444c0deb9f1ca32cc6b554709a2641 100644 (file)
@@ -575,7 +575,7 @@ static int OpenWaveOut( audio_output_t *p_aout, uint32_t i_device_id, int i_form
         waveformat.SubFormat = __KSDATAFORMAT_SUBTYPE_IEEE_FLOAT;
         break;
 
-    case VLC_CODEC_S16L:
+    case VLC_CODEC_S16N:
         waveformat.Format.wBitsPerSample = 16;
         waveformat.Samples.wValidBitsPerSample =
             waveformat.Format.wBitsPerSample;
@@ -675,7 +675,7 @@ static int OpenWaveOutPCM( audio_output_t *p_aout, uint32_t i_device_id,
                                    i_channels, i_nb_channels, i_rate, b_probe )
         != VLC_SUCCESS )
     {
-        if ( OpenWaveOut( p_aout, i_device_id, VLC_CODEC_S16L,
+        if ( OpenWaveOut( p_aout, i_device_id, VLC_CODEC_S16N,
                           i_channels, i_nb_channels, i_rate, b_probe )
              != VLC_SUCCESS )
         {
@@ -683,7 +683,7 @@ static int OpenWaveOutPCM( audio_output_t *p_aout, uint32_t i_device_id,
         }
         else
         {
-            *i_format = VLC_CODEC_S16L;
+            *i_format = VLC_CODEC_S16N;
             return VLC_SUCCESS;
         }
     }