-
Notifications
You must be signed in to change notification settings - Fork 44
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
WebGL #312
Conversation
@pema99 I only really need you to look at these changes |
Packages/com.llealloo.audiolink/Runtime/Materials/mat_AudioLink.mat
Outdated
Show resolved
Hide resolved
Packages/com.llealloo.audiolink/Runtime/Materials/mat_AudioLinkControllerScreenMaterial.mat
Outdated
Show resolved
Hide resolved
@@ -210,6 +214,25 @@ public partial class AudioLink : MonoBehaviour | |||
private int _Samples3R; | |||
// ReSharper restore InconsistentNaming | |||
|
|||
#if UNITY_WEBGL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file is already pretty crowded. Consider moving the WebGL specific stuff to a new file, like we do for the DataAPI already - AudioLink is a partial class
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we have to? is this blocking?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not blocking, but i think it would be nicer. Consider for a follow up
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure
Packages/com.llealloo.audiolink/Runtime/Scripts/AudioLinkController.cs
Outdated
Show resolved
Hide resolved
return _waveformSamplesRight; | ||
} | ||
|
||
public void SyncLeft(Action<float[]> FetchSamplesLeft) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not just regular setters?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
idk I think fundale wrote that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe change it? looks like a simple change to make
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fundale any reason you wrote it like this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fundale any reason you wrote it like this?
Not particularly,
A setter might work, I just did it the same way as this shim:
https://github.com/Lakistein/Unity-Audio-Visualizers
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmmm i tried today, my attempt didn't work ce64511, i'm confused about how the this syntax works
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (audioSource.isPlaying)
{
audioLinkWebPeer.WaveformSamplesLeft = FetchAnalyzerLeft(WebALID, new float[4096], 4096);
audioLinkWebPeer.WaveformSamplesRight = FetchAnalyzerRight(WebALID, new float[4096], 4096);
}
Should probably be
if (audioSource.isPlaying)
{
FetchAnalyzerLeft(WebALID, audioLinkWebPeer.WaveformSamplesLeft, 4096);
FetchAnalyzerRight(WebALID, audioLinkWebPeer.WaveformSamplesRight, 4096);
}
@float3 left some comments. Sorry it took so long |
Still wanna land this? There are a bunch of open comments |
@pema99 this branch is kinda horrible |
should we just land this and do some clean up on dev, I lowkey don't wanna redo all these changes for a new PR, especially since I want fundale to have attribution |
but I kinda fucked it up |
No description provided.