Skip to content
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

Reverby Audio with Elgato Wave Link (and other devices?) #535

Closed
aza547 opened this issue Sep 24, 2024 · 13 comments
Closed

Reverby Audio with Elgato Wave Link (and other devices?) #535

aza547 opened this issue Sep 24, 2024 · 13 comments
Labels
bug Something isn't working

Comments

@aza547
Copy link
Owner

aza547 commented Sep 24, 2024

{C3B7A512-F4A8-4800-909F-48633F4EF57F}

@aza547
Copy link
Owner Author

aza547 commented Sep 24, 2024

I've saved off some diags on my desktop for this including an MP4 with the weird audio. Just a reminder to self that's in Desktop/Issue 535.

@aza547 aza547 added the bug Something isn't working label Sep 24, 2024
@aza547 aza547 changed the title Reverby Audio with Reverby Audio with Elgato Wave Link Sep 24, 2024
@aza547
Copy link
Owner Author

aza547 commented Sep 24, 2024

{3E35B7F5-937A-4BE4-BFCB-E76BE4EF2657}

@aza547
Copy link
Owner Author

aza547 commented Sep 24, 2024

Another user reported this with a different device also. Not using "Elgato Wave Link", but a physical "Razer Kraken V3 Pro" device.
image. So Maybe a wider bug.

@aza547
Copy link
Owner Author

aza547 commented Sep 24, 2024

Saw this log which looks suspicious...

[001:23:50:45.198.419.000][32484][Warning] Attempted to insert context with duplicate name "desktop-audio"! Name has been changed to "desktop-audio 2"

I think the cause of that is:

  private createOBSAudioSource(id: string, type: TAudioSourceType) {
    console.info('[Recorder] Creating OBS audio source', id, type);

    if (!this.obsInitialized) {
      throw new Error('[Recorder] OBS not initialized');
    }

    return osn.InputFactory.create(
      type, // This seems like a collision?
      type === TAudioSourceType.input ? 'mic-audio' : 'desktop-audio',
      { device_id: id }
    );
  }

Unclear if that log is actually related yet. I did manage to trigger the log by adding a second device. But might be just noise.

@aza547
Copy link
Owner Author

aza547 commented Sep 24, 2024

Also this I am not convinced is doing anything at all and probably can be removed? Again not sure if irrelevant.

    // Pretty sure these arguments are doing nothing.
    // See https://github.com/stream-labs/obs-studio-node/issues/1367.
    const track1 = osn.AudioTrackFactory.create(160, 'track1');
    osn.AudioTrackFactory.setAtIndex(track1, 1);

No sign of that in the SLOBS desktop client.

@aza547 aza547 changed the title Reverby Audio with Elgato Wave Link Reverby Audio with Elgato Wave Link (and other devices?) Sep 24, 2024
@aza547
Copy link
Owner Author

aza547 commented Oct 11, 2024

Can't reproduce this on my PC.

Comparing logs...

Mine:

[000:00:03:09.532.895.700][33828][Info] [CoreAudio AAC: 'adv_audio_recording_aac_0']: settings:
[000:00:03:09.532.895.700][33828][Info] 	mode:          AAC
[000:00:03:09.532.895.700][33828][Info] 	bitrate:       160
[000:00:03:09.532.895.700][33828][Info] 	sample rate:   44100
[000:00:03:09.532.895.700][33828][Info] 	cbr:           on
[000:00:03:09.532.895.700][33828][Info] 	output buffer: 1536

Users:

[000:00:00:00.737.146.800][10008][Warning] [CoreAudio encoder]: CoreAudio AAC encoder not installed on the system or couldn't be loaded

Apparently that's an apple thing. I might have it on my PC because of iTunes. Not totally clear. I've uninstalled everything apple related and retrying.

@aza547
Copy link
Owner Author

aza547 commented Oct 11, 2024

Removing iTunes stopped me using the CoreAudio AAC encoder. Still can't reproduce the reverby-ness though.

@aza547
Copy link
Owner Author

aza547 commented Oct 11, 2024

Also saw this in the logs, not clear if it's the cause but shows up as a critical error on the OBS log analyzer.

[000:09:37:50.069.085.500][24480][Warning] Max audio buffering reached!
[000:09:37:50.069.111.800][24480][Info] adding 1044 milliseconds of audio buffering, total audio buffering is now 1044 milliseconds (source: desktop-audio 2)
[000:09:37:50.069.111.800][24480][Info] 
[000:09:37:50.093.344.500][24480][Warning] Source desktop-audio 2 audio is lagging (over by 6498620.35 ms) at max audio buffering. Restarting source audio.

