Blacksmith's Recent Forum Activity

  • Thanks Ashley, I really appreciate the help.

  • Ashley, thank you for looking into this. And my apologies for missing the Chrome browser, I'm not sure how that slipped by. But I'm glad you were able to test the problem more easily, using Chrome.

    Would it be possible to post the formula you're using for this. Maybe I can add something that will take the changing playback rate into account. Possibly by keeping a record of how often changes are made and/or how much the rate changes by. I'm using an exponential decay rate formula. So perhaps I could factor this in somehow, then set up my own version of the formula, using events.

    When I initially came across the problem, I tried a work-around using the "Audio.PlaybackTime % Audio.Duration" formula. I think I was getting close to a solution by deducting the percentage change (of the playback rate) from the PlaybackTime. It wasn't quite right, but if I can keep a record of the amount it has changed by, I can possibly use that information within the formula.

    Any help you can offer would be most welcome.

    Thanks

  • Ashley, thanks for your reply.

    I'm sure we used to be able to increase the dB level past 0 in C2. Here's a quote from the Audio section, in the Manual. You'll note that it does mention increasing the dB level above 0. This may be for information purposes only, but it does give the impression that it is possible.

    [quote:bl3565we]Set volume

    Change the volume of a sound. The volume is given in decibels (dB). A volume of 0 dB is original volume, above 0 dB amplifies the sound, and below 0 dB attenuates the sound. For example, entering a value of -10 plays the audio back 10 dB quieter (about half as loud).

    **Also please note, that I only increased the dB level by such a large amount, to make it absolutely obvious this was not working. I wouldn't make such large increases in my project normally!

  • Problem Description

    The Audio object does not register an increase in volume, when I set a sound file's dB level above 0. This prevents me from increasing the volume of my sound files above their original level. I have tried setting dB levels, both in the initial Audio "Play" action, and in the Audio "Set ("tag") volume" action. Minus values still work, but plus values are not registered above 0.

    Attach a Capx

    https://dl.dropboxusercontent.com/u/78057629/VolumeAdjustment.capx

    Description of Capx

    This capx plays a simple countdown audio track (e.g. 10... 9... 8... etc), in the "On start of layout" event. It has three buttons, which are all labelled. The first will reduce the audio tracks dB level to -20, the second will reset the dB level to 0, and the third will set it to +50.

    Steps to Reproduce Bug

    • To test the Audio "Play" action: (1) Enable one of the Audio "Play" actions (in the "On start of layout" event) and disable the other two. (2) Try step 1 for all three versions and you'll notice that dB settings above 0 do not sound any louder.
    • To test the Audio "Set ("tag") volume" action: (1) Enable the Audio "Play" action with it's dB level set to 0 (in the "On start of layout" event) and disable the other 2 options (note: this is currently set as the default option). (2) Run the layout and press the "Lower volume" / "Reset volume" / "Raise volume" buttons. Once again you will notice that dB settings above 0 do not register as being any louder.

    Observed Result

    Setting an audio files dB level above 0 has no affect on the volume of the audio track.

    Expected Result

    When increasing the audio files dB level above 0, I had expected the volume to increase.

    Affected Browsers

    • Chrome: (YES)
    • FireFox: (YES)
    • Internet Explorer: (YES)

    Operating System and Service Pack

    Windows 8.1 & 10

    Construct 2 Version ID

    version 212.2

  • Has anyone from the Scirra team had an opportunity to test this issue yet?

    Thanks

  • Sorry to hear that cranberrygame, your plugins are really useful.

    Good luck with whatever you do, and thanks for all of your hard work

  • Hi cranberrygame, great work on these plugins.

    I'd like to try the Power Management plugin, as I need to keep the phone awake for certain sections of my app. Does it work on both Android and iOS, and what about Windows?

    Also, do you have a direct link for it. I tried the link in your first post and looked through all of the available options/plugins. But I couldn't see the power management plugin anywhere. Is it part of a larger plugin, or have I just missed it?

    Thanks

  • Problem Description

    I'm using a looping audio track, with an adjusted playback rate. When I pause and resume the track (on a Cordova export / PhoneGap build) the track continues from the paused point. But then all subsequent loops always start from that same paused point. For example, if I pause the track halfway through, every other loop (after resuming) will always begin at the halfway point.

    Attach a Capx

    https://dl.dropboxusercontent.com/u/78057629/AudioLoopPauseTest.capx

    Description of Capx

    This capx plays a simple countdown audio loop (e.g. 10... 9... 8... etc) with a reducing playback rate. It has a pause button, which sets timescale to 0 and audio to paused.

    Steps to Reproduce Bug

    • Step 1: Export the project using the Cordova export option
    • Step 2: Zip exported files and upload to PhoneGap build
    • Step 3: Install resulting app on Android device
    • Step 4: Open app and allow it to play through a couple of loops, then press pause
    • Step 5: Press resume and continue listening to hear each new loop (incorrectly) start from the point where the app was originally paused

    Observed Result

    After pausing and resuming the looped track, every subsequent loop always starts from the point where the app was paused.

    Expected Result

    Audio pause and resume to function normally (as in browser)

    Affected Browsers

    • Chrome: NO
    • FireFox: NO
    • Internet Explorer: NO

    Operating System and Service Pack

    Tested on PC using Win 8.1 & 10 - worked correctly, as expected

    Tested on Android using HTC Desire (running Android 4.1.1) and Samsung Galaxy S5 (running Android 5.0) - did not work correctly (as explained in description)

    Construct 2 Version ID

    C2 version 212.2

  • Bump

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Bump

  • Hi All,

    I'm having a bit of a problem with C2's Audio object, when used on a PhoneGap build.

    I have a layout which plays a sound file (of a countdown 10... 9... 8... etc) and I have the sound file set to looping. I use a pause button on the same layout.

    When I pause the sound (on PhoneGap) it works fine. When I resume the track, the loop resets normally (i.e. to the point where the audio file was paused). But from then on the loop always starts from the point where the audio file was paused. So for example, if you pause the app at 5, when you resume, the loop would always then only play from 5 onwards.

    I don't know if this is a bug in C2 or not. I've taken a look at the Audio plugin and I'm guessing it has something to do with the way C2 loops audio files.

    I've added a capx, so you can see what's happening. But you need to try it through PhoneGap to see the same results.

    (capx: https://dl.dropboxusercontent.com/u/78057629/LoopPause.capx)

    This is a really important part of the project I'm working on. So I'd really appreciate it if anyone can offer some advice.

    Thanks

  • Hmmmm... sounds interesting. I'd be happy to pay for this service.

Blacksmith's avatar

Blacksmith

Member since 1 Apr, 2012

None one is following Blacksmith yet!

Connect with Blacksmith

Trophy Case

  • 12-Year Club
  • Email Verified

Progress

13/44
How to earn trophies