Exemple #1
0
 private void RdsFrameAvailableHandler(ref RdsFrame frame)
 {
     if (this._hookManager != null)
     {
         this._hookManager.ProcessRdsBitStream(ref frame);
     }
 }
Exemple #2
0
 public bool AnalyseFrames(ref RdsFrame frame)
 {
     bool flag1 = false;
       if (((int) frame.GroupB & 63488) == 8192)
       {
     int num = ((int) frame.GroupB & 15) * 4;
     bool flag2 = ((int) frame.GroupB >> 4 & 1) == 1;
     StringBuilder stringBuilder = new StringBuilder();
     stringBuilder.Append((char) ((uint) frame.GroupC >> 8));
     stringBuilder.Append((char) ((uint) frame.GroupC & (uint) byte.MaxValue));
     stringBuilder.Append((char) ((uint) frame.GroupD >> 8));
     stringBuilder.Append((char) ((uint) frame.GroupD & (uint) byte.MaxValue));
     if (Enumerable.Any<char>((IEnumerable<char>) stringBuilder.ToString(), (Func<char, bool>) (ch =>
     {
       if ((int) ch >= 32)
     return (int) ch > (int) sbyte.MaxValue;
       return true;
     })))
       return false;
     lock (this)
     {
       if (flag2 != this._radioTextABFlag)
       {
     for (int local_4 = 0; local_4 < this._radioTextSB.Length; ++local_4)
       this._radioTextSB[local_4] = ' ';
     this._radioTextABFlag = flag2;
       }
       else
     this._radioTextSB.Remove(num, 4);
       this._radioTextSB.Insert(num, stringBuilder.ToString());
       this._radioText = this._radioTextSB.ToString().Trim();
       this._piCode = frame.GroupA;
     }
     flag1 = true;
       }
       if (((int) frame.GroupB & 63488) == 0)
       {
     int num = ((int) frame.GroupB & 3) * 2;
     StringBuilder stringBuilder = new StringBuilder();
     stringBuilder.Append((char) ((uint) frame.GroupD >> 8));
     stringBuilder.Append((char) ((uint) frame.GroupD & (uint) byte.MaxValue));
     if (Enumerable.Any<char>((IEnumerable<char>) stringBuilder.ToString(), (Func<char, bool>) (ch =>
     {
       if ((int) ch >= 32)
     return (int) ch > (int) sbyte.MaxValue;
       return true;
     })))
       return false;
     lock (this)
     {
       this._programServiceSB.Remove(num, 2);
       this._programServiceSB.Insert(num, stringBuilder.ToString());
       this._programService = this._programServiceSB.ToString().Substring(0, 8);
       this._piCode = frame.GroupA;
     }
     flag1 = true;
       }
       return flag1;
 }
Exemple #3
0
        private void FrameAvailableHandler(ref RdsFrame frame)
        {
            RdsFrameAvailableDelegate rdsFrameAvailable = this.RdsFrameAvailable;

            if (rdsFrameAvailable != null)
            {
                rdsFrameAvailable(ref frame);
            }
        }
Exemple #4
0
 private void ProcessHooks(List <IRdsBitStreamProcessor> processors, ref RdsFrame frame)
 {
     lock (processors)
     {
         for (int i = 0; i < processors.Count; i++)
         {
             if (processors[i].Enabled)
             {
                 processors[i].Process(ref frame);
             }
         }
     }
 }
Exemple #5
0
 private void FrameAvailableHandler(ref RdsFrame frame)
 {
     RdsFrameAvailableDelegate availableDelegate = this.RdsFrameAvailable;
       if (availableDelegate == null)
     return;
       availableDelegate(ref frame);
 }
Exemple #6
0
 public void ProcessRdsBitStream(ref RdsFrame frame)
 {
     this.ProcessHooks(this._rdsBitStreamProcessors, ref frame);
 }
Exemple #7
0
 private void RdsFrameAvailableHandler(ref RdsFrame frame)
 {
     if (this._hookManager == null)
     return;
       this._hookManager.ProcessRdsBitStream(ref frame);
 }
Exemple #8
0
 public void ProcessRdsBitStream(ref RdsFrame frame)
 {
     this.ProcessHooks(this._rdsBitStreamProcessors, ref frame);
 }
Exemple #9
0
 private void ProcessHooks(List<IRdsBitStreamProcessor> processors, ref RdsFrame frame)
 {
     lock (processors)
       {
     for (int local_0 = 0; local_0 < processors.Count; ++local_0)
     {
       if (processors[local_0].Enabled)
     processors[local_0].Process(ref frame);
     }
       }
 }
Exemple #10
0
        public bool AnalyseFrames(ref RdsFrame frame)
        {
            bool result = false;

            if ((frame.GroupB & 0xF800) == 8192)
            {
                int           num           = (frame.GroupB & 0xF) * 4;
                bool          flag          = (frame.GroupB >> 4 & 1) == 1;
                StringBuilder stringBuilder = new StringBuilder();
                stringBuilder.Append((char)(frame.GroupC >> 8));
                stringBuilder.Append((char)(frame.GroupC & 0xFF));
                stringBuilder.Append((char)(frame.GroupD >> 8));
                stringBuilder.Append((char)(frame.GroupD & 0xFF));
                if (stringBuilder.ToString().Any(delegate(char ch)
                {
                    if (ch >= ' ')
                    {
                        return(ch > '\u007f');
                    }
                    return(true);
                }))
                {
                    return(false);
                }
                lock (this)
                {
                    if (flag != this._radioTextABFlag)
                    {
                        for (int i = 0; i < this._radioTextSB.Length; i++)
                        {
                            this._radioTextSB[i] = ' ';
                        }
                        this._radioTextABFlag = flag;
                    }
                    else
                    {
                        this._radioTextSB.Remove(num, 4);
                    }
                    this._radioTextSB.Insert(num, stringBuilder.ToString());
                    this._radioText = this._radioTextSB.ToString().Trim();
                    this._piCode    = frame.GroupA;
                }
                result = true;
            }
            if ((frame.GroupB & 0xF800) == 0)
            {
                int           num2           = (frame.GroupB & 3) * 2;
                StringBuilder stringBuilder2 = new StringBuilder();
                stringBuilder2.Append((char)(frame.GroupD >> 8));
                stringBuilder2.Append((char)(frame.GroupD & 0xFF));
                if (stringBuilder2.ToString().Any(delegate(char ch)
                {
                    if (ch >= ' ')
                    {
                        return(ch > '\u007f');
                    }
                    return(true);
                }))
                {
                    return(false);
                }
                lock (this)
                {
                    this._programServiceSB.Remove(num2, 2);
                    this._programServiceSB.Insert(num2, stringBuilder2.ToString());
                    this._programService = this._programServiceSB.ToString().Substring(0, 8);
                    this._piCode         = frame.GroupA;
                }
                result = true;
            }
            return(result);
        }