Mark McConnell > Audio-Mad-0.6 > Audio::Mad::Timer

Download:
Audio-Mad-0.6.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  0
View/Report Bugs
Source  

NAME ^

  Audio::Mad::Timer - Interface to mad_timer_t structure

SYPNOSIS ^

  my $timer = new Audio::Mad::Timer(15, 505, MAD_UNITS_MILLISECONDS);
  
  my $timer2 = $timer->new_copy();
  $timer2->set(31, 5, MAD_UNITS_CENTISECONDS);
  
  $timer->reset();
  $timer->negate();
  
  if ($timer->compare($timer2) == -1) { print "timer < timer2" }
  
  if ($timer2->sign() == -1) { 
        print "timer2 is < 0";
        $timer2->abs();
        print "timer2 is > 0";
  }
  
  $timer->add($timer2);
  $timer2->multiply(15);
  
  my $ms = $timer2->count(MAD_UNITS_MILLISECONDS);
  my $cs = $timer->fraction(MAD_UNITS_CENTISECONDS);

DESCRIPTION ^

  This package provides access to the underlying mad_timer_t data
  structure used in the decoder library.  It also provides several
  overloaded methods so you can treat the timer more like a
  fundamental data type than an object.

METHODS ^

AUTHOR ^

  Mark McConnell <mischke@cpan.org>
syntax highlighting: