[pulseaudio-commits] r1740 - /branches/lennart/src/pulse/channelmap.c
svnmailer-noreply at 0pointer.de
svnmailer-noreply at 0pointer.de
Fri Aug 31 03:45:17 PDT 2007
Author: lennart
Date: Fri Aug 31 12:45:16 2007
New Revision: 1740
URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=3D1740&root=3Dpulseaudio&vi=
ew=3Drev
Log:
add pa_channel_position_to_pretty_string() for usage in pavucontrol/pavumet=
er
Modified:
branches/lennart/src/pulse/channelmap.c
Modified: branches/lennart/src/pulse/channelmap.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/lennart/src/pulse/chan=
nelmap.c?rev=3D1740&root=3Dpulseaudio&r1=3D1739&r2=3D1740&view=3Ddiff
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- branches/lennart/src/pulse/channelmap.c (original)
+++ branches/lennart/src/pulse/channelmap.c Fri Aug 31 12:45:16 2007
@@ -90,13 +90,76 @@
=
[PA_CHANNEL_POSITION_TOP_CENTER] =3D "top-center",
=
+ [PA_CHANNEL_POSITION_TOP_FRONT_CENTER] =3D "top-front-center",
[PA_CHANNEL_POSITION_TOP_FRONT_LEFT] =3D "top-front-left",
[PA_CHANNEL_POSITION_TOP_FRONT_RIGHT] =3D "top-front-right",
- [PA_CHANNEL_POSITION_TOP_FRONT_CENTER] =3D "top-front-center",
-
+
+ [PA_CHANNEL_POSITION_TOP_REAR_CENTER] =3D "top-rear-center",
[PA_CHANNEL_POSITION_TOP_REAR_LEFT] =3D "top-rear-left",
- [PA_CHANNEL_POSITION_TOP_REAR_RIGHT] =3D "top-rear-right",
- [PA_CHANNEL_POSITION_TOP_REAR_CENTER] =3D "top-rear-center"
+ [PA_CHANNEL_POSITION_TOP_REAR_RIGHT] =3D "top-rear-right"
+};
+
+const char *const pretty_table[] =3D {
+ [PA_CHANNEL_POSITION_MONO] =3D "Mono",
+
+ [PA_CHANNEL_POSITION_FRONT_CENTER] =3D "Front Center",
+ [PA_CHANNEL_POSITION_FRONT_LEFT] =3D "Front Left",
+ [PA_CHANNEL_POSITION_FRONT_RIGHT] =3D "Front Right",
+
+ [PA_CHANNEL_POSITION_REAR_CENTER] =3D "Rear Center",
+ [PA_CHANNEL_POSITION_REAR_LEFT] =3D "Rear Left",
+ [PA_CHANNEL_POSITION_REAR_RIGHT] =3D "Rear Right",
+
+ [PA_CHANNEL_POSITION_LFE] =3D "Low Frequency Emmiter",
+
+ [PA_CHANNEL_POSITION_FRONT_LEFT_OF_CENTER] =3D "Front Left-of-center",
+ [PA_CHANNEL_POSITION_FRONT_RIGHT_OF_CENTER] =3D "Front Right-of-center=
",
+
+ [PA_CHANNEL_POSITION_SIDE_LEFT] =3D "Side Left",
+ [PA_CHANNEL_POSITION_SIDE_RIGHT] =3D "Side Right",
+
+ [PA_CHANNEL_POSITION_AUX0] =3D "Auxiliary 0",
+ [PA_CHANNEL_POSITION_AUX1] =3D "Auxiliary 1",
+ [PA_CHANNEL_POSITION_AUX2] =3D "Auxiliary 2",
+ [PA_CHANNEL_POSITION_AUX3] =3D "Auxiliary 3",
+ [PA_CHANNEL_POSITION_AUX4] =3D "Auxiliary 4",
+ [PA_CHANNEL_POSITION_AUX5] =3D "Auxiliary 5",
+ [PA_CHANNEL_POSITION_AUX6] =3D "Auxiliary 6",
+ [PA_CHANNEL_POSITION_AUX7] =3D "Auxiliary 7",
+ [PA_CHANNEL_POSITION_AUX8] =3D "Auxiliary 8",
+ [PA_CHANNEL_POSITION_AUX9] =3D "Auxiliary 9",
+ [PA_CHANNEL_POSITION_AUX10] =3D "Auxiliary 10",
+ [PA_CHANNEL_POSITION_AUX11] =3D "Auxiliary 11",
+ [PA_CHANNEL_POSITION_AUX12] =3D "Auxiliary 12",
+ [PA_CHANNEL_POSITION_AUX13] =3D "Auxiliary 13",
+ [PA_CHANNEL_POSITION_AUX14] =3D "Auxiliary 14",
+ [PA_CHANNEL_POSITION_AUX15] =3D "Auxiliary 15",
+ [PA_CHANNEL_POSITION_AUX16] =3D "Auxiliary 16",
+ [PA_CHANNEL_POSITION_AUX17] =3D "Auxiliary 17",
+ [PA_CHANNEL_POSITION_AUX18] =3D "Auxiliary 18",
+ [PA_CHANNEL_POSITION_AUX19] =3D "Auxiliary 19",
+ [PA_CHANNEL_POSITION_AUX20] =3D "Auxiliary 20",
+ [PA_CHANNEL_POSITION_AUX21] =3D "Auxiliary 21",
+ [PA_CHANNEL_POSITION_AUX22] =3D "Auxiliary 22",
+ [PA_CHANNEL_POSITION_AUX23] =3D "Auxiliary 23",
+ [PA_CHANNEL_POSITION_AUX24] =3D "Auxiliary 24",
+ [PA_CHANNEL_POSITION_AUX25] =3D "Auxiliary 25",
+ [PA_CHANNEL_POSITION_AUX26] =3D "Auxiliary 26",
+ [PA_CHANNEL_POSITION_AUX27] =3D "Auxiliary 27",
+ [PA_CHANNEL_POSITION_AUX28] =3D "Auxiliary 28",
+ [PA_CHANNEL_POSITION_AUX29] =3D "Auxiliary 29",
+ [PA_CHANNEL_POSITION_AUX30] =3D "Auxiliary 30",
+ [PA_CHANNEL_POSITION_AUX31] =3D "Auxiliary 31",
+
+ [PA_CHANNEL_POSITION_TOP_CENTER] =3D "Top Center",
+
+ [PA_CHANNEL_POSITION_TOP_FRONT_CENTER] =3D "Top Front Center",
+ [PA_CHANNEL_POSITION_TOP_FRONT_LEFT] =3D "Top Front Left",
+ [PA_CHANNEL_POSITION_TOP_FRONT_RIGHT] =3D "Top Front Right",
+
+ [PA_CHANNEL_POSITION_TOP_REAR_CENTER] =3D "Top Rear Center",
+ [PA_CHANNEL_POSITION_TOP_REAR_LEFT] =3D "Top Rear left",
+ [PA_CHANNEL_POSITION_TOP_REAR_RIGHT] =3D "Top Rear Right"
};
=
pa_channel_map* pa_channel_map_init(pa_channel_map *m) {
@@ -340,6 +403,13 @@
return NULL;
=
return table[pos];
+}
+
+const char* pa_channel_position_to_pretty_string(pa_channel_position_t pos=
) {
+ if (pos < 0 || pos >=3D PA_CHANNEL_POSITION_MAX)
+ return NULL;
+
+ return pretty_table[pos];
}
=
int pa_channel_map_equal(const pa_channel_map *a, const pa_channel_map *b)=
{
More information about the pulseaudio-commits
mailing list