gb.sound.stop

Description

void gb.sound.stop( int8_t trackIdentifier )

gb.sound.stop will stop a given channel, as told via the track identifier.

Parameters

  • int8_t trackIdentifier: track to stop

Returns

none

Example

#include <Gamebuino-Meta.h>

int8_t track = -1; void setup() { gb.begin(); track = gb.sound.play("TEST.WAV", true); }

void loop() { while(!gb.update()); if (gb.buttons.pressed(BUTTON_A)) { // stop our track gb.sound.stop(track); } }