audioplayer wrapper
SNDPLAYER is a wrapper for the audioplayer in matlab. Provides
functionality for loop play and volume change. Works for MATLAB v 7.0.1 (R14) SP1.
SNDPLAYER('play', y, fs, nbits) plays signal y with sampling frequency fs and nbits quantization.
SNDPLAYER('play', y, fs, nbits, range) plays signal y with sampling
frequency fs and nbits quantization and uses two element vector range to define the range of the signal that will be played.
SNDPLAYER('play') plays the sound loaded in player (if available) with settings from sndplayer.
SNDPLAYER('stop') stops sndplayer.
SNDPLAYER('pause') pauses sndplayer.
SNDPLAYER('volume', vol) changes the volume of the player to the new value. Value of the volume is number from the range [0, 1]. Volume can be chabnged even if the sound is playing.
SNDPLAYER('loop') set the loop property of the player to 'on'.
SNDPLAYER('loop', 'on') enables the loop playing.
SNDPLAYER('loop', 'off') disables the loop playing, if the sound is
playing, it will be played to the end, or to the end of the range, then it will be stopped.
state = SNDPLAYER('state') gets actual state of the player. Returns 0 if player is stopped, 1 if it is playing and -1 if it is paused.
Zitieren als
Viliam Sabol (2024). audioplayer wrapper (https://www.mathworks.com/matlabcentral/fileexchange/27948-audioplayer-wrapper), MATLAB Central File Exchange. Abgerufen .
Kompatibilität der MATLAB-Version
Plattform-Kompatibilität
Windows macOS LinuxKategorien
- MATLAB > Data Import and Analysis > Data Import and Export > Standard File Formats > Audio and Video Data >
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Live Editor erkunden
Erstellen Sie Skripte mit Code, Ausgabe und formatiertem Text in einem einzigen ausführbaren Dokument.
Version | Veröffentlicht | Versionshinweise | |
---|---|---|---|
1.0.0.0 |