@@ -40,8 +40,6 @@ bse_bus_init (BseBus *self)
40
40
self->set_flag (BSE_SOURCE_FLAG_PRIVATE_INPUTS);
41
41
self->left_volume = 1.0 ;
42
42
self->right_volume = 1.0 ;
43
- self->synced = TRUE ;
44
- self->saved_sync = self->synced ;
45
43
bse_sub_synth_set_null_shortcut (BSE_SUB_SYNTH (self), TRUE );
46
44
}
47
45
@@ -198,21 +196,6 @@ song_connect_master (BseSong *song,
198
196
}
199
197
}
200
198
201
- static gdouble
202
- center_volume (gdouble volume1,
203
- gdouble volume2)
204
- {
205
- if (volume1 > 0 && volume2 > 0 )
206
- {
207
- /* center volumes in decibel */
208
- volume1 = bse_db_from_factor (volume1, -200 );
209
- volume2 = bse_db_from_factor (volume2, -200 );
210
- return bse_db_to_factor ((volume1 + volume2) * 0.5 );
211
- }
212
- else
213
- return (volume1 + volume2) * 0.5 ;
214
- }
215
-
216
199
static void
217
200
bus_volume_changed (BseBus *self)
218
201
{
@@ -226,12 +209,8 @@ bus_volume_changed (BseBus *self)
226
209
}
227
210
else
228
211
{
229
- double lvolume = self->left_volume ;
230
- double rvolume = self->right_volume ;
231
- if (self->synced )
232
- lvolume = rvolume = center_volume (lvolume, rvolume);
233
- v1 = lvolume;
234
- v2 = rvolume;
212
+ v1 = self->left_volume ;
213
+ v2 = self->right_volume ;
235
214
}
236
215
g_object_set (self->bmodule , " volume1" , v1, " volume2" , v2, NULL );
237
216
}
@@ -721,17 +700,6 @@ bus_restore_add_input (gpointer data,
721
700
}
722
701
}
723
702
724
- static void
725
- bus_restore_start (BseObject *object,
726
- BseStorage *storage)
727
- {
728
- BseBus *self = BSE_BUS (object);
729
- self->saved_sync = self->synced ;
730
- /* support seperate left & right volumes */
731
- self->synced = FALSE ;
732
- BSE_OBJECT_CLASS (bus_parent_class)->restore_start (object, storage);
733
- }
734
-
735
703
static GTokenType
736
704
bus_restore_private (BseObject *object,
737
705
BseStorage *storage,
@@ -755,19 +723,6 @@ bus_restore_private (BseObject *object,
755
723
return BSE_OBJECT_CLASS (bus_parent_class)->restore_private (object, storage, scanner);
756
724
}
757
725
758
- static void
759
- bus_restore_finish (BseObject *object,
760
- guint vmajor,
761
- guint vminor,
762
- guint vmicro)
763
- {
764
- BseBus *self = BSE_BUS (object);
765
- /* restore real sync setting */
766
- auto impl = self->as <Bse::BusImpl*>();
767
- impl->sync (self->saved_sync );
768
- BSE_OBJECT_CLASS (bus_parent_class)->restore_finish (object, vmajor, vminor, vmicro);
769
- }
770
-
771
726
static void
772
727
bus_store_private (BseObject *object,
773
728
BseStorage *storage)
@@ -807,9 +762,7 @@ bse_bus_class_init (BseBusClass *klass)
807
762
808
763
object_class->editable_property = bse_bus_editable_property;
809
764
object_class->store_private = bus_store_private;
810
- object_class->restore_start = bus_restore_start;
811
765
object_class->restore_private = bus_restore_private;
812
- object_class->restore_finish = bus_restore_finish;
813
766
814
767
item_class->set_parent = bse_bus_set_parent;
815
768
item_class->get_candidates = bse_bus_get_candidates;
@@ -942,44 +895,24 @@ BusImpl::solo (bool is_solo)
942
895
bool
943
896
BusImpl::sync () const
944
897
{
945
- BseBus *self = const_cast <BusImpl*> (this )->as <BseBus*>();
946
-
947
- return self->synced ;
898
+ // sync property is no longer used, this is just compat code
899
+ return false ;
948
900
}
949
901
950
902
void
951
903
BusImpl::sync (bool val)
952
904
{
953
- BseBus *self = as<BseBus*>();
954
-
955
- if (val != self->synced )
956
- {
957
- auto prop = " sync" ;
958
- push_property_undo (prop);
959
-
960
- self->synced = val;
961
- if (self->synced )
962
- {
963
- self->left_volume = center_volume (self->right_volume , self->left_volume );
964
- self->right_volume = self->left_volume ;
965
- }
966
- bus_volume_changed (self);
967
-
968
- notify (" left_volume" );
969
- notify (" right_volume" );
970
- notify (" volume_db" );
971
- notify (" pan" );
972
- notify (prop);
973
- }
974
- self->saved_sync = self->synced ;
905
+ // sync property is no longer used, this is just compat code
906
+ if (val)
907
+ notify (" sync" );
975
908
}
976
909
977
910
double
978
911
BusImpl::left_volume () const
979
912
{
980
913
BseBus *self = const_cast <BusImpl*> (this )->as <BseBus*>();
981
914
982
- return self->synced ? center_volume (self-> left_volume , self-> right_volume ) : self-> left_volume ;
915
+ return self->left_volume ;
983
916
}
984
917
985
918
void
@@ -993,11 +926,6 @@ BusImpl::left_volume (double val)
993
926
push_property_undo (prop);
994
927
995
928
self->left_volume = CLAMP (val, 0 , 1000 );
996
- if (self->synced )
997
- {
998
- self->right_volume = self->left_volume ;
999
- notify (" right_volume" );
1000
- }
1001
929
bus_volume_changed (self);
1002
930
1003
931
notify (" volume_db" );
@@ -1011,7 +939,7 @@ BusImpl::right_volume() const
1011
939
{
1012
940
BseBus *self = const_cast <BusImpl*> (this )->as <BseBus*>();
1013
941
1014
- return self->synced ? center_volume (self-> left_volume , self-> right_volume ) : self-> right_volume ;
942
+ return self->right_volume ;
1015
943
}
1016
944
1017
945
void
@@ -1025,11 +953,6 @@ BusImpl::right_volume (double val)
1025
953
push_property_undo (prop);
1026
954
1027
955
self->right_volume = CLAMP (val, 0 , 1000 );
1028
- if (self->synced )
1029
- {
1030
- self->left_volume = self->right_volume ;
1031
- notify (" left_volume" );
1032
- }
1033
956
bus_volume_changed (self);
1034
957
1035
958
notify (" volume_db" );
0 commit comments