Class: AudioGlue::Template::HeadContext
- Inherits:
-
Object
- Object
- AudioGlue::Template::HeadContext
- Defined in:
- lib/audio_glue/template/head_context.rb
Overview
The context in which the head
statement of a .glue
template is executed. It’s used to set the format
, rate
and channels
on the template.
Instance Method Summary collapse
-
#channels(channels_value) ⇒ void
Set the number of channels on the template.
-
#format(format_value) ⇒ void
Set the audio format on the template (“mp3”, “ogg”, “wav”, etc).
-
#initialize(template) ⇒ HeadContext
constructor
A new instance of HeadContext.
-
#rate(rate_value) ⇒ void
Set the audio bitrate on the template.
Constructor Details
#initialize(template) ⇒ HeadContext
Returns a new instance of HeadContext.
8 9 10 |
# File 'lib/audio_glue/template/head_context.rb', line 8 def initialize(template) @template = template end |
Instance Method Details
#channels(channels_value) ⇒ void
This method returns an undefined value.
Set the number of channels on the template.
35 36 37 |
# File 'lib/audio_glue/template/head_context.rb', line 35 def channels(channels_value) @template.channels = channels_value end |
#format(format_value) ⇒ void
This method returns an undefined value.
Set the audio format on the template (“mp3”, “ogg”, “wav”, etc).
17 18 19 |
# File 'lib/audio_glue/template/head_context.rb', line 17 def format(format_value) @template.format = format_value end |
#rate(rate_value) ⇒ void
This method returns an undefined value.
Set the audio bitrate on the template.
26 27 28 |
# File 'lib/audio_glue/template/head_context.rb', line 26 def rate(rate_value) @template.rate = rate_value end |