---
name: "stop_sample"
section: "3alleg"
platform: "linux"
package: "liballegro-doc"
version: "2:4.2.2-2.2"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/stop_sample"
---

# stop\_sample(3alleg)

Stops a sample from playing. Allegro game programming library.

## NAME

stop\_sample - Stops a sample from playing. Allegro game programming library.

## SYNOPSIS

**#include \<allegro.h\>**

**void stop\_sample(const SAMPLE \*spl);**

## DESCRIPTION

Stop a sample from playing, which is required if you have set a sample going in looped mode. If there are several copies of the sample playing, it will stop them all. You must still destroy the sample using destroy\_sample().

## SEE ALSO

[**play\_sample**(3alleg)](/play_sample/3alleg.md), [**destroy\_sample**(3alleg)](/destroy_sample/3alleg.md)
