Class: TagLib::MPEG::File

Inherits:
File
  • Object
show all
Defined in:
docs/taglib/mpeg.rb

Overview

The file class for .mp3 and other MPEG files.

Instance Method Summary collapse

Methods inherited from File

#close

Constructor Details

#initialize(filename, read_properties = true) ⇒ File

Load an MPEG file.

Parameters:

  • filename (String)
  • read_properties (Boolean) (defaults to: true)

    if audio properties should be read



9
10
# File 'docs/taglib/mpeg.rb', line 9

def initialize(filename, read_properties=true)
end

Instance Method Details

#audio_propertiesTagLib::MPEG::Properties

Returns audio properties.



39
40
# File 'docs/taglib/mpeg.rb', line 39

def audio_properties
end

#id3v1_tag(create = false) ⇒ TagLib::ID3v1::Tag?

Returns the ID3v1 tag.

Parameters:

  • create (defaults to: false)

    if a new tag should be created when none exists

Returns:



25
26
# File 'docs/taglib/mpeg.rb', line 25

def id3v1_tag(create=false)
end

#id3v2_tag(create = false) ⇒ TagLib::ID3v2::Tag?

Returns the ID3v2 tag.

Parameters:

  • create (defaults to: false)

    if a new tag should be created when none exists

Returns:



33
34
# File 'docs/taglib/mpeg.rb', line 33

def id3v2_tag(create=false)
end

#tagTagLib::Tag?

Returns a tag that contains attributes from both the ID3v2 and ID3v1 tag, with ID3v2 attributes having precendence.

Returns:



17
18
# File 'docs/taglib/mpeg.rb', line 17

def tag
end