@@ -71,7 +71,6 @@ enum Role {
7171#[ derive( Clone , Debug , Default ) ]
7272pub struct Device {
7373 node_name : String ,
74- nick_name : String ,
7574 description : String ,
7675 direction : DeviceDirection ,
7776 channels : ChannelCount ,
@@ -98,7 +97,6 @@ impl Device {
9897 fn sink_default ( ) -> Self {
9998 Self {
10099 node_name : "sink_default" . to_owned ( ) ,
101- nick_name : "sink_default" . to_owned ( ) ,
102100 description : "default_sink" . to_owned ( ) ,
103101 direction : DeviceDirection :: Duplex ,
104102 channels : 2 ,
@@ -110,7 +108,6 @@ impl Device {
110108 fn input_default ( ) -> Self {
111109 Self {
112110 node_name : "input_default" . to_owned ( ) ,
113- nick_name : "input_default" . to_owned ( ) ,
114111 description : "default_input" . to_owned ( ) ,
115112 direction : DeviceDirection :: Input ,
116113 channels : 2 ,
@@ -122,7 +119,6 @@ impl Device {
122119 fn output_default ( ) -> Self {
123120 Self {
124121 node_name : "output_default" . to_owned ( ) ,
125- nick_name : "output_default" . to_owned ( ) ,
126122 description : "default_output" . to_owned ( ) ,
127123 direction : DeviceDirection :: Output ,
128124 channels : 2 ,
@@ -220,7 +216,7 @@ impl DeviceTrait for Device {
220216 }
221217
222218 fn description ( & self ) -> Result < DeviceDescription , Error > {
223- let mut builder = DeviceDescriptionBuilder :: new ( & self . nick_name )
219+ let mut builder = DeviceDescriptionBuilder :: new ( & self . description )
224220 . direction ( self . direction )
225221 . device_type ( self . device_type ( ) )
226222 . interface_type ( self . interface_type ) ;
@@ -230,9 +226,6 @@ impl DeviceTrait for Device {
230226 if let Some ( driver) = self . driver . as_ref ( ) {
231227 builder = builder. driver ( driver) ;
232228 }
233- if !self . description . is_empty ( ) && self . description != self . nick_name {
234- builder = builder. add_extended_line ( & self . description ) ;
235- }
236229 Ok ( builder. build ( ) )
237230 }
238231
@@ -938,10 +931,6 @@ pub fn init_devices(connect_automatically: Arc<AtomicBool>) -> Option<Vec<Device
938931 . get ( * pw:: keys:: NODE_DESCRIPTION )
939932 . unwrap_or ( "unknown" )
940933 . to_owned ( ) ;
941- let nick_name = props
942- . get ( * pw:: keys:: NODE_NICK )
943- . unwrap_or ( description. as_str ( ) )
944- . to_owned ( ) ;
945934 let channels = props
946935 . get ( * pw:: keys:: AUDIO_CHANNELS )
947936 . and_then ( |channels| channels. parse ( ) . ok ( ) )
@@ -993,7 +982,6 @@ pub fn init_devices(connect_automatically: Arc<AtomicBool>) -> Option<Vec<Device
993982
994983 let device = Device {
995984 node_name,
996- nick_name,
997985 description,
998986 direction,
999987 role,
0 commit comments