Class: Reporter::Record::Audio

Inherits:
Base
  • Object
show all
Defined in:
lib/reporter/record/audio.rb

Overview

Public: A record of audio state forming part of a report.

Instance Method Summary collapse

Methods inherited from Base

#==, #hash, #initialize

Constructor Details

This class inherits a constructor from Reporter::Record::Base

Instance Method Details

#avgObject Also known as: average

Public: Retrieves the average audio level for this record.

This will usually be negative. A value of zero means that the level is the loudest that can be detected by the microphone used.

Retrieves a Float representing the number of decibels that the

average audio level is compared to the maximum (clipping)
level of the microphone used.


29
30
31
# File 'lib/reporter/record/audio.rb', line 29

def avg
  @avg ||= @data["avg"].to_f
end

#peakObject

Public: Retrieves the peak audio level for this record.

This will usually be negative. A value of zero means that the level is the loudest that can be detected by the microphone used.

Retrieves a Float representing the number of decibels that the

peak audio level is compared to the maximum (clipping) level
of the microphone used.


16
17
18
# File 'lib/reporter/record/audio.rb', line 16

def peak
  @peak ||= @data["peak"].to_f
end