Logo Search packages:      
Sourcecode: libjlayer-java version File versions  Download package

float javazoom::jl::decoder::Header::ms_per_frame (  )  [inline]

Returns ms/frame.

Returns:
milliseconds per frame

Definition at line 547 of file Header.java.

References frequency(), layer(), and MPEG2_LSF.

Referenced by bitrate(), and total_ms().

      {
            if (h_vbr == true)
            {                 
                  double tpf = h_vbr_time_per_frame[layer()] / frequency();
                  if ((h_version == MPEG2_LSF) || (h_version == MPEG25_LSF)) tpf /= 2;
                  return ((float) (tpf * 1000));
            }
            else
            {
                  float ms_per_frame_array[][] = {{8.707483f,  8.0f, 12.0f},
                                                                  {26.12245f, 24.0f, 36.0f},
                                                                  {26.12245f, 24.0f, 36.0f}};
                  return(ms_per_frame_array[h_layer-1][h_sample_frequency]);
            }
      }


Generated by  Doxygen 1.6.0   Back to index