Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sound on/off in Sugarcube

How to turn a soundfile/music on/off in Subarcube 2.14?

The music is not on the internet but, will be provided as a file.

Comments

  • The <<audio>> macro documentation includes an example showing how to "Stop playback of all individual audio tracks"
  • Are you asking how to stop playback of tracks/playlists, how to mute audio, something else?

    Stopping playback
    If you want to stop playback, then it normally depends on which of the audio macros you used to initiate playback.

    For individual audio tracks, the <<audio>> macro has the stop action, which may be used to stop an individual track or multiple tracks.

    For playlists, the <<playlist>> macro has the stop action, which may be used to stop an individual playlist.

    For all playing audio, both individual tracks and playlists, the <<masteraudio>> macro has the stop action, which may be used to stop all audio regardless of which macro initiated playback.

    Muting audio
    You have the same options as with stopping playback, just use the mute action instead—unmute to reverse.
  • CX3CX3
    edited April 2017
    thx for your replies.

    I now applied the <<audio>> macro, as far as i understand it, but it doesn´t work. Twinery file and .mp3 are in the same folder.

    <<cacheaudio "bgm_space" "/filename.mp3">>


    <<audio "bgm_space" play>>

    text

    How does it work correctly?
  • Please use the code tag when posting examples - it's the C on the editor bar.
    CX3 wrote: »
    "/filename.mp3"
    Including a forward slash / at the start of a URL indicate that the file is located in the root folder of the current drive (or the root folder of the web-server if hosted).

    windows ex. if your story HTML is saved as C:\mystory\adventure.html then the above URL is indicating the audio file is stored as C:\filename.mp3

    Removing the forward slash at the start of your URL will cause the system to look for it in the same folder as the story HTML file.

    windows ex. if your story HTML is saved as C:\mystory\adventure.html then the above URL without the forward slash indicates the audio file is stored as C:\mystory\filename.mp3
  • Its working, now, thank you!
Sign In or Register to comment.