-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from icywind/package_update
Package update
- Loading branch information
Showing
11 changed files
with
96 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
using Agora.Rtc; | ||
|
||
public class AgoraAudioObserver : IAudioFrameObserver | ||
{ | ||
ISoundVisualizer _visual; | ||
public AgoraAudioObserver(ISoundVisualizer visualizer) | ||
{ | ||
_visual = visualizer; | ||
} | ||
|
||
public override bool OnPlaybackAudioFrameBeforeMixing(string channel_id, | ||
uint uid, | ||
AudioFrame audio_frame) | ||
{ | ||
var floatArray = UtilFunctions.ConvertByteToFloat16(audio_frame.RawBuffer); | ||
_visual?.UpdateVisualizer(floatArray); | ||
return false; | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...s/TEN/Controllers/SoundVisualizer.cs.meta → ...EN/Controllers/AgoraAudioObserver.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
using UnityEngine; | ||
using Agora.Rtc; | ||
|
||
public abstract class ISoundVisualizer : MonoBehaviour | ||
{ | ||
abstract public void UpdateVisualizer(float[] pcmData); | ||
abstract public void Init(IRtcEngine RtcEngine); | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters