GSDP:GAM100/CProcessing/soundLoad()

From Inside
Jump to: navigation, search

soundLoad

Description

Loads a sound to be used in the program. Returns a created PSound if successful.

Parameters

soundLoad(const char* filepath)

  • filepath - (const char*) The filepath to the sound.

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:>