mirror of
https://github.com/overte-org/overte.git
synced 2025-04-14 07:47:30 +02:00
CR feedback - thanks Ken!
This commit is contained in:
parent
48d3450c5a
commit
cee1454f6e
1 changed files with 3 additions and 7 deletions
|
@ -75,7 +75,7 @@ void TTSScriptingInterface::speakText(const QString& textToSpeak) {
|
|||
#ifdef WIN32
|
||||
WAVEFORMATEX fmt;
|
||||
fmt.wFormatTag = WAVE_FORMAT_PCM;
|
||||
fmt.nSamplesPerSec = 24000;
|
||||
fmt.nSamplesPerSec = AudioConstants::SAMPLE_RATE;
|
||||
fmt.wBitsPerSample = 16;
|
||||
fmt.nChannels = 1;
|
||||
fmt.nBlockAlign = fmt.nChannels * fmt.wBitsPerSample / 8;
|
||||
|
@ -132,17 +132,13 @@ void TTSScriptingInterface::speakText(const QString& textToSpeak) {
|
|||
hr = IStream_Size(pStream, &StreamSize);
|
||||
|
||||
DWORD dwSize = StreamSize.QuadPart;
|
||||
char* buf1 = new char[dwSize + 1];
|
||||
memset(buf1, 0, dwSize + 1);
|
||||
_lastSoundByteArray.resize(dwSize);
|
||||
|
||||
hr = IStream_Read(pStream, buf1, dwSize);
|
||||
hr = IStream_Read(pStream, _lastSoundByteArray.data(), dwSize);
|
||||
if (FAILED(hr)) {
|
||||
qDebug() << "Couldn't read from stream.";
|
||||
}
|
||||
|
||||
_lastSoundByteArray.resize(0);
|
||||
_lastSoundByteArray.append(buf1, dwSize);
|
||||
|
||||
AudioInjectorOptions options;
|
||||
options.position = DependencyManager::get<AvatarManager>()->getMyAvatarPosition();
|
||||
|
||||
|
|
Loading…
Reference in a new issue