
This test shows how to play sound effects with an AudioBufferPlayer, and how to play music using an AudioStreamPlayer.
It also allows you to change some player properties and apply effects and filters.
If the nCine has been compiled with ImGui some of those properties can be tweaked with an interface.
Controls
- Pressing
Mon the keyboard orAon the gamepad will play or pause the music - Pressing
Spaceon the keyboard orBon the gamepad will play or pause the sound - Pressing
A/S/Dwill play/stop/pause the sound - Pressing
Lwill toggle sound looping - Pressing
Twill start or stop the stress test for audio sources
Change the pitch, gain, and horizontal position of the sound with the numeric keypad or the gamepad:
-
Pressing
KP7/KP8/KP9will decrease/reset/increase the pitch (use the right trigger on the gamepad) -
Pressing
KP4/KP5/KP6will decrease/reset/increase the gain (use the left trigger on the gamepad -
Pressing
KP1/KP2/KP3will decrease/reset/increase the horizontal position (use the left stick on the gamepad) -
Pressing
KP0on the keyboard orYon the gamepad will reset all properties to their default values -
Pressing the left/right arrow keys or D-pad directions, or the left bumper will change the music file
-
Pressing the up/down arrow keys or D-pad directions, or the right bumper will change the sound file
-
Pressing the
Starton the gamepad will start or stop the stress test for audio sources -
Use the mouse, the keyboard, the gamepad, or the touch screen to interact with the ImGui interface.
-
Pressing
CTRL + Hon the keyboard will show or hide the ImGui interface -
Pressing
Escapeon the keyboard will quit the application