Skip to content

Commit c6f66b8

Browse files
author
Jicheng Lu
committed
minor change
1 parent 1762675 commit c6f66b8

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

tests/BotSharp.Test.RealtimeVoice/Audio/AudioOut.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ internal class AudioOut : IDisposable
1212
private readonly BufferedWaveProvider _waveProvider;
1313
private readonly WaveOutEvent _waveOutEvent;
1414

15-
public AudioOut()
15+
private AudioOut()
1616
{
1717
var audioFormat = new WaveFormat(
1818
rate: SAMPLE_RATE,
@@ -33,6 +33,8 @@ public AudioOut()
3333
_waveOutEvent.Play();
3434
}
3535

36+
public static AudioOut Init() => new();
37+
3638
public void Enqueue(BinaryData data)
3739
{
3840
var buffer = data?.ToArray() ?? [];

tests/BotSharp.Test.RealtimeVoice/Session/ConsoleChatSession.CustomStream.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ private async Task StartCustomStreamAsync(string agentId)
1414
DisplayRemarks();
1515

1616
var (hub, conversationId) = await Setup(agentId);
17-
var audioOut = new AudioOut();
17+
var audioOut = AudioOut.Init();
1818

1919
await hub.ConnectToModel(
2020
responseToUser: async data =>

0 commit comments

Comments
 (0)