Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Submit feedback
  • Sign in
joeylib
joeylib
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 11
    • Issues 11
    • List
    • Boards
    • Labels
    • Milestones
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
  • Public Skunkworks
  • joeylibjoeylib
  • Wiki
  • JoeyLib Sound Functions

JoeyLib Sound Functions

Last edited by Scott Duensing Sep 06, 2018
Page history

At the moment, JoeyLib supports music in the Amiga MOD format. This may change to MIDI with instrument samples. Stay tuned!

jlSoundFree

void jlSoundFree(jlSoundT *sound);

Releases the memory used by sound.

jlSoundIsPlaying

bool jlSoundIsPlaying(jlSoundT *sound);

Returns true if sound is currently playing on any channel.

jlSoundLoad

bool jlSoundLoad(jlSoundT sound, char *filename);

(Note: This prototype isn't entirely accurate. No pointer crazyness is needed to pass the sound into this function.) Returns true if the file filename was loaded into memory. The handle to the sound is allocated and returned as sound.

jlSoundMusicContinue

void jlSoundMusicContinue(void);

Resumes music playback if it was previously paused.

jlSoundMusicIsPlaying

bool jlSoundMusicIsPlaying(void);

Returns true if music is currently being played.

jlSoundMusicPause

void jlSoundMusicPause(void);

Pauses the music if it is currently being played.

jlSoundMusicPlay

void jlSoundMusicPlay(char *name);

Loads and plays name. Since the actual format of the music data varies on different platforms, do not specify a filename extension for name.

jlSoundMusicStop

void jlSoundMusicStop(void);

Stops any currently playing music and releases the memory it occupied.

jlSoundPlay

void jlSoundPlay(jlSoundT *sound);

Plays a previously loaded sound on the first available channel. If all channels are currently in use, the request to play the sound is ignored.

Clone repository
  • Installation
  • JoeyLib API
  • JoeyLib Concepts
  • JoeyLib Data Types
  • JoeyLib Definitions
  • JoeyLib Display Functions
  • JoeyLib Drawing Functions
  • JoeyLib Enumerations
  • JoeyLib Formats
  • JoeyLib Gamepad Functions
  • JoeyLib Keyboard Functions
  • JoeyLib Memory Functions
  • JoeyLib Palette Functions
  • JoeyLib Sound Functions
  • JoeyLib Static Image Functions
View All Pages