Funk-effekt und Mikrifon-Einstellungen hinzugefügt
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
import { AudioTrack, RemoteAudioTrack, RemoteTrack } from "livekit-client";
|
||||
|
||||
// Helper function for distortion curve generation
|
||||
function createDistortionCurve(amount: number): Float32Array {
|
||||
const k = typeof amount === "number" ? amount : 50;
|
||||
@@ -14,12 +12,10 @@ function createDistortionCurve(amount: number): Float32Array {
|
||||
return curve;
|
||||
}
|
||||
|
||||
export const getRadioStream = (track: RemoteAudioTrack, volume: number): MediaStream | null => {
|
||||
export const getRadioStream = (stream: MediaStream, volume: number): MediaStream | null => {
|
||||
try {
|
||||
const audioContext = new window.AudioContext();
|
||||
const sourceNode = audioContext.createMediaStreamSource(
|
||||
new MediaStream([track.mediaStreamTrack]),
|
||||
);
|
||||
const sourceNode = audioContext.createMediaStreamSource(stream);
|
||||
const destinationNode = audioContext.createMediaStreamDestination();
|
||||
const gainNode = audioContext.createGain();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user