@aza547
Copy link
Owner Author

aza547 commented Oct 11, 2024

Out of ideas for now. Would be interesting to know if:

  • This happens after a fresh restart of WR or gradually gets worse throughout a session.
  • Happens 100% of the time, every time.
  • Anything changes after installing iTunes?

@aza547
Copy link
Owner Author

aza547 commented Oct 11, 2024

I tidied some stuff up in b8e95bc but not actually fixed anything I think.

@aza547
Copy link
Owner Author

aza547 commented Oct 11, 2024

Hmm saw a bunch of this sort of thing in logs also...

[2024-10-11 17:44:27.625] [info]  [Manager] Detected WoW is running
[2024-10-11 17:44:27.628] [info]  [Recorder] Removing OBS audio sources...
[2024-10-11 17:44:27.629] [info]  [Recorder] Removing OBS audio source WCR Mic Input 0 wasapi_input_capture
[2024-10-11 17:44:27.629] [info]  [Recorder] Removing OBS audio source WCR Speaker Input 0 wasapi_output_capture
[2024-10-11 17:44:27.630] [info]  [Recorder] Adding input source {0.0.1.00000000}.{4dd65c43-652e-4fe0-a72c-45e71b34bd2e} 0
[2024-10-11 17:44:27.630] [info]  [Recorder] Creating OBS audio source {0.0.1.00000000}.{4dd65c43-652e-4fe0-a72c-45e71b34bd2e} 0 wasapi_input_capture
[2024-10-11 17:44:27.634] [info]  [Recorder] Adding OBS audio source WCR Mic Input 0 wasapi_input_capture
[2024-10-11 17:44:27.635] [info]  [Recorder] Adding output source {0.0.0.00000000}.{8d4224c7-e9c7-4927-83d2-3cc062437b66}
[2024-10-11 17:44:27.635] [info]  [Recorder] Creating OBS audio source {0.0.0.00000000}.{8d4224c7-e9c7-4927-83d2-3cc062437b66} 0 wasapi_output_capture
[2024-10-11 17:44:27.637] [info]  [Recorder] Adding output source {0.0.0.00000000}.{c309c7e8-b2d6-4572-8cb9-97a4f9300e9d}
[2024-10-11 17:44:27.637] [info]  [Recorder] Creating OBS audio source {0.0.0.00000000}.{c309c7e8-b2d6-4572-8cb9-97a4f9300e9d} 1 wasapi_output_capture
[2024-10-11 17:44:27.639] [info]  [Recorder] Adding OBS audio source WCR Speaker Input 1 wasapi_output_capture
[2024-10-11 17:44:27.639] [info]  [Recorder] Adding OBS audio source WCR Speaker Input 0 wasapi_output_capture
[2024-10-11 17:44:27.639] [info]  [Recorder] Adding OBS audio source WCR Speaker Input 1 wasapi_output_capture
[2024-10-11 17:44:27.640] [info]  [Recorder] Queued start
[2024-10-11 17:44:27.641] [info]  [Recorder] Start
[2024-10-11 17:44:28.883] [info]  [Recorder] Got signal: {

That looks wrong, specifically it looks like we have added the same source twice?

Adding OBS audio source WCR Speaker Input 1 wasapi_output_capture

@aza547
Copy link
Owner Author

aza547 commented Oct 11, 2024

Looks promising. Adding and removing a speaker eventually trips the channel limit. Looks like something isn't being removed from the active sources array.

[2024-10-11 19:28:46.819] [warn]  [Recorder] Too many audio output devices, configuring first 5
[2024-10-11 19:28:46.819] [info]  [Recorder] Adding OBS audio source WCR Speaker Input 1 wasapi_output_capture
[2024-10-11 19:28:46.819] [info]  [Recorder] Adding OBS audio source WCR Speaker Input 1 wasapi_output_capture
[2024-10-11 19:28:46.820] [info]  [Recorder] Adding OBS audio source WCR Speaker Input 0 wasapi_output_capture
[2024-10-11 19:28:46.820] [info]  [Recorder] Adding OBS audio source WCR Speaker Input 1 wasapi_output_capture
[2024-10-11 19:28:46.820] [info]  [Recorder] Adding OBS audio source WCR Speaker Input 2 wasapi_output_capture

@aza547
Copy link
Owner Author

aza547 commented Oct 11, 2024

I narrowed it down to the forEach loop responsiible for removing the devices from the this.audioOutputDevices array. Still didn't spot it and so I asked chatGPT which reveleaed I am an idiot.

{AFA8B654-8223-46BB-A902-CA951C29C70B}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant