[vlc-commits] aout: drop support for non-native float
Rémi Denis-Courmont
git at videolan.org
Wed Dec 19 18:39:44 CET 2012
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Dec 19 19:38:53 2012 +0200| [0b8244387ce2b2b364151a86f76af855a436361f] | committer: Rémi Denis-Courmont
aout: drop support for non-native float
It never really worked anyway.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0b8244387ce2b2b364151a86f76af855a436361f
---
modules/audio_filter/converter/endian.c | 30 ------------------------------
modules/audio_output/alsa.c | 14 ++++----------
modules/audio_output/file.c | 21 +++++++++++++++++----
modules/audio_output/oss.c | 6 ++----
modules/audio_output/pulse.c | 13 ++++---------
5 files changed, 27 insertions(+), 57 deletions(-)
diff --git a/modules/audio_filter/converter/endian.c b/modules/audio_filter/converter/endian.c
index a0ed3ea..1dcf667 100644
--- a/modules/audio_filter/converter/endian.c
+++ b/modules/audio_filter/converter/endian.c
@@ -58,31 +58,7 @@ static block_t *Filter24(filter_t *filter, block_t *block)
return block;
}
-static block_t *Filter32(filter_t *filter, block_t *block)
-{
- uint32_t *data = (uint32_t *)block->p_buffer;
-
- for (size_t i = 0; i < block->i_buffer / 4; i++)
- data[i] = bswap32 (data[i]);
-
- (void) filter;
- return block;
-}
-
-static block_t *Filter64(filter_t *filter, block_t *block)
-{
- uint64_t *data = (uint64_t *)block->p_buffer;
-
- for (size_t i = 0; i < block->i_buffer / 8; i++)
- data[i] = bswap64 (data[i]);
-
- (void) filter;
- return block;
-}
-
static const vlc_fourcc_t list[][2] = {
- { VLC_CODEC_F64B, VLC_CODEC_F64L },
- { VLC_CODEC_F32B, VLC_CODEC_F32L },
{ VLC_CODEC_S24B, VLC_CODEC_S24L },
{ VLC_CODEC_S24B, VLC_CODEC_S24L },
};
@@ -116,12 +92,6 @@ ok:
case 24:
filter->pf_audio_filter = Filter24;
break;
- case 32:
- filter->pf_audio_filter = Filter32;
- break;
- case 64:
- filter->pf_audio_filter = Filter64;
- break;
}
return VLC_SUCCESS;
diff --git a/modules/audio_output/alsa.c b/modules/audio_output/alsa.c
index 712433c..045ea5c 100644
--- a/modules/audio_output/alsa.c
+++ b/modules/audio_output/alsa.c
@@ -306,17 +306,11 @@ static int Start (audio_output_t *aout, audio_sample_format_t *restrict fmt)
switch (fmt->i_format)
{
- case VLC_CODEC_F64B:
- pcm_format = SND_PCM_FORMAT_FLOAT64_BE;
+ case VLC_CODEC_FL64:
+ pcm_format = SND_PCM_FORMAT_FLOAT64;
break;
- case VLC_CODEC_F64L:
- pcm_format = SND_PCM_FORMAT_FLOAT64_LE;
- break;
- case VLC_CODEC_F32B:
- pcm_format = SND_PCM_FORMAT_FLOAT_BE;
- break;
- case VLC_CODEC_F32L:
- pcm_format = SND_PCM_FORMAT_FLOAT_LE;
+ case VLC_CODEC_FL32:
+ pcm_format = SND_PCM_FORMAT_FLOAT;
break;
case VLC_CODEC_S32N:
pcm_format = SND_PCM_FORMAT_S32;
diff --git a/modules/audio_output/file.c b/modules/audio_output/file.c
index 5034542..5773acc 100644
--- a/modules/audio_output/file.c
+++ b/modules/audio_output/file.c
@@ -87,9 +87,20 @@ static void Flush ( audio_output_t *, bool );
#define WAV_LONGTEXT N_("Instead of writing a raw file, you can add a WAV " \
"header to the file.")
-static const char *const format_list[] = { "u8", "s16", "float32", "spdif" };
-static const int format_int[] = { VLC_CODEC_U8, VLC_CODEC_S16N,
- VLC_CODEC_F32L, VLC_CODEC_SPDIFL };
+static const char *const format_list[] = {
+ "u8", "s16",
+#ifndef WORDS_BIGENDIAN
+ "float32",
+#endif
+ "spdif",
+};
+static const int format_int[] = {
+ VLC_CODEC_U8, VLC_CODEC_S16N,
+#ifndef WORDS_BIGENDIAN
+ VLC_CODEC_FL32,
+#endif
+ VLC_CODEC_SPDIFL,
+};
#define FILE_TEXT N_("Output file")
#define FILE_LONGTEXT N_("File to which the audio samples will be written to. (\"-\" for stdout")
@@ -201,10 +212,12 @@ static int Start( audio_output_t *p_aout, audio_sample_format_t *restrict fmt )
switch( fmt->i_format )
{
- case VLC_CODEC_F32L:
+#ifndef WORDS_BIGENDIAN
+ case VLC_CODEC_FL32:
wh->Format = WAVE_FORMAT_IEEE_FLOAT;
wh->BitsPerSample = sizeof(float) * 8;
break;
+#endif
case VLC_CODEC_U8:
wh->Format = WAVE_FORMAT_PCM;
wh->BitsPerSample = 8;
diff --git a/modules/audio_output/oss.c b/modules/audio_output/oss.c
index 7f9859e..5c98c30 100644
--- a/modules/audio_output/oss.c
+++ b/modules/audio_output/oss.c
@@ -111,10 +111,8 @@ static int Start (audio_output_t *aout, audio_sample_format_t *restrict fmt)
switch (fmt->i_format)
{
#ifdef AFMT_FLOAT
- case VLC_CODEC_F64B:
- case VLC_CODEC_F64L:
- case VLC_CODEC_F32B:
- case VLC_CODEC_F32L:
+ case VLC_CODEC_FL64:
+ case VLC_CODEC_FL32:
format = AFMT_FLOAT;
break;
#endif
diff --git a/modules/audio_output/pulse.c b/modules/audio_output/pulse.c
index 1afc724..d30aa28 100644
--- a/modules/audio_output/pulse.c
+++ b/modules/audio_output/pulse.c
@@ -654,15 +654,10 @@ static int Start(audio_output_t *aout, audio_sample_format_t *restrict fmt)
switch (fmt->i_format)
{
- case VLC_CODEC_F64B:
- fmt->i_format = VLC_CODEC_F32B;
- case VLC_CODEC_F32B:
- ss.format = PA_SAMPLE_FLOAT32BE;
- break;
- case VLC_CODEC_F64L:
- fmt->i_format = VLC_CODEC_F32L;
- case VLC_CODEC_F32L:
- ss.format = PA_SAMPLE_FLOAT32LE;
+ case VLC_CODEC_FL64:
+ fmt->i_format = VLC_CODEC_FL32;
+ case VLC_CODEC_FL32:
+ ss.format = PA_SAMPLE_FLOAT32NE;
break;
case VLC_CODEC_S32N:
ss.format = PA_SAMPLE_S32NE;
More information about the vlc-commits
mailing list