diff options
author | wm4 <wm4@nowhere> | 2013-11-15 21:25:05 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-11-15 21:25:05 +0100 |
commit | 514c4547702a01adb6f9e6274c40a77c7c511339 (patch) | |
tree | c307d2d60094521cee703cbe9510f0ff9037e96b /audio/out | |
parent | 2289a479b174efa062fab84a66075b49f27c804d (diff) | |
download | mpv-514c4547702a01adb6f9e6274c40a77c7c511339.tar.bz2 mpv-514c4547702a01adb6f9e6274c40a77c7c511339.tar.xz |
audio: drop "_NE"/"ne" suffix from audio formats
You get the native format by not appending any suffix to the format.
This change includes user-facing names, e.g. for the --format option.
Diffstat (limited to 'audio/out')
-rw-r--r-- | audio/out/ao_alsa.c | 4 | ||||
-rw-r--r-- | audio/out/ao_dsound.c | 4 | ||||
-rw-r--r-- | audio/out/ao_oss.c | 12 | ||||
-rw-r--r-- | audio/out/ao_portaudio.c | 12 |
4 files changed, 16 insertions, 16 deletions
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} }; |