Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 765751
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T16:56:14+00:00 2026-05-14T16:56:14+00:00

I have been experimenting with PulpCore, trying to create my own tower defence game

  • 0

I have been experimenting with PulpCore, trying to create my own tower defence game (not-playable yet), and I am enjoying it very much I ran into a problem that I can’t quite figure out. I extended PulpCore with the JOrbis thing to allow OGG files to be played. Works fine. However, pulpCore seems to have a problem with looping the sound WHILE animating the volume level. I tried this with wav file too, to make sure it isn’t jOrbis that breaks it. The code is like this:

Sound bgMusic = Sound.load("music/music.ogg");
Playback musicPlayback;
...

musicVolume = new Fixed(0.75);
musicPlayback = bgMusic.loop(musicVolume);
//TODO figure out why it's NOT looping when volume is animated
//  musicVolume.animate(0, musicVolume.get(), FADE_IN_TIME);

This code, for as long as the last line is commented out, plays the music.ogg again and again in an endless loop (which I can stop by calling stop on the Playback object returned from loop(). However, I would like the music to fade in smoothly, so following the advice of the PulpCore API docs, I added the last line which will create the fade-in but the music will only play once and then stop. I wonder why is that? Here is a bit of the documentation:

Playback
pulpcore.sound.Sound.loop(Fixed level)

Loops this sound clip with the
specified volume level (0.0 to 1.0).
The level may have a property
animation attached.

Parameters: level

Returns: a Playback object for this
unique sound playback (one Sound can
have many simultaneous Playback
objects) or null if the sound could
not be played.

So what could be the problem? I repeat, with the last line, the sound fades in but doesn’t loop, without it it loops but starts with the specified 0.75 volume level.
Why can’t I animate the volume of the looped music playback? What am I doing wrong? Anyone has any experience with pulpCore and has come across this problem? Anyone could please download PulpCore and try to loop music which fades-in (out)?

note: I need to keep a reference to the Playback object returned so I can kill music later.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T16:56:15+00:00Added an answer on May 14, 2026 at 4:56 pm

    Finally I managed to get an explanation and a simple work-around for this issue from the pulp core author. So here it is:

    It is a PulpCore bug. When the output
    volume is zero, the sound player stops
    looping the sound.

    To work around it, animate from a
    value that is not zero, like this:

    musicVolume.animate(0.0001, 1, FADE_IN_TIME); 
    

    Link to this on pulpcore Google groups

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been experimenting with Lambda expressions in Oxygene. Very simple recursive lambda expression
I have been experimenting with LINQ to XML and have run across a very
I have been experimenting and trying to learn JQuery, using AJAX to consume a
I have been experimenting with WPF and using a CustomControl have made my own
I own a server running whm / cpanel, and I have recently been experimenting
I have been experimenting with methods over the past couple of weeks trying to
I have been experimenting with OpenGL, trying to draw spheres inside and outside of
I have been experimenting with C++/CLI delegates (as I am trying to make a
I have been experimenting with woopra.com A web analytics tool. Which requires a piece
I have been experimenting with WPF and rendering strict XAML markup in a web

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.