-
Notifications
You must be signed in to change notification settings - Fork 263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
playStream seems to ignore anything other than the URL specified in defineAudioSource #1940
Comments
Could you reproduce the example without using I don't think this is the proper place to debug |
Hah - ninja'd! :) This looks like a bug report (the Description field at the beginning is missing) against Wolph42's bag-of-tricks library token. This GitHub server is for bugs filed against MapTool, not user-created and user-supported library tokens. |
I can try to set that up, but note that (AFAI can tell), this is all native code other than the fact that Wolph programatically turns everything into a UDF during onCampaignLoad by prefixing stuff with "bot". Further, when I reported it to Wolph yesterday in the macro chat he tagged you Guillaume/Merudo with a request to take a look, as he felt I had a valid report. |
By no more than 10 seconds, too!
In this case, it should be very easy for you to change your replication steps to not depend on the |
Here you go. Here are the revised tests. I simplified the calls to playSource to spec only URL, cycleCount and volume. Problems still exist. Test 1: playSource using explicit args:
Expected: Looping audio and 1/4 volume Test 2: playSource using defineAudioSource
Expected: LOOP and 1/4 volume |
It's caused by not defining the
|
Concur. Not sure how I overlooked that in my test case (other than PEBKAC ), but further study indicates that there's still at least a documentation bug, in that https://lmwcs.com/rptools/wiki/defineAudioSource specifies that
If this is a designed/expected outcome (which, at least to me, was NOT expected) then the docs for defineAudioSource would benefit from an update to indicate this behavior will result if using any other value. Code to recreate the case where
|
To Reproduce
Using the code in Wolph42's mtplayer beta 27-02-20, setup the following:
In SETUP_SOUND:
[H: LINK = "https://jumpyip.com/Audio/Soundtracks/Critical%20Role/Boss%20Battle/Justin%20Bell%20-%20The%20Dragon%20Thrashed%20and%20Wailed.mp3"]
[h:defineAudioSource("Music_The_Dragon_Thrashed_and_Wailed", LINK, PRELOAD_MUSIC, CYCLES_MUSIC, VOLUME_MUSIC, START_MUSIC, STOP_MUSIC)]
The uppercase constants are as defaulted in SETUP_SOUND, but are "", -1, 0.5, 0, 0
Macro button 1 (plays music using the defineAudioSource entry)
[r:bot_globalStream("Music_The_Dragon_Thrashed_and_Wailed")]
Macro button 2 (plays music using explicit calling string)
[r:bot_globalStream("https://jumpyip.com/Audio/Soundtracks/Critical%20Role/Boss%20Battle/Justin%20Bell%20-%20The%20Dragon%20Thrashed%20and%20Wailed.mp3", -1, 0.5, 0, -1)]
Expected behavior
Both buttons SHOULD result in the same behavior: the music should play IN A LOOP and at HALF VOLUME.
Result #1: Song plays ONCE at FULL VOLUME and stops. (Should have played in a loop at half volume.)
Result #2: Song plays in LOOP at HALF VOLUME. (Expected behavior)
The flow of the globalStream macro is that it passes all args through to the localStream macro, which ultimately passes them to playStream. In test #1 playStream reaceives only the single arg (i.e. the tag name specified in defineAudioSource) whereas in test #2 it receives all the explicitly specified args.
MapTool Info
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: