public async Task PlayAudioAsync(byte[] buffer, bool isFinal)
{
if (PreMessageIsOn || BackgroundIsOn)
MediaSession?.AudioExtrasSource.CancelSendAudioFromStream();
var raw = await FFMpegUtil.GetRawFromWav(buffer);
using var ms = new MemoryStream(raw);
m_AudioBuffer = raw;
OutputAudioBufferIndex = 0;
IsFinalMessage = isFinal;
await MediaSession?.AudioExtrasSource.SendAudioFromStream(ms, AudioSamplingRatesEnum.Rate8KHz);
}
So buffer is coming from
File.ReadAllBytesAsync(messageFullPath)
and with FFMPegUtil.GetRawFromWav(buffer) I get the buffer without wav header.
So, under windows it works very well but on Linux I can't heard the message.
Hello, I have a problem with play messages in Linux.
I created a Sip Client Automation that output some registered messages when you call the client. this is the code:
I get the media session on Client Answer with following code:
And I play Messages with following code:
So buffer is coming from
and with FFMPegUtil.GetRawFromWav(buffer) I get the buffer without wav header.
So, under windows it works very well but on Linux I can't heard the message.
I miss somenthing or it is a Linux problem?
and eventuallly some workaround ?
Thank you