Audio:...erties(3pm)

πŸ“¦
version 0.11 Β· 2 versions
  • 0.11 Β· debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking (latest)
  • 0.11 Β· ubuntu jammy
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– Audio::File::AudioProperties β€” the perl manual page, but make it cute πŸ’–

okay so bestie, this is Audio::File::AudioProperties from the User Contributed Perl Documentation section (3pm), and it's genuinely one of those "you probably shouldn't touch this directly" situations, so let's get into it πŸŽ€


✨ NAME ✨

Audio::File::AudioProperties β€” abstract an audio files audio properties.

like, it's the vibe of an audio file's properties, made into a class. it does not play the song. it does not know the lyrics. it just knows the numbers πŸ’…


🌸 DESCRIPTION 🌸

Audio::File::AudioProperties is the base class for other file format independent audio property classes, like Audio::File::Flac::AudioProperties or Audio::File::Ogg::AudioProperties.

and here's the important part, no cap: you should not use this class yourself, except if you're writing your own file format dependent subclass. it's giving scaffolding energy. it's giving backstage pass. you are not meant to be here unless you're building the thing 🫢


πŸ¦‹ METHODS πŸ¦‹

new

Constructor. Creates new Audio::File::AudioProperties object.

do NOT call this one yourself, bestie. It's called by the filetype-dependant subclasses of Audio::File::Type automatically. the machinery handles it. stay out of the kitchen πŸ™ˆ

init

Initializes the object. It's called by the constructor and empty by default. It's ought to be overwritten by subclasses.

so like... it's a no-op placeholder that's politely waiting for you (or rather, a subclass) to fill it in. it's iconic in a "I do nothing and that's my job" way ✨

length

Returns the length of the audio file in seconds. ⏱️

bitrate

Returns the bitrate of the file.

sample_rate

Returns the sample rate of the audio file.

channels

Returns the number of channels the audio file has.

all

Get all audio properties. the whole bundle. the full set. one call, everything, slay πŸ‘‘


🌈 SEE ALSO 🌈

  • Audio::File
  • Audio::File::Type
  • Audio::File::Tag

go read those too, they're the rest of the friend group πŸ’œ


πŸ‘‘ AUTHOR πŸ‘‘

Florian Ragwitz <flora@cpan.org>


Copyright (C) 2004 Florian Ragwitz

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

lowkey important: that "no warranty" bit is real and it means what it says β€” the license genuinely disclaims merchantability and fitness for a particular purpose. not me being dramatic, that's just the text fr fr πŸ’€

and that's the whole page, bestie!! this one was perl v5.36.0, dated 2022-11-20, from the User Contributed Perl Documentation corner of the world πŸ¦‹βœ¨ mwah, go write a subclass responsibly πŸ’–