#include <ostream>
#include <stdint.h>
Go to the source code of this file.
  
  
      
        
          | static unsigned int roundUpPow2  | 
          ( | 
          unsigned int  | 
          n,  | 
         
        
           | 
           | 
          unsigned int  | 
          multiple  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inlinestatic   | 
  
 
- Author
 - cpellegrino 
 
Definition at line 13 of file infoword.hh.
   15   return (
n + multiple - 1) & ~(multiple - 1);
 
alias put_queue eval echo n
 
 
 
 
      
        
          | struct __attribute__  | 
          ( | 
          (__packed__)  | 
           | ) | 
           | 
        
      
 
Definition at line 18 of file infoword.hh.
   24   unsigned int ChannelMask()
 const 
   26     const static uint8_t mask = 0x60;
 
   27     return (mask & head) >> 5;
 
   30   unsigned int Amplitude()
 const 
   32     const static uint8_t mask = 0x18;
 
   33     return (mask & head) >> 3;
 
   38     const static uint8_t mask = 0x80;
 
   42   unsigned int amplitude()
 const 
   52   unsigned int timeInfo()
 const 
   54     return ntohl(TimeInfo);
 
   57   double samplingRate()
 const 
   59     const static double conv_factor = 1e6 / 128;
 
   60     return SamplingRate * conv_factor;
 
   63   unsigned int audioWordSize()
 const 
   65     unsigned int sample_size_bit = amplitude();
 
   68       sample_size_bit <<= 1;  
 
   70     const unsigned int size_bit = sample_size_bit + 8;
 
static unsigned int roundUpPow2(unsigned int n, unsigned int multiple)
 
 
 
 
  
  
      
        
          | std::ostream& operator<<  | 
          ( | 
          std::ostream &  | 
          stream,  | 
         
        
           | 
           | 
          const InfoWord &  | 
          iw  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inline   | 
  
 
Definition at line 80 of file infoword.hh.
   83       << 
"Is an InfoWord:        " << iw.Mark()                  << 
'\n' 
   84       << 
"ChannelMask:           " << iw.ChannelMask()           << 
'\n' 
   85       << 
"Amplitude:             " << iw.Amplitude()             << 
'\n' 
   86       << 
"Amplitude (human):     " << iw.amplitude() << 
" bit"   << 
'\n' 
   87       << 
"Sampling rate:         " << (uint32_t) iw.SamplingRate << 
'\n' 
   88       << 
"Sampling rate (human): " << iw.samplingRate() << 
" Hz" << 
'\n' 
   89       << 
"TimeInfo:              " << iw.timeInfo();
 
 
 
 
  
  
      
        
          | bool is_infoword  | 
          ( | 
          const void *const  | 
          data | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
Definition at line 93 of file infoword.hh.
   95   const static unsigned char mask = 0x80;
 
   96   const unsigned char* 
const p = 
static_cast<const unsigned char* const
>(