Fix UTF-8 incompatible characters

This commit is contained in:
FearlessTobi 2022-09-07 06:42:25 +02:00
parent e70dcb9eba
commit d2b22ba840
3 changed files with 22 additions and 20 deletions

View file

@ -34,8 +34,11 @@ XAudio27API::XAudio27API(uint32 device_id, uint32 samplerate, uint32 channels, u
m_wfx.Format.nChannels = channels; m_wfx.Format.nChannels = channels;
m_wfx.Format.nSamplesPerSec = samplerate; m_wfx.Format.nSamplesPerSec = samplerate;
m_wfx.Format.wBitsPerSample = bits_per_sample; m_wfx.Format.wBitsPerSample = bits_per_sample;
m_wfx.Format.nBlockAlign = (m_wfx.Format.nChannels * m_wfx.Format.wBitsPerSample) / 8; // must equal (nChannels × wBitsPerSample) / 8 m_wfx.Format.nBlockAlign = (m_wfx.Format.nChannels * m_wfx.Format.wBitsPerSample) /
m_wfx.Format.nAvgBytesPerSec = m_wfx.Format.nSamplesPerSec * m_wfx.Format.nBlockAlign; // must equal nSamplesPerSec × nBlockAlign. 8; // must equal (nChannels * wBitsPerSample) / 8
m_wfx.Format.nAvgBytesPerSec =
m_wfx.Format.nSamplesPerSec *
m_wfx.Format.nBlockAlign; // must equal nSamplesPerSec * nBlockAlign.
m_wfx.Format.cbSize = sizeof(WAVEFORMATEXTENSIBLE) - sizeof(WAVEFORMATEX); m_wfx.Format.cbSize = sizeof(WAVEFORMATEXTENSIBLE) - sizeof(WAVEFORMATEX);
m_wfx.SubFormat = KSDATAFORMAT_SUBTYPE_PCM; m_wfx.SubFormat = KSDATAFORMAT_SUBTYPE_PCM;

View file

@ -50,8 +50,11 @@ XAudio2API::XAudio2API(std::wstring device_id, uint32 samplerate, uint32 channel
m_wfx.Format.nChannels = channels; m_wfx.Format.nChannels = channels;
m_wfx.Format.nSamplesPerSec = samplerate; m_wfx.Format.nSamplesPerSec = samplerate;
m_wfx.Format.wBitsPerSample = bits_per_sample; m_wfx.Format.wBitsPerSample = bits_per_sample;
m_wfx.Format.nBlockAlign = (m_wfx.Format.nChannels * m_wfx.Format.wBitsPerSample) / 8; // must equal (nChannels × wBitsPerSample) / 8 m_wfx.Format.nBlockAlign = (m_wfx.Format.nChannels * m_wfx.Format.wBitsPerSample) /
m_wfx.Format.nAvgBytesPerSec = m_wfx.Format.nSamplesPerSec * m_wfx.Format.nBlockAlign; // must equal nSamplesPerSec × nBlockAlign. 8; // must equal (nChannels * wBitsPerSample) / 8
m_wfx.Format.nAvgBytesPerSec =
m_wfx.Format.nSamplesPerSec *
m_wfx.Format.nBlockAlign; // must equal nSamplesPerSec * nBlockAlign.
m_wfx.Format.cbSize = sizeof(WAVEFORMATEXTENSIBLE) - sizeof(WAVEFORMATEX); m_wfx.Format.cbSize = sizeof(WAVEFORMATEXTENSIBLE) - sizeof(WAVEFORMATEX);
m_wfx.SubFormat = KSDATAFORMAT_SUBTYPE_PCM; m_wfx.SubFormat = KSDATAFORMAT_SUBTYPE_PCM;

View file

@ -260,48 +260,44 @@ DRC flat on table, screen facing up. Top pointing away (away from person, pointi
0.03 0.99 -0.13 0.03 0.99 -0.13
0.01 0.13 0.99 0.01 0.13 0.99
Turned 45° to the right: Turned 45° to the right:
0.71 -0.03 0.71 0.71 -0.03 0.71
0.12 0.99 -0.08 0.12 0.99 -0.08
-0.70 0.14 0.70 -0.70 0.14 0.70
Turned 45° to the right (top of GamePad pointing right now): Turned 45° to the right (top of GamePad pointing right now):
0.08 -0.03 1.00 -> Z points towards person 0.08 -0.03 1.00 -> Z points towards person
0.15 0.99 0.01 0.15 0.99 0.01
-0.99 0.15 0.09 -> DRC Z-Axis now points towards X-minus -0.99 0.15 0.09 -> DRC Z-Axis now points towards X-minus
Turned 90° to the right (top of gamepad now pointing towards holder, away from monitor): Turned 90° to the right (top of gamepad now pointing towards holder, away from monitor):
-1.00 -0.01 0.06 -1.00 -0.01 0.06
0.00 0.99 0.15 0.00 0.99 0.15
-0.06 0.15 -0.99 -0.06 0.15 -0.99
Turned 90° to the right (pointing left): Turned 90° to the right (pointing left):
-0.17 -0.01 -0.99 -0.17 -0.01 -0.99
-0.13 0.99 0.02 -0.13 0.99 0.02
0.98 0.13 -0.17 0.98 0.13 -0.17
After another 90° we end up in the initial position: After another 90° we end up in the initial position:
0.99 -0.03 -0.11 0.99 -0.03 -0.11
0.01 0.99 -0.13 0.01 0.99 -0.13
0.12 0.12 0.99 0.12 0.12 0.99
------ ------
From initial position, lean the GamePad on its left side. 45° up. So the screen is pointing to the top left From initial position, lean the GamePad on its left side. 45° up. So the screen is pointing to the
0.66 -0.75 -0.03 top left 0.66 -0.75 -0.03 0.74 0.66 -0.11 0.10 0.05 0.99
0.74 0.66 -0.11
0.10 0.05 0.99
Further 45°, GamePad now on its left, screen pointing left: Further 45°, GamePad now on its left, screen pointing left:
-0.03 -1.00 -0.00 -0.03 -1.00 -0.00
0.99 -0.03 -0.15 0.99 -0.03 -0.15
0.15 -0.01 0.99 0.15 -0.01 0.99
From initial position, lean the GamePad on its right side. 45° up. So the screen is pointing to the top right From initial position, lean the GamePad on its right side. 45° up. So the screen is pointing to the
0.75 0.65 -0.11 top right 0.75 0.65 -0.11 -0.65 0.76 0.07 0.12 0.02 0.99
-0.65 0.76 0.07
0.12 0.02 0.99
From initial position, tilt the GamePad up 90° (bottom side remains in touch with surface): From initial position, tilt the GamePad up 90° (bottom side remains in touch with surface):
0.99 -0.05 -0.10 0.99 -0.05 -0.10
-0.10 0.01 -0.99 -0.10 0.01 -0.99
0.05 1.00 0.01 0.05 1.00 0.01
@ -311,7 +307,7 @@ From initial position, stand the GamePad on its top side:
0.09 -0.01 1.00 0.09 -0.01 1.00
-0.01 -1.00 -0.01 -0.01 -1.00 -0.01
Rotate GamePad 180° around x axis, so it now lies on its screen (top of GamePad pointing to holder): Rotate GamePad 180° around x axis, so it now lies on its screen (top of GamePad pointing to holder):
0.99 -0.03 -0.15 0.99 -0.03 -0.15
-0.04 -1.00 -0.08 -0.04 -1.00 -0.08
-0.15 0.09 -0.99 -0.15 0.09 -0.99