Closed FireFox1121 closed 1 year ago
I must admit that I do not really test the command line.
The fixed version (with other fixes) is on the way...
GIT-Release will take a while. New JAR is online here: https://quippy.de/mod_en.php
Loop works fine now, but volume still not controlling. (But without argument error now)
And I think volume control should be like "ModContainer.PROPERTY_PLAYER_VOLUME", not hardcoded float parse from command-line.
Did the fix for the fix - sorry, volume and balance change cannot succeed when Source Line is not yet present, but was then not done again because value did not change. Please download again from https://quippy.de/mod_en.php
So far I do not intend to add the global line volume to a property. And to set it initially there must be some kind of setting from command line. I always have to parse that in some way.
Downloaded again, volume control still not work.
By the way, creating Mixer from code and using mixer.setVolume(0.4F);
not work properly too.
mixer.setBalance(0.8F);
also broken too.
But from GUI I can control the volume, not balance.
Cannot reproduce. Volume-control works with me: java -cp javamod.jar de.quippy.javamod.main.CommandLine -r48000 -b16 -s+ -i3 -t30 -w+ -n- -m+ -d- -l0 -a1024 -h- -j- -v0.1 MODFILE
It is quite silent then.... Maybe try V0.01 then? However it could be, that the line created on your machine does not support gain control. Cannot test that from here then.
Are you sure, you really re-downloaded and did nor receive the JAR file from the browser cache? File size should be 1,328,490 bytes
Yes, i re-downloaded JAR from website: Size: 1.3 MiB (1,328,490)
Parameter -v0.01 still not affect. Even -v0.0.
However it could be, that the line created on your machine does not support gain control. Cannot test that from here then.
But I can control volume from GUI and that work fine.
I am a bit lost then. As said, volume control via command line parameter works here now, so IMHO no coding problem. Which JDK-Version do you use on what OS? I am on windows 10 with openjdk 18.0.1.1
On the other hand, if it works with GUI, why not on command line...
I'm using Debian 12 with OpenJDK 17.
openjdk 17.0.7 2023-04-18
OpenJDK Runtime Environment (build 17.0.7+7-Debian-1deb12u1)
OpenJDK 64-Bit Server VM (build 17.0.7+7-Debian-1deb12u1, mixed mode, sharing)
OK, that should be fine - I will test on my OpenSuse tumbleweed later as I encountered some differences between windows and linux already.
But to give us a hint I added some output to the setVolume (error messages...) Please do me a favour and try that one. If things work, you should see an additional output like this one
SourceLine NULL, volume 0.1 NOT set (<-- this is indented, if it shows up only once) Volume 0.1 set
For some reason, I can change volume gain now.
Also using controls from code mixer.setVolume(0.2F)
and mixer.setBalance(1.0F)
works too.
Returns:
SourceLine NULL, volume 0.2 NOT set
Volume 0.2 set
Nice. Thanks for testing this.
I re-uploaded the version without the output. Release will be done later. After release I will close this one.
btw, I can't control volume gain and balance in 24 and 32 BITPERSAMPLE. But in 8 and 16 BITPERSAMPLE works fine.
The XM is now read correctly. It had instruments without samples and indicated that with 0xFFFF instead of 0 - but I read the amount of samples as "unsigned word" and got 65535 - not -1... Reading so many samples might end in a very long loop, till memory is out.
Uploaded the new jar.
Regarding the volume / balance control - it might be that you only have a physical 8 and 16 bit output line available - and when using 24 or 32 bit something funny happens or at least GAIN_control is not available for those lines. I have to dig into that one. I can check with 32 bit output line - I haven't that myself.
Well, I'll use 16 bitpersample then (i use bluetooth headset, maybe i only have 8/16 bit output line with control), and I closed issue about .XM file.
Also weird visual GUI thing on loop enabled: Timer not resetting to zero (continuing count) and progressbar still filled after end.
Also weird visual GUI thing on loop enabled: Timer not resetting to zero (continuing count) and progressbar still filled after end.
Yes, that is not nice, but currently not easy to avoid. The modmixer, which is doing the loop, does not "know" about the gui and the gui has no idea that the mod did a restart. I will make up my mind on that one.
btw, I can't control volume gain and balance in 24 and 32 BITPERSAMPLE. But in 8 and 16 BITPERSAMPLE works fine.
As I expected. On Windows I get a "Format not supported" when trying use 24 or 32 Bit depth. However, on Linux I will receive a line but that does not support MASTER_GAIN. So sorry, no help on that one possible...
Also weird visual GUI thing on loop enabled: Timer not resetting to zero (continuing count) and progressbar still filled after end.
Yes, that is not nice, but currently not easy to avoid. The modmixer, which is doing the loop, does not "know" about the gui and the gui has no idea that the mod did a restart. I will make up my mind on that one.
I fixed that for you. When mod is looping, timecode is now reset.
As all seems fixed to me, this is closed now. The release 3.5 is available now.
I was created a new project and tried this JAR as library in project, but I can't loop song:
I discovered
public static final int PLAYER_LOOP_LOOPSONG = 0x04;
flag, that I can set from GUI via "Loop song" in "Setup..." window, but i can't even set loop via command-line:./javamod-3.4.jar de.quippy.javamod.main.CommandLine -l4 ./TEST.XM
Also, i can't set volume in command-line:
./javamod-3.4.jar de.quippy.javamod.main.CommandLine -v0.4 ./TEST.XM
Returns: