User Tools

Site Tools


en:tutorials:audio:sound

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:tutorials:audio:sound [2012/03/01 11:13 (11 years ago)]
zera old revision restored
en:tutorials:audio:sound [2020/08/31 08:31 (24 months ago)] (current)
40.77.167.232 ↷ Links adapted because of a move operation
Line 3: Line 3:
 ===== Summary ===== ===== Summary =====
  
-See previous ​[[main#​Basic|basic tutorials]] for more info about basic [[object|object creation]], [[clock|clock handling]], [[frame|frames hierarchy]],​ [[anim|animations]] and [[viewport|cameras & viewports]].+See previous basic tutorials for more info about basic [[..:objects:object|object creation]], [[..:clocks:clock|clock handling]], [[..:objects:frame|frames hierarchy]],​ [[..:​animation:​anim|animations]] and [[..:​viewport:​viewport|cameras & viewports]].
  
 This tutorial shows how to play sounds (samples) and musics (streams).\\ This tutorial shows how to play sounds (samples) and musics (streams).\\
Line 32: Line 32:
 ===== Details ===== ===== Details =====
  
-As usual, we begin by loading our config file, getting the main clock and registering our ''​Update''​ function to it and, lastly, by creating our soldier object.\\ +As usual, we begin by creating a viewport, getting the main clock and registering our ''​Update''​ function to it and, lastly, by creating our soldier object.\\ 
-Please refer to the [[main#​Basic|previous tutorials]] for more details.+Please refer to the previous tutorials for more details.
  
 We then create a music and play it. We then create a music and play it.
Line 110: Line 110:
 This simple code, when activating the input ''​ToggleMusic'',​ will either start the music and activate our soldier if the music was not playing or, on the contrary, will stop it and deactivate our soldier if the music was playing. This simple code, when activating the input ''​ToggleMusic'',​ will either start the music and activate our soldier if the music was not playing or, on the contrary, will stop it and deactivate our soldier if the music was playing.
  
-Now, let'​s ​can change the pitch.+Now, let's change the pitch.
  
 <code c>​if(orxInput_IsActive("​PitchUp"​)) <code c>​if(orxInput_IsActive("​PitchUp"​))
Line 130: Line 130:
 Same as for the pitch, nothing unusual. Same as for the pitch, nothing unusual.
  
-//NB: We can notice that only our object rotation will be time-consistent (cf. [[clock|clock tutorial]]).\\+//NB: We can notice that only our object rotation will be time-consistent (cf. [[..:clocks:clock|clock tutorial]]).\\
 The music'​s pitch and volume, as well as the object'​s scale will be framerate-dependent,​ which is a bad idea.\\ The music'​s pitch and volume, as well as the object'​s scale will be framerate-dependent,​ which is a bad idea.\\
 To fix this we'd only need to use the clock'​s DT to ponderate the given values.// To fix this we'd only need to use the clock'​s DT to ponderate the given values.//
Line 168: Line 168:
 ===== Resources ===== ===== Resources =====
  
-Source code: [[https://orx.svn.sourceforge.net/svnroot/orx/trunk/​tutorial/​src/06_Sound/​06_Sound.c|06_Sound.c]] +Source code: [[https://github.com/orx/orx/blob/master/​tutorial/​src/​06_Sound.c|06_Sound.c]]
- +
-Config file: [[https://​orx.svn.sourceforge.net/​svnroot/​orx/​trunk/​tutorial/​bin/​06_Sound.ini|06_Sound.ini]]+
  
 +Config file: [[https://​github.com/​orx/​orx/​blob/​master/​tutorial/​bin/​06_Sound.ini|06_Sound.ini]]
en/tutorials/audio/sound.1330629188.txt.gz · Last modified: 2017/05/30 00:50 (5 years ago) (external edit)