Skip to content

Commit

Permalink
documentation: dmg music master volume mention in importing assets guide
Browse files Browse the repository at this point in the history
  • Loading branch information
GValiente committed Nov 1, 2023
1 parent c40fa79 commit 646b3c0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions butano/include/bn_documentation.h
Original file line number Diff line number Diff line change
Expand Up @@ -1521,6 +1521,9 @@
* must be converted from 50Hz to 60Hz (`true` by default). This option is ignored when importing audio files
* with `*.s3m` and `*.vgm` extensions.
*
* The default DMG music master volume is set to 25% ( bn::dmg_music_master_volume::QUARTER ).
* If it sounds too quiet for you, you can change it via bn::dmg_music::set_master_volume.
*
*
* @subsection import_sound Sound effects
*
Expand Down
2 changes: 1 addition & 1 deletion docs/import.html
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ <h3>Contents</h3>
<span class="n">bn</span><span class="o">::</span><span class="n">dmg_music_items</span><span class="o">::</span><span class="k">module</span><span class="p">.</span><span class="n">play</span><span class="p">();</span></pre><p>You can accompany DMG music module files with a <code>*.json</code> file with the same name to specify import options.</p><p>An example of the <code>*.json</code> files for DMG music module files is the following:</p><pre class="m-code"><span class="p">{</span>
<span class="nt">&quot;import_instruments&quot;</span><span class="p">:</span> <span class="kc">false</span><span class="p">,</span>
<span class="nt">&quot;mod_speed_conversion&quot;</span><span class="p">:</span> <span class="kc">true</span>
<span class="p">}</span></pre><p>Available fields are the following:</p><ul><li><code>&quot;import_instruments&quot;</code>: optional field which specifies if channel 3 instruments must be imported when importing <code>*.s3m</code> module files, replacing the default instruments of GBT Player (<code>false</code> by default). This option is ignored when importing audio files with <code>*.mod</code> and <code>*.vgm</code> extensions.</li><li><code>&quot;mod_speed_conversion&quot;</code>: optional field which specifies if module files with <code>*.mod</code> extension speed must be converted from 50Hz to 60Hz (<code>true</code> by default). This option is ignored when importing audio files with <code>*.s3m</code> and <code>*.vgm</code> extensions.</li></ul></section><section id="import_sound"><h3><a href="#import_sound">Sound effects</a></h3><p>The required format for sound effects is waveform audio files (files with <code>*.wav</code> extension) without compression or anything weird. Besides, <em>I think</em> stereo files are not allowed.</p><p>The recommended quality for sound effects is 8-bits 22050 Hz.</p><p>If the conversion process has finished successfully, a bunch of <a href="classbn_1_1sound__item.html" class="m-doc">bn::<wbr />sound_item</a> objects under the <code>bn::sound_items</code> namespace should have been generated in the <code>build</code> folder for all sound files. You can use these items to play sound effects with only one line of C++ code:</p><pre class="m-code"><span class="cp">#include</span> <span class="cpf">&quot;bn_sound_items.h&quot;</span><span class="cp"></span>
<span class="p">}</span></pre><p>Available fields are the following:</p><ul><li><code>&quot;import_instruments&quot;</code>: optional field which specifies if channel 3 instruments must be imported when importing <code>*.s3m</code> module files, replacing the default instruments of GBT Player (<code>false</code> by default). This option is ignored when importing audio files with <code>*.mod</code> and <code>*.vgm</code> extensions.</li><li><code>&quot;mod_speed_conversion&quot;</code>: optional field which specifies if module files with <code>*.mod</code> extension speed must be converted from 50Hz to 60Hz (<code>true</code> by default). This option is ignored when importing audio files with <code>*.s3m</code> and <code>*.vgm</code> extensions.</li></ul><p>The default DMG music master volume is set to 25% ( bn::dmg_music_master_volume::QUARTER ). If it sounds too quiet for you, you can change it via <a href="namespacebn_1_1dmg__music.html#a55a100af3c116115bc03a2f57370eefd" class="m-doc">bn::<wbr />dmg_music::<wbr />set_master_volume</a>.</p></section><section id="import_sound"><h3><a href="#import_sound">Sound effects</a></h3><p>The required format for sound effects is waveform audio files (files with <code>*.wav</code> extension) without compression or anything weird. Besides, <em>I think</em> stereo files are not allowed.</p><p>The recommended quality for sound effects is 8-bits 22050 Hz.</p><p>If the conversion process has finished successfully, a bunch of <a href="classbn_1_1sound__item.html" class="m-doc">bn::<wbr />sound_item</a> objects under the <code>bn::sound_items</code> namespace should have been generated in the <code>build</code> folder for all sound files. You can use these items to play sound effects with only one line of C++ code:</p><pre class="m-code"><span class="cp">#include</span> <span class="cpf">&quot;bn_sound_items.h&quot;</span><span class="cp"></span>

<span class="n">bn</span><span class="o">::</span><span class="n">sound_items</span><span class="o">::</span><span class="n">sfx</span><span class="p">.</span><span class="n">play</span><span class="p">();</span></pre></section></section>
</div>
Expand Down

0 comments on commit 646b3c0

Please sign in to comment.