Class: Wavesync::AudioFormat
- Inherits:
-
Data
- Object
- Data
- Wavesync::AudioFormat
- Defined in:
- lib/wavesync/audio_format.rb
Instance Attribute Summary collapse
-
#bit_depth ⇒ Object
readonly
Returns the value of attribute bit_depth.
-
#bitrate ⇒ Object
readonly
Returns the value of attribute bitrate.
-
#file_type ⇒ Object
readonly
Returns the value of attribute file_type.
-
#sample_rate ⇒ Object
readonly
Returns the value of attribute sample_rate.
Instance Method Summary collapse
-
#initialize(file_type:, sample_rate:, bit_depth:, bitrate: nil) ⇒ AudioFormat
constructor
: (file_type: String?, sample_rate: Integer?, bit_depth: Integer?, ?bitrate: Integer?) -> void.
-
#merge(other) ⇒ Object
: (AudioFormat other) -> AudioFormat.
Constructor Details
#initialize(file_type:, sample_rate:, bit_depth:, bitrate: nil) ⇒ AudioFormat
: (file_type: String?, sample_rate: Integer?, bit_depth: Integer?, ?bitrate: Integer?) -> void
6 7 8 |
# File 'lib/wavesync/audio_format.rb', line 6 def initialize(file_type:, sample_rate:, bit_depth:, bitrate: nil) super end |
Instance Attribute Details
#bit_depth ⇒ Object (readonly)
Returns the value of attribute bit_depth
4 5 6 |
# File 'lib/wavesync/audio_format.rb', line 4 def bit_depth @bit_depth end |
#bitrate ⇒ Object (readonly)
Returns the value of attribute bitrate
4 5 6 |
# File 'lib/wavesync/audio_format.rb', line 4 def bitrate @bitrate end |
#file_type ⇒ Object (readonly)
Returns the value of attribute file_type
4 5 6 |
# File 'lib/wavesync/audio_format.rb', line 4 def file_type @file_type end |
#sample_rate ⇒ Object (readonly)
Returns the value of attribute sample_rate
4 5 6 |
# File 'lib/wavesync/audio_format.rb', line 4 def sample_rate @sample_rate end |
Instance Method Details
#merge(other) ⇒ Object
: (AudioFormat other) -> AudioFormat
11 12 13 14 15 16 17 18 |
# File 'lib/wavesync/audio_format.rb', line 11 def merge(other) with( file_type: other.file_type || file_type, sample_rate: other.sample_rate || sample_rate, bit_depth: other.bit_depth || bit_depth, bitrate: other.bitrate || bitrate ) end |