@babblevoice/projectrtp 2.4.15 → 2.4.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1027,22 +1027,20 @@ bool projectrtpchannel::mix( projectrtpchannel::pointer other ) {
|
|
|
1027
1027
|
if( nullptr == this->mixer && nullptr != other->mixer ) {
|
|
1028
1028
|
this->mixer = other->mixer;
|
|
1029
1029
|
this->mixer->addchannel( shared_from_this() );
|
|
1030
|
-
|
|
1030
|
+
|
|
1031
1031
|
} else if ( nullptr != this->mixer && nullptr == other->mixer ) {
|
|
1032
1032
|
other->mixer = this->mixer;
|
|
1033
1033
|
this->mixer->addchannel( other );
|
|
1034
|
-
|
|
1034
|
+
|
|
1035
1035
|
} else if( nullptr == this->mixer && nullptr == other->mixer ) {
|
|
1036
1036
|
this->mixer = projectchannelmux::create( workercontext );
|
|
1037
1037
|
other->mixer = this->mixer;
|
|
1038
1038
|
|
|
1039
1039
|
this->mixer->addchannels( shared_from_this(), other );
|
|
1040
|
-
postdatabacktojsfromthread( shared_from_this(), "mix", "start" );
|
|
1041
|
-
postdatabacktojsfromthread( other, "mix", "start" );
|
|
1042
1040
|
} else {
|
|
1043
1041
|
/* If we get here this and other are already mixing and should be cleaned up first */
|
|
1044
|
-
postdatabacktojsfromthread( shared_from_this(), "mix", "busy" );
|
|
1045
1042
|
RELEASESPINLOCK( this->mixerlock );
|
|
1043
|
+
postdatabacktojsfromthread( shared_from_this(), "mix", "busy" );
|
|
1046
1044
|
return false;
|
|
1047
1045
|
}
|
|
1048
1046
|
|
|
@@ -1053,6 +1051,9 @@ bool projectrtpchannel::mix( projectrtpchannel::pointer other ) {
|
|
|
1053
1051
|
|
|
1054
1052
|
RELEASESPINLOCK( this->mixerlock );
|
|
1055
1053
|
|
|
1054
|
+
postdatabacktojsfromthread( shared_from_this(), "mix", "start" );
|
|
1055
|
+
postdatabacktojsfromthread( other, "mix", "start" );
|
|
1056
|
+
|
|
1056
1057
|
return true;
|
|
1057
1058
|
}
|
|
1058
1059
|
|
|
@@ -808,17 +808,17 @@ describe( "dtmf", function() {
|
|
|
808
808
|
expect( dtmfcpkcount ).to.be.within( 4, 8 )
|
|
809
809
|
|
|
810
810
|
expect( receveiedmessages[ 0 ].action ).to.equal( "mix" )
|
|
811
|
-
|
|
812
|
-
expect( receveiedmessages[ 1 ].action ).to.equal( "telephone-event" )
|
|
811
|
+
expect( receveiedmessages[ 1 ].action ).to.equal( "mix" )
|
|
813
812
|
expect( receveiedmessages[ 2 ].action ).to.equal( "telephone-event" )
|
|
814
|
-
expect( receveiedmessages[ 3 ].action ).to.equal( "
|
|
815
|
-
expect( receveiedmessages[ 4 ].action ).to.equal( "
|
|
813
|
+
expect( receveiedmessages[ 3 ].action ).to.equal( "telephone-event" )
|
|
814
|
+
expect( receveiedmessages[ 4 ].action ).to.equal( "mix" )
|
|
815
|
+
expect( receveiedmessages[ 5 ].action ).to.equal( "close" )
|
|
816
816
|
|
|
817
|
-
//expect( receveiedmessages[ 0 ].event ).to.equal( "start" )
|
|
818
817
|
expect( receveiedmessages[ 0 ].event ).to.equal( "start" )
|
|
819
|
-
expect( receveiedmessages[ 1 ].event ).to.equal( "
|
|
820
|
-
expect( receveiedmessages[ 2 ].event ).to.equal( "
|
|
821
|
-
expect( receveiedmessages[ 3 ].event ).to.equal( "
|
|
818
|
+
expect( receveiedmessages[ 1 ].event ).to.equal( "start" )
|
|
819
|
+
expect( receveiedmessages[ 2 ].event ).to.equal( "4" )
|
|
820
|
+
expect( receveiedmessages[ 3 ].event ).to.equal( "5" )
|
|
821
|
+
expect( receveiedmessages[ 4 ].event ).to.equal( "finished" )
|
|
822
822
|
|
|
823
823
|
} )
|
|
824
824
|
|