quisquous / cactbot

FFXIV TypeScript Raiding Overlay
Apache License 2.0
793 stars 383 forks source link

Question about audio #120

Closed mooztikette closed 3 years ago

mooztikette commented 6 years ago

Hi there, first of all thanks a ton for your hardwork.

I would like to know if it's possible to have cactbot's sounds follow ACT's sound?

I installed the slimdx_xaudio2 plugin for ACT to manually choose audio output device and it works great but cactbot seems to follow windows's default sound device :-(

Is there any way i can actually tell cactbot which audio device to use? Or just follow ACT's. Even if it implies adding some html/css/js code somewhere...

Thanks in advance for any help !

quisquous commented 6 years ago

cactbot is an embedded Chrome browser and it just plays sounds through Chrome. I don't think there's any way to get Chrome to do this.

As a workaround, have you tried anything like https://github.com/audiorouterdev/audio-router?

danakj commented 6 years ago

It's possible this might work https://stackoverflow.com/a/49847637 but also the CEF version is kinda old so idk.

On Sun, May 20, 2018, 3:52 PM Adrienne Walker notifications@github.com wrote:

cactbot is an embedded Chrome browser and it just plays sounds through Chrome and I don't think there's any way to get Chrome to do this.

As a workaround, have you tried anything like https://github.com/audiorouterdev/audio-router?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/quisquous/cactbot/issues/120#issuecomment-390506714, or mute the thread https://github.com/notifications/unsubscribe-auth/AAU5aV5q0qSqWgTfAhd5uh11JbGWya8Zks5t0clkgaJpZM4UGKHJ .

mooztikette commented 6 years ago

Thanks a lot for the replies !

Do you have any idea how i could test / setup those four lines of JS code? I think the third one requires a user's choosing, no?

const devices = await navigator.mediaDevices.enumerateDevices(); const audioDevices = devices.filter(device => device.kind === 'audiooutput'); const audio = document.querySelector('audio'); audio.setSinkId(audioDevices[0].deviceId);

Thanks again for the help :)

mooztikette commented 6 years ago

Oh forgot to mention that yes, i had tested audio-router but it made me have to reboot my computer, had no more sound when using directly on ACT, and could not finish the routing process of any application (only had tested on ACT and FFXIV, but anyway FFXIV never liked a sound device change while running).

I will test on Chrome but i think it will be the same because audio router is now really old and Windows 10 changed a lot of things...

mooztikette commented 6 years ago

I just tested audio-router on Chrome as well, i can confirm it's not working

Pirate144 commented 6 years ago

I use voicemeeter and slimdx_audio 2 to occasionally stream without having people watching the stream hearing ACT callouts.

I just have slimdx route ACT to a virtual audiocable that is then only set to my headphones. Works fine, people don't hear anything from my ACT at all, including cactbot.

mooztikette commented 6 years ago

@Pirate144 i don't know what voicemeeter does but i did the same as you, i got slimdx route ACT to one of my virtual audiocables but it seems to only work for triggers. All of cactbot's sounds keep following main audio device and can be heared on stream :-(

Is it because i don't use that voicemeeter?

Pirate144 commented 6 years ago

It's just a virtual audio cable program essentially. No idea why setting my slimdx also routes my cactbot but not yours. Here's an old example video of my streaming, haven't really done any since we finished progging awhile back.

https://www.twitch.tv/videos/244181549

Notice no ACT callouts at all (I also use game capture as to not capture ACT overlays, so no cactbot time line, or special spell timers on screen). And I have plenty of ACT callouts.

mooztikette commented 6 years ago

@Pirate144 Yeah there's definately not a single cactbot's sound on your stream.

I use game capture mode as well, and manually added the mopi mopi overlay on the stream by using the URL.

Trying to figure out why it works for you but not for me...

Is Chrome browser running while you play + stream? Or you use another browser?

Do you play borderless windowed or fullscreen?

Maybe i should use voicemeeter's virtual cables instead of the regular one (from the same website)?

quisquous commented 6 years ago

I'll try to take a look at using that code in cactbot, but between maintenance today, a new patch tomorrow, and me going out of town Thursday->Monday it'll probably be a bit of time before I can get to this.

mooztikette commented 6 years ago

@quisquous that would be awesome, thanks ! Take the time you need :)

mooztikette commented 6 years ago

Hey @Pirate144 i've been doing a lot of tests the past days and tried differents things, even tried Voicemeeter but it doesn't seem to work. I think there must be a setting somewhere that is causing it not to work for me... When you have some spare time would you mind trying to find it with me?

This is what i have in Streamlabs OBS as audio settings : obs_sesttings

I'm sending ACT's sounds to Cable-B input and Discord to Cable-A input, while Windows's default sound device is set to Cable input. screenshot_2

Does it seem like there is something wrong to you?

Pirate144 commented 6 years ago

Setup 2 lines for voice meeter. These will be called "Input" and "Aux input" by default.

