World of Hello
Public Member Functions | List of all members
CreateMusic Class Reference

create music. More...

#include <CreateMusic.h>

Public Member Functions

CreateMusic remove ()
 remove the music. More...
 
CreateMusic setVolume (float vol)
 sets the music volume. More...
 
float getVolume ()
 gets the music volume. More...
 
CreateMusic setPlayInBackground (bool playInBackground=true)
 sets whether or not the sound should play in the background. More...
 

Detailed Description

create music.

    Create a 2D musical sound. If the sound file does not exist,
    gets it from the server if it exists on the server. If the file
    is out of date from the server's file, it will be replaced.
    If the server file and the local file does not exist, the sound does not play.\n
    WARNING: streams music files <b>after</b> they've been downloaded.\n
    We are working on streaming music while they download, but it is not ready yet.\n
    We are also working on sound volume functions and 3D position functions. This object is the newest addition, so much is needed to be done.

Member Function Documentation

◆ getVolume()

float CreateMusic::getVolume ( )

gets the music volume.

Returns
the volume percentage (0-1.0).

◆ remove()

CreateMusic CreateMusic::remove ( )

remove the music.

   Destroys the music, stopping it from playing.
Returns
Returns itself.

◆ setPlayInBackground()

CreateMusic CreateMusic::setPlayInBackground ( bool  playInBackground = true)

sets whether or not the sound should play in the background.

Parameters
Whetheror not the sounds should play in the background.
Returns
Returns itself.

◆ setVolume()

CreateMusic CreateMusic::setVolume ( float  vol)

sets the music volume.

Parameters
thevolume percentage (0-1.0) to set.
Returns
Returns itself.