Пример #1
0
 public override void DataProcessing(byte[] recievedData)
 {
     m_stream_Segment_Builder.BuildTheStreamSegment(recievedData, (segment) =>
     {
         TargetsAudio targetsAudio = m_audio_Stitcher.GetAudioForTargets(recievedData, m_streamInterpreter);
         m_audioDataBase.Save(targetsAudio);
     });
 }
        public TargetsAudio GetAudioForTargets(byte[] segment, IInterpreter <CasBeambusStruct> segmentInterpreter)
        {
            TargetsAudio targetsAudio = new TargetsAudio();

            if (m_targets != null)
            {
                foreach (var target in m_targets.systemTracks)
                {
                    CasBeambusStruct casBeambus  = segmentInterpreter.ByteArrayToStruct(segment);
                    byte[]           audio       = getTargetAudio(target, casBeambus);
                    TargetAudio      targetAudio = new TargetAudio((int)target.trackID, audio);
                    targetsAudio.TargetsAudioList.Add(targetAudio);
                }
            }

            return(targetsAudio);
        }