Skip to content

Commit

Permalink
Merge pull request #48 from martinellimarco/master
Browse files Browse the repository at this point in the history
Fixed a minor regression and improved documentations.
  • Loading branch information
martinellimarco committed Jun 5, 2019
2 parents 9f973f4 + 33ba7de commit 2dde734
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -134,6 +134,7 @@ example:
<address type='pci' domain='0x0000' bus='0x00' slot='0x11' function='0x0'/>
</shmem>
```
- Install the IVSHMEM driver from [here](https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/upstream-virtio/).
- To make the driver use IVSHMEM, add a DWORD `HKLM\SYSTEM\CurrentControlSet\Services\Scream\Options\UseIVSHMEM`,
with the value being the size of the device in MB (2, as recommended). Please
note that scream will identify the device by its size, so you should only
Expand Down
4 changes: 2 additions & 2 deletions Scream/minwave.cpp
Expand Up @@ -529,9 +529,9 @@ Return Value:
else if ((pWfx->wFormatTag == WAVE_FORMAT_EXTENSIBLE) && (pWfx->cbSize == CB_EXTENSIBLE)) {
WAVEFORMATEXTENSIBLE* pWfxT = (WAVEFORMATEXTENSIBLE*)pWfx;
// The channel mask can be greater than 0x07FF, but only in exotic configurations.
// It's important that the number of channels is even, to fit in PCM_PAYLOAD_SIZE. The only known case of odd number is 6.1 surround.
// It's important that the number of channels is even, to fit in PCM_PAYLOAD_SIZE. Mono is an exception.
// This restriction doesn't apply if IVSHMEM is used, because the packet size is dynamic there.
if ((pWfx->nChannels >= 1) && (pWfx->nChannels <= 8) && (pWfxT->dwChannelMask <= 0x07FF) && (g_UseIVSHMEM || pWfx->nChannels % 2 == 0)) {
if ((pWfx->nChannels >= 1) && (pWfx->nChannels <= 8) && (pWfxT->dwChannelMask <= 0x07FF) && (g_UseIVSHMEM || pWfx->nChannels == 1 || pWfx->nChannels % 2 == 0)) {
ntStatus = STATUS_SUCCESS;
}
}
Expand Down

0 comments on commit 2dde734

Please sign in to comment.