In the active sound control problem a bounded domain is protected from noise generated outside via implementation of secondary sound sources on the perimeter. In the current paper we consider a quite general formulation in which sound sources are allowed to exist in the region to be shielded. The sound generated by the interior sources is considered as desired. It is required to remain it unaffected by the control in the protected area. This task proves to be much more complicated than the standard problem of active sound control because of the reverse effect of the controls on the input data. A novel practical algorithm is proposed that can be used for a real-time control. It accepts a preliminary tuning of the control system. In the algorithm the only input information eventually needed is the total acoustic field near the perimeter of the region to be shielded. It includes the contribution from both primary and secondary sources. In the algorithm the noise component to be attenuated is automatically extracted from the total acoustic field. The control system can potentially operate in a real-time regime since it only requires a consequent solution of a quadratic programming problem.