Class: Wavesync::AudioFormat

Inherits:
Data
  • Object
show all
Defined in:
lib/wavesync/audio_format.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#bit_depthObject (readonly)

Returns the value of attribute bit_depth

Returns:

  • (Object)

    the current value of bit_depth



4
5
6
# File 'lib/wavesync/audio_format.rb', line 4

def bit_depth
  @bit_depth
end

#file_typeObject (readonly)

Returns the value of attribute file_type

Returns:

  • (Object)

    the current value of file_type



4
5
6
# File 'lib/wavesync/audio_format.rb', line 4

def file_type
  @file_type
end

#sample_rateObject (readonly)

Returns the value of attribute sample_rate

Returns:

  • (Object)

    the current value of 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



6
7
8
9
10
11
12
# File 'lib/wavesync/audio_format.rb', line 6

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
  )
end