Input will basically serve as your new windows audio (as in all audio sources), make sure to have this route to your headphones/speakers. Otherwise you will have no audio at all.

Aux Input will be programs you want to specifically send to their own channel (mostly for streaming or video recording), this could be ACT, Discord, Your music player of choice whatever you want. Make sure this line also is routed into your headphones/speakers. Just make sure you tell these specific audio channels to only go here (for ACT you would use the SlimDx plugin).

Now when you stream, select the "Input" audio source as your capture source, and you will capture the 90% of all default audio like normal, but be able to have those other "Aux input" sources only heard by you.

mooztikette commented 6 years ago

How do you specifically tell OBS / Streamlabs OBS to set audio input as the capture source? Or did you mean to specify the 1st voicemeeter line that you were talking about?

Pirate144 commented 6 years ago

Under the audio section choose "Voice meeter input" as your desktop audio device. Note I use normal OBS, no idea how the option looks under Streamlabs.

mooztikette commented 6 years ago

Ok ! They look pretty much the same actually for the most part :) Will be testing all of that today, thanks a lot for your time

mooztikette commented 6 years ago

Unless i'm mistaken, it appears that it takes the donated version of voicemeeter to have more than one virtual cable, right?

Pirate144 commented 6 years ago

Use voicemeeterpro.exe

I never paid for the program, nor pirated it. There should be 2 different exes, one of which (the pro version) should have more options, including a second virtual input line. The UI looks a bit different, like so https://i.imgur.com/chUDokv.png

mooztikette commented 6 years ago

Ok i think i've tried everything that was actually possible xD It just... wont work, maybe due to some differences like Windows version or something, i don't know. Cactbot's sounds wont follow ACT's sounds. I just got a trial license of CheVolume, it doesn't seem to have been updated in quite some time now, and is totally messed up and unstable, but i managed to actually have that work. If someone reads this and has been looking to have cactbot's sounds follow ACT as well while still having a hard time with CheVolume, you need to "re-do" the re-routing of ACT's sounds (in CheVolume) even though it looks like it kept what you had set up.

Thanks again for your time and help guys, i really appreciate it.

quisquous commented 6 years ago

It looks like OverlayPlugin depends on Xilium.CefGlue, and the current version of Chrome there is 45.0.2454.85. Unfortunately, due to https://github.com/RainbowMage/OverlayPlugin/issues/55, it is not trivial to update OverlayPlugin to newer versions of Chrome.

And, navigator.mediaDevices is only available in Chrome 47: https://www.chromestatus.com/feature/4906859072847872

So, I think this is not something that's possible to support in Javascript, unless there's some other method.

eestyle commented 6 years ago

@mooztikette May be a bit late, but If you have windows 10, then you can just change the output device for cactbot with windows built in sound setting. Open "settings" then "sound" then "other sound options". https://gyazo.com/5ffd001a13296ab0d38e94e851e99a21

You will need to activate the dummy test of cactbot in game (or just run content that will trigger cactbot to make sound) for a ACT icon called "Timeline Notice" to show up within and then just change it to whatever output device you would like. https://gyazo.com/d2f160c8712e9a427919a3cbf06267c9

Jbols92 commented 5 years ago

@eestyle Hey I tried that. I set my timeline sound to my headset and the sound does go to my headset. But for some reason its also going thru my virtual voice meter

eestyle commented 5 years ago

@Jbols92 As I am not sure what your setup is, I will detail my setup for your reference. I use razer synapse (razer surround) as my default windows sound output device (I guess this will be kinda similar in function as your voice meter). So in addition to what I mentioned in the previous post when I game and wanted to record game play with OBS where I do not want triggers and sound alerts to be recorded my setting are: (These are set within the software itself not under windows 10 sound settings) Windows default output: Razer Surround Audio Controller (Razer Synapse) Razer Synapse: Headset OBS Desktop Audio Device: Razer Surround Audio Controller (Razer Synapse) Discord Output: Razer (If I wanted to record voice chats) and Headset (when I don't)

One other thing to mention is that the TTS (be it from cactbot, built in trigger, Special Spell Speed, Ultra scouter etc..) and the "sound alerts" from cactbot are separate things. The method I mentioned in the previous post I only use it for the cactbot sound alerts and as for TTS I actually use act NUSOUND plugin to control TTS output devices https://github.com/zinx/NuSound (though setting through windows 10 should still be possible, I never tried as I had this plugin long before I installed cactbot).

If your setting are similar my suggestion is to change every programs' output under windows 10 sound setting to headset and then turn them back to whatever sound device they were on one by one and see which program is actually outputting cactbot to your virtual voice meter (could be chrome as quisquous did mention something about cactbot sounds are played through chrome though for me I don't have to change chrome's output device).

Jbols92 commented 5 years ago

@eestyle how do i get NuSound to work with my ACT?

quisquous commented 4 years ago

With the ngld overlayplugin having an updated version of chrome, it should be possible to allow for users to specify a different audio device now.

quisquous commented 3 years ago

Closing this old issue.