GSDP:GAM100/CProcessing/soundPlay()

From Inside
Jump to: navigation, search

soundPlay

Description

Plays a loaded sound. How the sound is played can be controlled more if you use soundPlayAdvanced().

Parameters

soundPlay(PSound sound, bool looping)

  • sound - (PSound) The loaded PSound to play.
  • looping - (bool) If the sound should loop infinitely.

Example

PSound mySound;
void init()
{
  mySound = soundLoad("./Assets/808cowbell.wav");
}

void update() 
{
  // If the left mouse is clicked, play the sound
  if (mouseClicked())
    soundPlay(mySound, false);
}

Related

Personal tools
Namespaces

Variants
Actions
Navigation
NameSpaces:>
Tools
Dynamic:>