ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Audio-Play-MPG123/MPG123.pm
(Generate patch)

Comparing Audio-Play-MPG123/MPG123.pm (file contents):
Revision 1.1 by root, Fri May 18 12:49:05 2001 UTC vs.
Revision 1.2 by root, Tue Jul 16 14:44:04 2002 UTC

190 my $self = shift; 190 my $self = shift;
191 $self->{tpf}; 191 $self->{tpf};
192} 192}
193 193
194for my $field (qw(title artist album year comment genre state url 194for my $field (qw(title artist album year comment genre state url
195 type layer samplerate mode mode_extension bpf 195 type layer samplerate mode mode_extension bpf frame
196 channels copyrighted error_protected title artist album 196 channels copyrighted error_protected title artist album
197 year comment genre emphasis bitrate extension)) { 197 year comment genre emphasis bitrate extension)) {
198 *{$field} = sub { $_[0]{$field} }; 198 *{$field} = sub { $_[0]{$field} };
199} 199}
200 200
312 312
313This can be used to wait for the end of a song, for example. This function 313This can be used to wait for the end of a song, for example. This function
314should be called regularly, since mpg123 will stop playing when it can't 314should be called regularly, since mpg123 will stop playing when it can't
315write out events because the perl program is no longer listening... 315write out events because the perl program is no longer listening...
316 316
317=item title artist album year comment genre url type layer samplerate mode mode_extension bpf channels copyrighted error_protected title artist album year comment genre emphasis bitrate extension [CACHING] 317=item title artist album year comment genre url type layer samplerate mode mode_extension bpf frame channels copyrighted error_protected title artist album year comment genre emphasis bitrate extension [CACHING]
318 318
319These accessor functions return information about the loaded 319These accessor functions return information about the loaded
320song. Information about the C<artist>, C<album>, C<year>, C<comment> or 320song. Information about the C<artist>, C<album>, C<year>, C<comment> or
321C<genre> might not be available and will be returned as C<undef>. 321C<genre> might not be available and will be returned as C<undef>.
322 322
323The accessor function C<frame> returns a reference to an array containing
324the frames played, frames left, seconds played, and seconds left in this
325order. Seconds are returned as floating point numbers.
326
323=item tpf [CACHING] 327=item tpf [CACHING]
324 328
325Returns the "time per frame", i.e. the time in seconds for one frame. Useful with the C<jump>-method: 329Returns the "time per frame", i.e. the time in seconds for one frame. Useful with the C<jump>-method:
326 330
327 $player->jump (60/$player->tpf); 331 $player->jump (60/$player->tpf);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines