#NEWLINE# def send( config , dst , volume_cmd = None , gain = 1.0 , limit = None ) : #NEWLINE# #INDENT# volume_ctl = volume_controller ( volume_cmd ) #NEWLINE# volume_ctl ( 1.0 ) #NEWLINE# calibration_symbols = int ( ( 1.0 * config . Fs ) ) #NEWLINE# t = ( np . arange ( 0 , calibration_symbols ) * config . Ts ) #NEWLINE# signals = [ ( gain * np . sin ( ( ( ( 2 * np . pi ) * f ) * t ) ) ) for f in config . frequencies ] #NEWLINE# signals = [ common . dumps ( s ) for s in signals ] #NEWLINE# for signal in itertools . islice ( itertools . cycle ( signals ) , limit ) : #NEWLINE# #INDENT# dst . write ( signal )