Polycode can load and play sound files from WAV and OGG formats via the Sound class.
To load a sound file in Polycode, you can create a Sound class initialized with the path to the OGG or WAV format file to load.
Sound *demoSound = new Sound("demo.ogg");
demoSound = Sound("demo.ogg")
To play a loaded sound, call the Play method of the Sound class. If you want the sound playback to loop, pass true to the play method.
You can adjust sound properties, such as volume and pitch via the Sound class. To set volume, use the setVolume method, which takes a parameter from 0.0 to 1.0, with 0.0 being totally silent and 1.0 being at full volume.
To set the sound's pitch, use the setPitch method and pass it a new pitch value where 0.5 is half of the sound's original pitch and 2.0 is twice the original pitch.