public AudioReceiverAndPlayer(IDataProvider <byte[]> provider, ISamplePlayer player,
                               IDataAsByteConverter <DataModel> converter, IDataProcessingBuilder builder,
                               IGlobalNoiseController globalNoise,
                               DataCompressor compressor)
 {
     _provider  = provider;
     _player    = player;
     _converter = converter;
     _builder   = builder;
     Build();
     _provider.OnDataAvaliable += Provider_OnDataAvaliable;
     _noise      = globalNoise;
     _compressor = compressor;
 }
示例#2
0
 public AudioReaderAndSender(IMicrophone microphone,
                             IDataTransmitter transmitter,
                             IDataAsByteConverter <DataModel> converter,
                             DataCompressor compressor,
                             LocalToneController localToneController,
                             RadioSettings settings,
                             INetworkTaskManager networkTaskManager)
 {
     _senderId   = settings.NetworkToken;
     _microphone = microphone;
     _microphone.OnDataAvailable += OnSendDataAvailable;
     _transmitter         = transmitter;
     _converter           = converter;
     _compressor          = compressor;
     _localToneController = localToneController;
     _networkTaskManager  = networkTaskManager;
 }