Author Topic: One command triggers another but they are not linked  (Read 2083 times)

marcost

  • Newbie
  • *
  • Posts: 10
One command triggers another but they are not linked
« on: January 01, 2021, 09:03:55 AM »
Hi,

Long-time user here and can usually fix my own problems, but this one I can't.

I have one command that plays a music file at random from a folder. It loops so that a new song follows the previous. Works fine.

I have a second command that also plays sound files at random and looping, but these sound files are much shorter in time length than the music files. They are just short sound effects. Works fine too.

The problem: when I have both commands running, such that I can hear both music and the sound effects, I can no longer hear a full music track because the music files are switching every time the sound effect loop runs. 

I can see no link at all in the logic between the two commands. I tried the 'advanced experimental' 'do not execute this command if it's already running' on the music command, but it doesn't change anything.

Is this a limitation of sound playback or is there a solution?

Thanks in advance.

Martin

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: One command triggers another but they are not linked
« Reply #1 on: January 01, 2021, 11:44:11 AM »
Do you have the "Audio Output Type" option on the "Audio" tab of the VoiceAttack options window set to "Integrated Components"?


I'll assume you don't have the "This completes all other currently-playing sounds" option checked in your sound-playing actions.

marcost

  • Newbie
  • *
  • Posts: 10
Re: One command triggers another but they are not linked
« Reply #2 on: January 01, 2021, 12:07:08 PM »
Hi Pfeil,

Thanks for the reply.

Yes, audio is set to Integrated Components and I do not have "This completes all other currently-playing sounds" checked in either command.


Thanks,

M

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2832
Re: One command triggers another but they are not linked
« Reply #3 on: January 01, 2021, 12:53:51 PM »
Hi, Marcost

How many sound effect files are running simultaneously?  To conserve resources, there are only a certain number of sound players that can play at the same time before being reused.  The number is arbitrary, and could be increased in code (speculating on this - haven't actually gone through the code to verify).

marcost

  • Newbie
  • *
  • Posts: 10
Re: One command triggers another but they are not linked
« Reply #4 on: January 01, 2021, 01:07:05 PM »
Hi Gary,

Just the two sounds. I don't think it's that sort of limitation - both files are playing simultaneously, it's just that the music file is 'shuffled' each time the next random sound effect is triggered.

Thanks,

Martin

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2832
Re: One command triggers another but they are not linked
« Reply #5 on: January 01, 2021, 01:25:22 PM »
Hmmm -
What I would need for you to do to help resolve this (I know - pain for sure o_O) is to indicate step by step a way to reproduce the problem locally.  If I can reproduce the problem, I can usually figure something out pretty quickly (either coding solution, workaround or both).  A pared-down sample profile with instructions can help as well.

Something else to try would be to try to reproduce the problem within an empty profile, just to rule out that nothing else is interfering (plugin, startup commands, long-running commands, etc).

marcost

  • Newbie
  • *
  • Posts: 10
Re: One command triggers another but they are not linked
« Reply #6 on: January 01, 2021, 01:48:28 PM »
Thanks Gary,

I'll strip down the profile to those two commands and see if I can replicate. If so, I'll post it.

Regards

Martin

marcost

  • Newbie
  • *
  • Posts: 10
Re: One command triggers another but they are not linked
« Reply #7 on: January 02, 2021, 02:16:12 AM »
Hi,

Here is a simple profile that replicates the problem.

https://www.mediafire.com/file/ztfaonvefp2gv7c/sound_issue.7z/file

Put folders 'longSound' and 'shortSound' in c:\ root directory   (or change the link in the profile)
In the profile, press key 1 to start 'longSound'.
Press key 2 to start 'shortSound'.

'longSound' loop will execute every time 'shortSound' loop executes.

Press 3 to stop all sounds.

Thanks

Martin

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: One command triggers another but they are not linked
« Reply #8 on: January 02, 2021, 11:46:47 AM »
If I understand correctly, the moment "shortSound" is started, the sound from "longSound" should stop playing?

On my machine, the sound from "longSound" keeps playing, even if "shortSound" is executed multiple times (executing "longSound" multiple times also plays those sounds over eachother, even when combined with "shortSound")


Click the wrench icon on VoiceAttack's main window, and on the "General" tab of the VoiceAttack options window click "System info >", then choose "Generate Settings Summary"; Save the file and upload it here.

marcost

  • Newbie
  • *
  • Posts: 10
Re: One command triggers another but they are not linked
« Reply #9 on: January 02, 2021, 12:13:18 PM »
Hi,

No not correct - when shortSound starts, it should play over the top of the existing longSound. The problem is that the next shortSound also prompts the longSound loop, which means on my system you only ever hear a few seconds of each longSound even though they are several minutes long.

Settings file attached.

Regards

Martin

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: One command triggers another but they are not linked
« Reply #10 on: January 02, 2021, 12:22:43 PM »
If I understand correctly, the moment "shortSound" is started, the sound from "longSound" should stop playing?
As in, that is the issue you're experiencing, and should be replicated by this profile; Not that it's the desired result if everything were working as expected

when shortSound starts, it should play over the top of the existing longSound.
As mentioned, that is exactly what happens on my system


The "shortSound" command does not interact with the "longSound" command, aside from requiring "longSound" to be executed at least once in order to set the "longSound" variable to True

No matter how long the shortSound command runs, or how many times it's started, the longSound command keeps playing, on my machine.

marcost

  • Newbie
  • *
  • Posts: 10
Re: One command triggers another but they are not linked
« Reply #11 on: January 02, 2021, 12:26:03 PM »
Hi Pfeil,

I think our posts crossed, good to hear that it works for you - there must be a solution then!

Previous post has my config attached, hopefully the answer is there.

Regards,

M

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: One command triggers another but they are not linked
« Reply #12 on: January 02, 2021, 12:27:56 PM »
As it was an edit, this may have gotten lost, so I'll move it to this full post:

Does the issue occur if you output directly to your hardware output device, rather than through VoiceMeeter?

marcost

  • Newbie
  • *
  • Posts: 10
Re: One command triggers another but they are not linked
« Reply #13 on: January 02, 2021, 12:37:19 PM »
Your post made me check everything -  I hadn't got latest version of VA  :-[

Updated and works flawlessly. Great product and great support!

Thank you for your help and Happy New Year

Best regards,

Martin

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: One command triggers another but they are not linked
« Reply #14 on: January 02, 2021, 12:44:17 PM »
v1.8.7, which you were running at the time the settings summary was made, is the latest full release version. On my machine that works with the provided profile.

It could be a file got corrupted somehow, which the installer for the beta version you presumably installed overwrote.


If that works for you, all the better

marcost

  • Newbie
  • *
  • Posts: 10
Re: One command triggers another but they are not linked
« Reply #15 on: January 02, 2021, 12:45:41 PM »
Either way I'm a happy shopper, thanks again