Commit 0b824438 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

aout: drop support for non-native float

It never really worked anyway.
parent 6b232cec
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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
......
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment