From 1ba5a8f283e3894158f12f025035903e13d0f8ae Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 2 Sep 2012 20:13:12 +0200 Subject: rawaudio: use mplayer audio format for format option The rawaudio demuxer had a rather hard to use way to set the audio format with the --rawaudio=format=value option. The user had to pass a numeric value, which then was set as wFormatTag member in the WAVEFORMATEX header. Make it use the mplayer audio format (the same as --af=format=value). Add a new internal pseudo audio codec tag, which is hopefully unused, which makes ad_pcm use the value in wFormatTag as internal mplayer audio format. Playing non-PCM formats is disabled. (At least AC3 can be played directly.) --- libaf/format.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libaf/format.h') diff --git a/libaf/format.h b/libaf/format.h index 36f5c3fb59..e60c0789b9 100644 --- a/libaf/format.h +++ b/libaf/format.h @@ -66,6 +66,8 @@ #define AF_FORMAT_IEC61937 (6<<6) #define AF_FORMAT_SPECIAL_MASK (7<<6) +#define AF_FORMAT_MASK ((1<<9)-1) + // PREDEFINED formats #define AF_FORMAT_U8 (AF_FORMAT_I|AF_FORMAT_US|AF_FORMAT_8BIT|AF_FORMAT_NE) -- cgit v1.2.3