summaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
Diffstat (limited to 'audio')
-rw-r--r--audio/decode/ad_mpg123.c6
-rw-r--r--audio/filter/af_bs2b.c2
-rw-r--r--audio/filter/af_center.c2
-rw-r--r--audio/filter/af_convert24.c8
-rw-r--r--audio/filter/af_drc.c8
-rw-r--r--audio/filter/af_equalizer.c2
-rw-r--r--audio/filter/af_export.c2
-rw-r--r--audio/filter/af_extrastereo.c4
-rw-r--r--audio/filter/af_hrtf.c2
-rw-r--r--audio/filter/af_karaoke.c2
-rw-r--r--audio/filter/af_ladspa.c2
-rw-r--r--audio/filter/af_lavfi.c2
-rw-r--r--audio/filter/af_lavrresample.c2
-rw-r--r--audio/filter/af_pan.c2
-rw-r--r--audio/filter/af_scaletempo.c4
-rw-r--r--audio/filter/af_sinesuppress.c6
-rw-r--r--audio/filter/af_sub.c2
-rw-r--r--audio/filter/af_surround.c2
-rw-r--r--audio/filter/af_sweep.c2
-rw-r--r--audio/filter/af_volume.c10
-rw-r--r--audio/fmt-conversion.c8
-rw-r--r--audio/format.c1
-rw-r--r--audio/format.h11
-rw-r--r--audio/out/ao_alsa.c4
-rw-r--r--audio/out/ao_dsound.c4
-rw-r--r--audio/out/ao_oss.c12
-rw-r--r--audio/out/ao_portaudio.c12
27 files changed, 56 insertions, 68 deletions
diff --git a/audio/decode/ad_mpg123.c b/audio/decode/ad_mpg123.c
index 322f45826f..777c20c2c9 100644
--- a/audio/decode/ad_mpg123.c
+++ b/audio/decode/ad_mpg123.c
@@ -149,13 +149,13 @@ static int set_format(sh_audio_t *sh)
sh->sample_format = AF_FORMAT_S8;
break;
case MPG123_ENC_SIGNED_16:
- sh->sample_format = AF_FORMAT_S16_NE;
+ sh->sample_format = AF_FORMAT_S16;
break;
case MPG123_ENC_SIGNED_32:
- sh->sample_format = AF_FORMAT_S32_NE;
+ sh->sample_format = AF_FORMAT_S32;
break;
case MPG123_ENC_FLOAT_32:
- sh->sample_format = AF_FORMAT_FLOAT_NE;
+ sh->sample_format = AF_FORMAT_FLOAT;
break;
default:
/* This means we got a funny custom build of libmpg123 that only supports an unknown format. */
diff --git a/audio/filter/af_bs2b.c b/audio/filter/af_bs2b.c
index 769a2b4577..c4f826e856 100644
--- a/audio/filter/af_bs2b.c
+++ b/audio/filter/af_bs2b.c
@@ -135,7 +135,7 @@ static int control(struct af_instance *af, int cmd, void *arg)
break;
default:
af->play = play_f;
- mp_audio_set_format(af->data, AF_FORMAT_FLOAT_NE);
+ mp_audio_set_format(af->data, AF_FORMAT_FLOAT);
break;
}
diff --git a/audio/filter/af_center.c b/audio/filter/af_center.c
index ed482c7a6b..b64d5b54bd 100644
--- a/audio/filter/af_center.c
+++ b/audio/filter/af_center.c
@@ -50,7 +50,7 @@ static int control(struct af_instance* af, int cmd, void* arg)
af->data->rate = ((struct mp_audio*)arg)->rate;
mp_audio_set_channels_old(af->data, MPMAX(s->ch+1,((struct mp_audio*)arg)->nch));
- mp_audio_set_format(af->data, AF_FORMAT_FLOAT_NE);
+ mp_audio_set_format(af->data, AF_FORMAT_FLOAT);
return af_test_output(af,(struct mp_audio*)arg);
}
diff --git a/audio/filter/af_convert24.c b/audio/filter/af_convert24.c
index ee8aff5afc..0c3e6f8497 100644
--- a/audio/filter/af_convert24.c
+++ b/audio/filter/af_convert24.c
@@ -23,10 +23,10 @@
static bool test_conversion(int src_format, int dst_format)
{
- return (src_format == AF_FORMAT_U24_NE && dst_format == AF_FORMAT_U32_NE) ||
- (src_format == AF_FORMAT_S24_NE && dst_format == AF_FORMAT_S32_NE) ||
- (src_format == AF_FORMAT_U32_NE && dst_format == AF_FORMAT_U24_NE) ||
- (src_format == AF_FORMAT_S32_NE && dst_format == AF_FORMAT_S24_NE);
+ return (src_format == AF_FORMAT_U24 && dst_format == AF_FORMAT_U32) ||
+ (src_format == AF_FORMAT_S24 && dst_format == AF_FORMAT_S32) ||
+ (src_format == AF_FORMAT_U32 && dst_format == AF_FORMAT_U24) ||
+ (src_format == AF_FORMAT_S32 && dst_format == AF_FORMAT_S24);
}
static int control(struct af_instance *af, int cmd, void *arg)
diff --git a/audio/filter/af_drc.c b/audio/filter/af_drc.c
index 17c4a12a95..685dbcd8d5 100644
--- a/audio/filter/af_drc.c
+++ b/audio/filter/af_drc.c
@@ -91,8 +91,8 @@ static int control(struct af_instance* af, int cmd, void* arg)
mp_audio_force_interleaved_format((struct mp_audio*)arg);
mp_audio_copy_config(af->data, (struct mp_audio*)arg);
- if(((struct mp_audio*)arg)->format != (AF_FORMAT_S16_NE)){
- mp_audio_set_format(af->data, AF_FORMAT_FLOAT_NE);
+ if(((struct mp_audio*)arg)->format != (AF_FORMAT_S16)){
+ mp_audio_set_format(af->data, AF_FORMAT_FLOAT);
}
return af_test_output(af,(struct mp_audio*)arg);
case AF_CONTROL_COMMAND_LINE:{
@@ -296,14 +296,14 @@ static struct mp_audio* play(struct af_instance* af, struct mp_audio* data)
{
af_drc_t *s = af->setup;
- if(af->data->format == (AF_FORMAT_S16_NE))
+ if(af->data->format == (AF_FORMAT_S16))
{
if (s->method)
method2_int16(s, data);
else
method1_int16(s, data);
}
- else if(af->data->format == (AF_FORMAT_FLOAT_NE))
+ else if(af->data->format == (AF_FORMAT_FLOAT))
{
if (s->method)
method2_float(s, data);
diff --git a/audio/filter/af_equalizer.c b/audio/filter/af_equalizer.c
index 75a489d867..6aff565607 100644
--- a/audio/filter/af_equalizer.c
+++ b/audio/filter/af_equalizer.c
@@ -98,7 +98,7 @@ static int control(struct af_instance* af, int cmd, void* arg)
if(!arg) return AF_ERROR;
mp_audio_copy_config(af->data, (struct mp_audio*)arg);
- mp_audio_set_format(af->data, AF_FORMAT_FLOAT_NE);
+ mp_audio_set_format(af->data, AF_FORMAT_FLOAT);
// Calculate number of active filters
s->K=KM;
diff --git a/audio/filter/af_export.c b/audio/filter/af_export.c
index 5e1096f85a..6c1ea6459b 100644
--- a/audio/filter/af_export.c
+++ b/audio/filter/af_export.c
@@ -88,7 +88,7 @@ static int control(struct af_instance* af, int cmd, void* arg)
// Accept only int16_t as input format (which sucks)
mp_audio_copy_config(af->data, (struct mp_audio*)arg);
- mp_audio_set_format(af->data, AF_FORMAT_S16_NE);
+ mp_audio_set_format(af->data, AF_FORMAT_S16);
// If buffer length isn't set, set it to the default value
if(s->sz == 0)
diff --git a/audio/filter/af_extrastereo.c b/audio/filter/af_extrastereo.c
index 4561b60690..6a00fb7e65 100644
--- a/audio/filter/af_extrastereo.c
+++ b/audio/filter/af_extrastereo.c
@@ -51,12 +51,12 @@ static int control(struct af_instance* af, int cmd, void* arg)
mp_audio_copy_config(af->data, (struct mp_audio*)arg);
mp_audio_force_interleaved_format(af->data);
mp_audio_set_num_channels(af->data, 2);
- if (af->data->format == AF_FORMAT_FLOAT_NE)
+ if (af->data->format == AF_FORMAT_FLOAT)
{
af->play = play_float;
}// else
{
- mp_audio_set_format(af->data, AF_FORMAT_S16_NE);
+ mp_audio_set_format(af->data, AF_FORMAT_S16);
af->play = play_s16;
}
diff --git a/audio/filter/af_hrtf.c b/audio/filter/af_hrtf.c
index ed51351750..bfb619b040 100644
--- a/audio/filter/af_hrtf.c
+++ b/audio/filter/af_hrtf.c
@@ -311,7 +311,7 @@ static int control(struct af_instance *af, int cmd, void* arg)
}
else if (af->data->nch < 5)
mp_audio_set_channels_old(af->data, 5);
- mp_audio_set_format(af->data, AF_FORMAT_S16_NE);
+ mp_audio_set_format(af->data, AF_FORMAT_S16);
test_output_res = af_test_output(af, (struct mp_audio*)arg);
// after testing input set the real output format
mp_audio_set_num_channels(af->data, 2);
diff --git a/audio/filter/af_karaoke.c b/audio/filter/af_karaoke.c
index 8c633b136c..07ef0579bc 100644
--- a/audio/filter/af_karaoke.c
+++ b/audio/filter/af_karaoke.c
@@ -35,7 +35,7 @@ static int control(struct af_instance* af, int cmd, void* arg)
switch(cmd){
case AF_CONTROL_REINIT:
mp_audio_copy_config(af->data, (struct mp_audio*)arg);
- mp_audio_set_format(af->data, AF_FORMAT_FLOAT_NE);
+ mp_audio_set_format(af->data, AF_FORMAT_FLOAT);
return af_test_output(af,(struct mp_audio*)arg);
}
return AF_UNKNOWN;
diff --git a/audio/filter/af_ladspa.c b/audio/filter/af_ladspa.c
index df88c06ab2..50d0bb5d85 100644
--- a/audio/filter/af_ladspa.c
+++ b/audio/filter/af_ladspa.c
@@ -495,7 +495,7 @@ static int control(struct af_instance *af, int cmd, void *arg) {
/* accept FLOAT, let af_format do conversion */
mp_audio_copy_config(af->data, (struct mp_audio*)arg);
- mp_audio_set_format(af->data, AF_FORMAT_FLOAT_NE);
+ mp_audio_set_format(af->data, AF_FORMAT_FLOAT);
return af_test_output(af, (struct mp_audio*)arg);
case AF_CONTROL_COMMAND_LINE: {
diff --git a/audio/filter/af_lavfi.c b/audio/filter/af_lavfi.c
index 24ff8c5985..57a1055149 100644
--- a/audio/filter/af_lavfi.c
+++ b/audio/filter/af_lavfi.c
@@ -175,7 +175,7 @@ static int control(struct af_instance *af, int cmd, void *arg)
struct mp_audio *out = af->data;
if (af_to_avformat(in->format) == AV_SAMPLE_FMT_NONE)
- mp_audio_set_format(in, AF_FORMAT_FLOAT_NE);
+ mp_audio_set_format(in, AF_FORMAT_FLOAT);
if (!mp_chmap_is_lavc(&in->channels))
mp_chmap_reorder_to_lavc(&in->channels); // will always work
diff --git a/audio/filter/af_lavrresample.c b/audio/filter/af_lavrresample.c
index 2e298a3f39..9b4d8ca586 100644
--- a/audio/filter/af_lavrresample.c
+++ b/audio/filter/af_lavrresample.c
@@ -245,7 +245,7 @@ static int control(struct af_instance *af, int cmd, void *arg)
mp_audio_set_channels(out, &in->channels);
if (af_to_avformat(in->format) == AV_SAMPLE_FMT_NONE)
- mp_audio_set_format(in, AF_FORMAT_FLOAT_NE);
+ mp_audio_set_format(in, AF_FORMAT_FLOAT);
if (af_to_avformat(out->format) == AV_SAMPLE_FMT_NONE)
mp_audio_set_format(out, in->format);
diff --git a/audio/filter/af_pan.c b/audio/filter/af_pan.c
index 3d8c6045d0..29d38c3860 100644
--- a/audio/filter/af_pan.c
+++ b/audio/filter/af_pan.c
@@ -55,7 +55,7 @@ static int control(struct af_instance* af, int cmd, void* arg)
if(!arg) return AF_ERROR;
af->data->rate = ((struct mp_audio*)arg)->rate;
- mp_audio_set_format(af->data, AF_FORMAT_FLOAT_NE);
+ mp_audio_set_format(af->data, AF_FORMAT_FLOAT);
set_channels(af->data, s->nch ? s->nch: ((struct mp_audio*)arg)->nch);
if((af->data->format != ((struct mp_audio*)arg)->format) ||
diff --git a/audio/filter/af_scaletempo.c b/audio/filter/af_scaletempo.c
index c8560af502..659b7971f5 100644
--- a/audio/filter/af_scaletempo.c
+++ b/audio/filter/af_scaletempo.c
@@ -290,10 +290,10 @@ static int control(struct af_instance *af, int cmd, void *arg)
return af_test_output(af, data);
}
- if (data->format == AF_FORMAT_S16_NE) {
+ if (data->format == AF_FORMAT_S16) {
use_int = 1;
} else {
- mp_audio_set_format(af->data, AF_FORMAT_FLOAT_NE);
+ mp_audio_set_format(af->data, AF_FORMAT_FLOAT);
}
int bps = af->data->bps;
diff --git a/audio/filter/af_sinesuppress.c b/audio/filter/af_sinesuppress.c
index ef6fd7d37b..f241c5475a 100644
--- a/audio/filter/af_sinesuppress.c
+++ b/audio/filter/af_sinesuppress.c
@@ -57,15 +57,15 @@ static int control(struct af_instance* af, int cmd, void* arg)
mp_audio_copy_config(af->data, (struct mp_audio*)arg);
mp_audio_set_num_channels(af->data, 1);
#if 0
- if (((struct mp_audio*)arg)->format == AF_FORMAT_FLOAT_NE)
+ if (((struct mp_audio*)arg)->format == AF_FORMAT_FLOAT)
{
- af->data->format = AF_FORMAT_FLOAT_NE;
+ af->data->format = AF_FORMAT_FLOAT;
af->data->bps = 4;
af->play = play_float;
}// else
#endif
{
- mp_audio_set_format(af->data, AF_FORMAT_S16_NE);
+ mp_audio_set_format(af->data, AF_FORMAT_S16);
af->play = play_s16;
}
diff --git a/audio/filter/af_sub.c b/audio/filter/af_sub.c
index 4fd16904c9..cdb4c04ea3 100644
--- a/audio/filter/af_sub.c
+++ b/audio/filter/af_sub.c
@@ -72,7 +72,7 @@ static int control(struct af_instance* af, int cmd, void* arg)
af->data->rate = ((struct mp_audio*)arg)->rate;
mp_audio_set_channels_old(af->data, MPMAX(s->ch+1,((struct mp_audio*)arg)->nch));
- mp_audio_set_format(af->data, AF_FORMAT_FLOAT_NE);
+ mp_audio_set_format(af->data, AF_FORMAT_FLOAT);
// Design low-pass filter
s->k = 1.0;
diff --git a/audio/filter/af_surround.c b/audio/filter/af_surround.c
index efeecdc1e3..f06789eabe 100644
--- a/audio/filter/af_surround.c
+++ b/audio/filter/af_surround.c
@@ -98,7 +98,7 @@ static int control(struct af_instance* af, int cmd, void* arg)
return AF_DETACH;
}
- mp_audio_set_format(in, AF_FORMAT_FLOAT_NE);
+ mp_audio_set_format(in, AF_FORMAT_FLOAT);
mp_audio_copy_config(af->data, in);
mp_audio_set_channels_old(af->data, in->nch * 2);
diff --git a/audio/filter/af_sweep.c b/audio/filter/af_sweep.c
index c153d4261a..a06cad7600 100644
--- a/audio/filter/af_sweep.c
+++ b/audio/filter/af_sweep.c
@@ -42,7 +42,7 @@ static int control(struct af_instance* af, int cmd, void* arg)
switch(cmd){
case AF_CONTROL_REINIT:
mp_audio_copy_config(af->data, data);
- mp_audio_set_format(af->data, AF_FORMAT_S16_NE);
+ mp_audio_set_format(af->data, AF_FORMAT_S16);
return af_test_output(af, data);
case AF_CONTROL_COMMAND_LINE:
diff --git a/audio/filter/af_volume.c b/audio/filter/af_volume.c
index b0eef1865c..edf29d00f2 100644
--- a/audio/filter/af_volume.c
+++ b/audio/filter/af_volume.c
@@ -47,10 +47,10 @@ static int control(struct af_instance *af, int cmd, void *arg)
mp_audio_copy_config(af->data, in);
mp_audio_force_interleaved_format(af->data);
- if (s->fast && af_fmt_from_planar(in->format) != AF_FORMAT_FLOAT_NE) {
- mp_audio_set_format(af->data, AF_FORMAT_S16_NE);
+ if (s->fast && af_fmt_from_planar(in->format) != AF_FORMAT_FLOAT) {
+ mp_audio_set_format(af->data, AF_FORMAT_S16);
} else {
- mp_audio_set_format(af->data, AF_FORMAT_FLOAT_NE);
+ mp_audio_set_format(af->data, AF_FORMAT_FLOAT);
}
if (af_fmt_is_planar(in->format))
mp_audio_set_format(af->data, af_fmt_to_planar(af->data->format));
@@ -70,7 +70,7 @@ static void filter_plane(struct af_instance *af, void *ptr, int num_samples)
{
struct priv *s = af->priv;
- if (af_fmt_from_planar(af->data->format) == AF_FORMAT_S16_NE) {
+ if (af_fmt_from_planar(af->data->format) == AF_FORMAT_S16) {
int16_t *a = ptr;
int vol = 256.0 * s->level;
if (vol != 256) {
@@ -79,7 +79,7 @@ static void filter_plane(struct af_instance *af, void *ptr, int num_samples)
a[i] = MPCLAMP(x, SHRT_MIN, SHRT_MAX);
}
}
- } else if (af_fmt_from_planar(af->data->format) == AF_FORMAT_FLOAT_NE) {
+ } else if (af_fmt_from_planar(af->data->format) == AF_FORMAT_FLOAT) {
float *a = ptr;
float vol = s->level;
if (vol != 1.0) {
diff --git a/audio/fmt-conversion.c b/audio/fmt-conversion.c
index 93fda3eaa0..da770a8eda 100644
--- a/audio/fmt-conversion.c
+++ b/audio/fmt-conversion.c
@@ -27,10 +27,10 @@ static const struct {
int fmt;
} audio_conversion_map[] = {
{AV_SAMPLE_FMT_U8, AF_FORMAT_U8},
- {AV_SAMPLE_FMT_S16, AF_FORMAT_S16_NE},
- {AV_SAMPLE_FMT_S32, AF_FORMAT_S32_NE},
- {AV_SAMPLE_FMT_FLT, AF_FORMAT_FLOAT_NE},
- {AV_SAMPLE_FMT_DBL, AF_FORMAT_DOUBLE_NE},
+ {AV_SAMPLE_FMT_S16, AF_FORMAT_S16},
+ {AV_SAMPLE_FMT_S32, AF_FORMAT_S32},
+ {AV_SAMPLE_FMT_FLT, AF_FORMAT_FLOAT},
+ {AV_SAMPLE_FMT_DBL, AF_FORMAT_DOUBLE},
{AV_SAMPLE_FMT_U8P, AF_FORMAT_U8P},
{AV_SAMPLE_FMT_S16P, AF_FORMAT_S16P},
diff --git a/audio/format.c b/audio/format.c
index d0cd04cb88..3c22de476a 100644
--- a/audio/format.c
+++ b/audio/format.c
@@ -109,7 +109,6 @@ bool af_fmt_is_planar(int format)
#define FMT_ENDIAN(string, id) \
{string, id}, \
- {string "ne", id}, \
{string "le", MP_CONCAT(id, _LE)}, \
{string "be", MP_CONCAT(id, _BE)}, \
diff --git a/audio/format.h b/audio/format.h
index 9b855e4689..43f0da33f6 100644
--- a/audio/format.h
+++ b/audio/format.h
@@ -130,17 +130,6 @@ enum af_format {
AF_FORMAT_IEC61937 = AF_SELECT_LE_BE(AF_FORMAT_IEC61937_LE, AF_FORMAT_IEC61937_BE),
};
-#define AF_FORMAT_U16_NE AF_FORMAT_U16
-#define AF_FORMAT_S16_NE AF_FORMAT_S16
-#define AF_FORMAT_U24_NE AF_FORMAT_U24
-#define AF_FORMAT_S24_NE AF_FORMAT_S24
-#define AF_FORMAT_U32_NE AF_FORMAT_U32
-#define AF_FORMAT_S32_NE AF_FORMAT_S32
-#define AF_FORMAT_FLOAT_NE AF_FORMAT_FLOAT
-#define AF_FORMAT_DOUBLE_NE AF_FORMAT_DOUBLE
-#define AF_FORMAT_AC3_NE AF_FORMAT_AC3
-#define AF_FORMAT_IEC61937_NE AF_FORMAT_IEC61937
-
#define AF_FORMAT_IS_AC3(fmt) \
(((fmt) & AF_FORMAT_SPECIAL_MASK) == AF_FORMAT_S_AC3)
diff --git a/audio/out/ao_alsa.c b/audio/out/ao_alsa.c
index 86c813c143..a8df1c9f25 100644
--- a/audio/out/ao_alsa.c
+++ b/audio/out/ao_alsa.c
@@ -387,7 +387,7 @@ static int init(struct ao *ao)
ao->channels.num);
} else {
device = select_chmap(ao);
- if (strcmp(device, "default") != 0 && ao->format == AF_FORMAT_FLOAT_NE)
+ if (strcmp(device, "default") != 0 && ao->format == AF_FORMAT_FLOAT)
{
// hack - use the converter plugin (why the heck?)
device = talloc_asprintf(ao, "plug:%s", device);
@@ -435,7 +435,7 @@ static int init(struct ao *ao)
p->alsa_fmt = find_alsa_format(ao->format);
if (p->alsa_fmt == SND_PCM_FORMAT_UNKNOWN) {
p->alsa_fmt = SND_PCM_FORMAT_S16;
- ao->format = AF_FORMAT_S16_NE;
+ ao->format = AF_FORMAT_S16;
}
err = snd_pcm_hw_params_test_format(p->alsa, alsa_hwparams, p->alsa_fmt);
diff --git a/audio/out/ao_dsound.c b/audio/out/ao_dsound.c
index f828a210dc..ec5e83bd50 100644
--- a/audio/out/ao_dsound.c
+++ b/audio/out/ao_dsound.c
@@ -392,7 +392,7 @@ static int init(struct ao *ao)
int rate = ao->samplerate;
if (AF_FORMAT_IS_AC3(format))
- format = AF_FORMAT_AC3_NE;
+ format = AF_FORMAT_AC3;
else {
struct mp_chmap_sel sel = {0};
mp_chmap_sel_add_waveext(&sel);
@@ -400,7 +400,7 @@ static int init(struct ao *ao)
return -1;
}
switch (format) {
- case AF_FORMAT_AC3_NE:
+ case AF_FORMAT_AC3:
case AF_FORMAT_S24_LE:
case AF_FORMAT_S16_LE:
case AF_FORMAT_U8:
diff --git a/audio/out/ao_oss.c b/audio/out/ao_oss.c
index 09a2951629..b1f2028af2 100644
--- a/audio/out/ao_oss.c
+++ b/audio/out/ao_oss.c
@@ -89,14 +89,14 @@ static int format_table[][2] = {
{AFMT_S32_BE, AF_FORMAT_S32_BE},
#endif
#ifdef AFMT_FLOAT
- {AFMT_FLOAT, AF_FORMAT_FLOAT_NE},
+ {AFMT_FLOAT, AF_FORMAT_FLOAT},
#endif
// SPECIALS
#ifdef AFMT_MPEG
{AFMT_MPEG, AF_FORMAT_MPEG2},
#endif
#ifdef AFMT_AC3
- {AFMT_AC3, AF_FORMAT_AC3_NE},
+ {AFMT_AC3, AF_FORMAT_AC3},
#endif
{-1, -1}
};
@@ -269,7 +269,7 @@ static int init(struct ao *ao)
ac3_retry:
if (AF_FORMAT_IS_AC3(ao->format))
- ao->format = AF_FORMAT_AC3_NE;
+ ao->format = AF_FORMAT_AC3;
oss_format = format2oss(ao->format);
if (oss_format == -1) {
MP_VERBOSE(ao, "Unknown/not supported internal format: %s\n",
@@ -279,15 +279,15 @@ ac3_retry:
#else
oss_format = AFMT_S16_LE;
#endif
- ao->format = AF_FORMAT_S16_NE;
+ ao->format = AF_FORMAT_S16;
}
if (ioctl(p->audio_fd, SNDCTL_DSP_SETFMT, &oss_format) < 0 ||
oss_format != format2oss(ao->format))
{
MP_WARN(ao, "Can't set audio device %s to %s output, trying %s...\n",
p->dsp, af_fmt_to_str(ao->format),
- af_fmt_to_str(AF_FORMAT_S16_NE));
- ao->format = AF_FORMAT_S16_NE;
+ af_fmt_to_str(AF_FORMAT_S16));
+ ao->format = AF_FORMAT_S16;
goto ac3_retry;
}
diff --git a/audio/out/ao_portaudio.c b/audio/out/ao_portaudio.c
index 9c0d7804f8..fad1dc12d8 100644
--- a/audio/out/ao_portaudio.c
+++ b/audio/out/ao_portaudio.c
@@ -56,12 +56,12 @@ struct format_map {
static const struct format_map format_maps[] = {
// first entry is the default format
- {AF_FORMAT_S16_NE, paInt16},
- {AF_FORMAT_S24_NE, paInt24},
- {AF_FORMAT_S32_NE, paInt32},
- {AF_FORMAT_S8, paInt8},
- {AF_FORMAT_U8, paUInt8},
- {AF_FORMAT_FLOAT_NE, paFloat32},
+ {AF_FORMAT_S16, paInt16},
+ {AF_FORMAT_S24, paInt24},
+ {AF_FORMAT_S32, paInt32},
+ {AF_FORMAT_S8, paInt8},
+ {AF_FORMAT_U8, paUInt8},
+ {AF_FORMAT_FLOAT, paFloat32},
{AF_FORMAT_UNKNOWN, 0}
};