Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
  • solarus solarus
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 222
    • Issues 222
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 8
    • Merge requests 8
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Solarus Games
  • solarussolarus
  • Issues
  • #280

Closed
Open
Created Aug 27, 2013 by Christopho@christophoOwner

Add music features on sol.audio to allow more control on loops

Created by: Renkineko

When you want to loop an ogg music on a certain time, you can't so you have to cheat. One solution is to do it with two music : when the first (the intro) stops, you play the second. The only way to do it now is to use a timer, which lack of precision.

There is two way to enhance the way the engine play musics (because SPC and IT files are not very common or easy to create, unlike using free and open musics downloaded on FLAC or MP3 format and converted to OGG) :

  • add a function "sol.audio.add_queue(music)", behavior expected : when the current music reach the end, instead of loop on the same music, it plays the second and the loop go on the second file only. Pros : easy to use in my opinion.
  • add an event "sol.audio.on_music_finished()", triggered when the music reach the end. Pros : can be used to another thing than just a changing music (I don't have any example really relevant, but it could play another sound like a screaming monster or a cracking wall/floor, or stop a timer in a sound based enigma...)
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking