Skip to content

Commit

Permalink
Merge branch 'master' into feature/#17205
Browse files Browse the repository at this point in the history
  • Loading branch information
christopherpross authored Jan 25, 2025
2 parents 74bd34e + 8ec1116 commit a1b1ae6
Show file tree
Hide file tree
Showing 125 changed files with 9,960 additions and 6,412 deletions.
6 changes: 4 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ repos:
- id: check-hooks-apply

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
# Prevents commits to certain branches
- id: no-commit-to-branch
Expand Down Expand Up @@ -68,6 +68,8 @@ repos:
- id: check-xml
# Ensures that links to lines in files under version control point to a particular commit.
- id: check-vcs-permalinks
# Avoids using reserved Windows filenames.
- id: check-illegal-windows-names
# Checks that tests are named test_*.py.
- id: name-tests-test
args: ["--unittest"]
Expand Down Expand Up @@ -97,7 +99,7 @@ repos:

- repo: https://github.com/astral-sh/ruff-pre-commit
# Matches Ruff version in requirements.
rev: v0.6.3
rev: v0.8.1
hooks:
- id: ruff
name: lint with ruff
Expand Down
2 changes: 1 addition & 1 deletion appveyor/scripts/pushPackagingInfo.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ $ErrorActionPreference = "Stop";
.\venvUtils\exportPackageList.bat installed_python_packages.txt
Push-AppveyorArtifact installed_python_packages.txt
$appVeyorUrl = "https://ci.appveyor.com"
$exe = Get-ChildItem -Name output\*.exe
$exe = Get-ChildItem -Name output\nvda_*.exe
if($?){
$exeUrl="$appVeyorUrl/api/buildjobs/$env:APPVEYOR_JOB_ID/artifacts/output/$exe"
if ($env:APPVEYOR_PULL_REQUEST_NUMBER -ne $null) {
Expand Down
2 changes: 1 addition & 1 deletion constraints.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Pillow is an implicit dependency and requires zlib and jpeg by default, but we don't need it
Pillow==10.3.0 -C "zlib=disable" -C "jpeg=disable"
Pillow==11.1.0 -C "zlib=disable" -C "jpeg=disable"
10 changes: 5 additions & 5 deletions copying.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# NVDA License

NVDA is available under the GNU General Public License version 2 or later, with two special exceptions.
NVDA is available under the GNU General Public License version 2, with two special exceptions.
The exceptions are outlined in the sections "Non-GPL Components in Plugins and Drivers" and "Microsoft Distributable Code".
NVDA also includes and uses components which are made available under different free and open source licenses.
Information about how to obtain and build the code for yourself is available at http://community.nvda-project.org/wiki/AccessingAndRunningSourceCode
Expand Down Expand Up @@ -304,12 +304,12 @@ DAMAGES.

## Non-GPL Components in Plugins and Drivers

Plugins and drivers, including those provided by third parties, are considered derivative works of NVDA and must therefore be licensed under the terms of the GNU General Public License version 2 or later.
Plugins and drivers, including those provided by third parties, are considered derivative works of NVDA and must therefore be licensed under the terms of the GNU General Public License version 2.
As a special exception, an NVDA plugin or driver (as defined in the NVDA Developer Guide) may use components under other licenses provided that:
a) Any such component does not prevent the NVDA plugin or driver from being licensed under the terms of the GNU General Public License version 2 or later; and
a) Any such component does not prevent the NVDA plugin or driver from being licensed under the terms of the GNU General Public License version 2; and
b) Any such component does not directly use and is not directly used by any portion of NVDA outside of that plugin or driver.
For example, a speech synthesizer driver may use a speech synthesiser under a proprietary license.
In contrast, in a plugin providing support for an application, the code which implements any interface provided by NVDA must be licensed under the GNU General Public License version 2 or later.
In contrast, in a plugin providing support for an application, the code which implements any interface provided by NVDA must be licensed under the GNU General Public License version 2.


## Microsoft Distributable Code
Expand All @@ -319,7 +319,7 @@ This applies to the following files:
- Microsoft.VC*.manifest
- msvc*.dll

As a special exception to the GNU General Public License version 2 or later, these components may be included with binary distributions of NVDA without being subject to the terms of that license.
As a special exception to the GNU General Public License version 2, these components may be included with binary distributions of NVDA without being subject to the terms of that license.

Microsoft Distributable Code is covered by the following terms:

Expand Down
2 changes: 1 addition & 1 deletion include/espeak
Submodule espeak updated 72 files
+13 −0 .github/dependabot.yml
+3 −3 .github/workflows/android.yml
+4 −4 .github/workflows/autoconf.yml
+11 −7 .github/workflows/ci.yml
+5 −5 .github/workflows/dist.yml
+6 −6 .github/workflows/fuzzing.yml
+2 −2 .github/workflows/gradle-wrapper-validation.yml
+43 −0 .github/workflows/windows-msbuild.yml
+2 −2 .github/workflows/windows.yml
+3 −0 .gitignore
+0 −18 .travis.yml
+1 −1 CMakeLists.txt
+12 −1 ChangeLog.md
+6 −0 README.md
+2 −2 android/AndroidManifest.xml
+1 −1 android/build.gradle
+1 −1 android/jni/include/config.h
+1 −1 configure.ac
+1 −0 dictsource/ca_emoji
+18,839 −211 dictsource/ca_list
+1,141 −159 dictsource/ca_rules
+50 −50 dictsource/cs_emoji
+2 −0 dictsource/de_list
+80 −0 dictsource/en_list
+53 −1 dictsource/en_rules
+466 −14 dictsource/extra/ru_listx
+32 −1 dictsource/fa_list
+10 −4 dictsource/he_list
+31 −0 dictsource/he_listx
+447 −32 dictsource/he_rules
+473 −40 dictsource/hu_rules
+31 −2 dictsource/nl_list
+625 −76 dictsource/pt_list
+1 −0 dictsource/ru_list
+0 −7 docs/add_language.md
+1 −1 docs/building.md
+5 −0 espeak-ng-data/lang/gmw/en-Shaw
+2 −0 espeak-ng-data/lang/roa/ca
+7 −0 espeak-ng-data/lang/roa/ca-ba
+6 −0 espeak-ng-data/lang/roa/ca-nw
+7 −0 espeak-ng-data/lang/roa/ca-va
+4 −0 phsource/mbrola/de6
+457 −12 phsource/ph_catalan
+490 −0 phsource/ph_catalan_ba
+160 −0 phsource/ph_catalan_nw
+282 −0 phsource/ph_catalan_va
+9 −1 phsource/phonemes
+1 −1 src/espeak-ng.c
+1 −1 src/include/espeak-ng/speak_lib.h
+36 −2 src/libespeak-ng/dictionary.c
+1 −0 src/libespeak-ng/dictionary.h
+2 −0 src/libespeak-ng/encoding.c
+21 −0 src/libespeak-ng/mbrowrap.c
+2 −0 src/libespeak-ng/readclause.c
+5 −0 src/libespeak-ng/spect.c
+1 −1 src/libespeak-ng/speech.h
+9 −1 src/libespeak-ng/ssml.c
+11 −5 src/libespeak-ng/synthesize.c
+3 −1 src/libespeak-ng/tr_languages.c
+3 −2 src/libespeak-ng/translate.c
+1 −1 src/libespeak-ng/translate.h
+2 −1 src/libespeak-ng/voices.c
+1 −1 src/libespeak-ng/wavegen.c
+3 −0 src/ucd-tools/CMakeLists.txt
+1 −1 src/windows/config.h
+4 −1 src/windows/data.vcxproj
+2 −2 tests/api.c
+5 −1 tests/language-phonemes.test
+9 −4 tests/language-pronunciation.test
+0 −1 tests/ssml/external-entity.expected
+0 −1 tests/ssml/spec-example-1.expected
+6 −0 tests/translate.test
8 changes: 4 additions & 4 deletions include/espeak.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ Modifications will need to be made in [`nvdaHelper/espeak/sconscript`](../nvdaHe
1. Update our record of the version number and build.
1. Change back to the NVDA repo root
1. Update the `/DPACKAGE_VERSION` in [`nvdaHelper/espeak/sconscript`](../nvdaHelper/espeak/sconscript)
*-* The preprocessor definition is used to supply these definitions instead of [`nvdaHelper/espeak/config.h`](../nvdaHelper/espeak/config.h)
*-* [`nvdaHelper/espeak/config.h`](../nvdaHelper/espeak/config.h) must exist (despite being empty) since a "config.h" is included within eSpeak.
*-* Compare to eSpeak source config: [`include/espeak/src/windows/config.h`](./espeak/src/windows/config.h).
*-* Diff `src/windows/config.h` with the previous commit.
* The preprocessor definition is used to supply these definitions instead of [`nvdaHelper/espeak/config.h`](../nvdaHelper/espeak/config.h)
* [`nvdaHelper/espeak/config.h`](../nvdaHelper/espeak/config.h) must exist (despite being empty) since a "config.h" is included within eSpeak.
* Compare to eSpeak source config: [`include/espeak/src/windows/config.h`](./espeak/src/windows/config.h).
* Diff `src/windows/config.h` with the previous commit.
1. Update NVDA's [dev environment documentation](../projectDocs/dev/createDevEnvironment.md#git-submodules) and [changelog](../user_docs/en/changes.md) with eSpeak version and commit.
1. Build NVDA: `scons source`
* Expected warnings from eSpeak compilation:
Expand Down
2 changes: 1 addition & 1 deletion include/liblouis
Submodule liblouis updated 355 files
2 changes: 1 addition & 1 deletion include/nvda-cldr
Submodule nvda-cldr updated 65 files
+412 −405 locale/af_ZA/cldr.dic
+423 −416 locale/am/cldr.dic
+23 −16 locale/ar/cldr.dic
+15 −8 locale/as/cldr.dic
+15 −8 locale/bg/cldr.dic
+28 −21 locale/bn/cldr.dic
+53 −45 locale/ca/cldr.dic
+14 −7 locale/cs/cldr.dic
+20 −13 locale/da/cldr.dic
+20 −13 locale/de/cldr.dic
+2 −0 locale/de_CH/cldr.dic
+15 −8 locale/el/cldr.dic
+35 −27 locale/en/cldr.dic
+26 −19 locale/es/cldr.dic
+38 −97 locale/es_CO/cldr.dic
+17 −10 locale/fa/cldr.dic
+64 −56 locale/fi/cldr.dic
+14 −7 locale/fr/cldr.dic
+14 −7 locale/ga/cldr.dic
+44 −37 locale/gl/cldr.dic
+16 −9 locale/gu/cldr.dic
+30 −23 locale/he/cldr.dic
+14 −7 locale/hi/cldr.dic
+32 −25 locale/hr/cldr.dic
+16 −8 locale/hu/cldr.dic
+16 −9 locale/id/cldr.dic
+15 −8 locale/is/cldr.dic
+48 −41 locale/it/cldr.dic
+16 −9 locale/ja/cldr.dic
+15 −8 locale/ka/cldr.dic
+14 −7 locale/kn/cldr.dic
+42 −35 locale/ko/cldr.dic
+22 −15 locale/kok/cldr.dic
+16 −9 locale/ky/cldr.dic
+14 −7 locale/lt/cldr.dic
+60 −53 locale/mk/cldr.dic
+15 −8 locale/ml/cldr.dic
+140 −25 locale/mn/cldr.dic
+87 −80 locale/my/cldr.dic
+16 −8 locale/nb_NO/cldr.dic
+14 −7 locale/ne/cldr.dic
+15 −7 locale/nl/cldr.dic
+14 −11 locale/nn_NO/cldr.dic
+52 −45 locale/pa/cldr.dic
+38 −31 locale/pl/cldr.dic
+15 −8 locale/pt_BR/cldr.dic
+23 −16 locale/pt_pt/cldr.dic
+26 −19 locale/ro/cldr.dic
+17 −10 locale/ru/cldr.dic
+18 −11 locale/sk/cldr.dic
+17 −10 locale/sl/cldr.dic
+18 −11 locale/so/cldr.dic
+14 −7 locale/sq/cldr.dic
+48 −41 locale/sr/cldr.dic
+16 −9 locale/sv/cldr.dic
+45 −38 locale/ta/cldr.dic
+16 −9 locale/te/cldr.dic
+19 −12 locale/th/cldr.dic
+14 −7 locale/tr/cldr.dic
+33 −26 locale/uk/cldr.dic
+14 −7 locale/ur/cldr.dic
+15 −8 locale/vi/cldr.dic
+17 −10 locale/zh_cn/cldr.dic
+17 −10 locale/zh_hk/cldr.dic
+14 −7 locale/zh_tw/cldr.dic
18 changes: 0 additions & 18 deletions launcher/nvdaLauncher.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ CRCCheck on

ReserveFile "${NSISDIR}\Plugins\x86-unicode\system.dll"
ReserveFile "${NSISDIR}\Plugins\x86-unicode\banner.dll"
ReserveFile "..\miscDeps\launcher\nvda_logo.wav"

Name "NVDA"
VIProductVersion "${VERSION_YEAR}.${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_BUILD}" ;Needs to be here so other version info shows up
Expand Down Expand Up @@ -85,9 +84,6 @@ ${GetParameters} $0
; Sets the error flag if the option is missing.
; Reference: https://nsis.sourceforge.io/Docs/AppendixE.html#getoptions
${GetOptions} $0 "--minimal" $1
${If} ${Errors}
Call PlayLogoSound
${EndIf}
CreateDirectory "$PLUGINSDIR\app"
setOutPath "$PLUGINSDIR\app"
file /R "${NVDADistDir}\"
Expand All @@ -98,17 +94,3 @@ execWait "$PLUGINSDIR\app\nvda_noUIAccess.exe $0 --launcher" $1
;If exit code is 3 then execute again (restart)
intcmp $1 3 exec +1
SectionEnd

Function PlayLogoSound
File "..\miscDeps\launcher\nvda_logo.wav"
Push "$PLUGINSDIR\nvda_logo.wav"
Call PlaySound
FunctionEnd

Function PlaySound
; Retrieve the file to play
pop $9
; The code below is derived from the code example at http://nsis.sourceforge.io/WinAPI:winmm:PlaySound
IntOp $0 "SND_ASYNC" || 1
System::Call 'winmm::PlaySound(t r9, i 0, i r0) b'
FunctionEnd
2 changes: 1 addition & 1 deletion miscDeps
5 changes: 1 addition & 4 deletions nvdaHelper/espeak/sconscript
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,10 @@ class espeak_AUDIO_OUTPUT(enum.IntEnum):
env: SCons.Environment.Environment = thirdPartyEnv.Clone()
env.Append(
CCFLAGS=[
# Whole-program optimization causes eSpeak to distort and warble with its Klatt4 voice
# Therefore specifically force it off
"/GL-",
# Ignore all warnings as the code is not ours.
"/W0",
# Preprocessor definitions. Migrated from 'nvdaHelper/espeak/config.h'
'/DPACKAGE_VERSION=\\"1.52-dev 961454ff\\"', # See 'include/espeak/src/windows/config.h'
'/DPACKAGE_VERSION=\\"1.52.0\\"', # See 'include/espeak/src/windows/config.h'
"/DHAVE_STDINT_H=1",
"/D__WIN32__#1",
"/DLIBESPEAK_NG_EXPORT",
Expand Down
7 changes: 7 additions & 0 deletions nvdaHelper/liblouis/strings.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/*
* liblouis/liblouis#1685: liblouis started using strncasecmp, which is not available on Windows.
* Neither can Gnulib be used with NVDA's buildssystem.
* Therefore, use _strnicmp as a drop-in replacement.
*/

#define strncasecmp _strnicmp
122 changes: 77 additions & 45 deletions nvdaHelper/local/wasapi.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
This file is a part of the NVDA project.
URL: http://www.nvda-project.org/
Copyright 2023 James Teh.
Copyright 2023-2024 NV Access Limited, James Teh.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2.0, as published by
the Free Software Foundation.
Expand Down Expand Up @@ -43,6 +43,9 @@ const IID IID_IAudioRenderClient = __uuidof(IAudioRenderClient);
const IID IID_IAudioClock = __uuidof(IAudioClock);
const IID IID_IMMNotificationClient = __uuidof(IMMNotificationClient);
const IID IID_IAudioStreamVolume = __uuidof(IAudioStreamVolume);
const IID IID_IAudioSessionManager2 = __uuidof(IAudioSessionManager2);
const IID IID_IAudioSessionControl2 = __uuidof(IAudioSessionControl2);
const IID IID_IMMEndpoint = __uuidof(IMMEndpoint);

/**
* C++ RAII class to manage the lifecycle of a standard Windows HANDLE closed
Expand Down Expand Up @@ -165,9 +168,9 @@ class WasapiPlayer {

/**
* Constructor.
* Specify an empty (not null) deviceName to use the default device.
* Specify an empty (not null) endpointId to use the default device.
*/
WasapiPlayer(wchar_t* deviceName, WAVEFORMATEX format,
WasapiPlayer(wchar_t* endpointId, WAVEFORMATEX format,
ChunkCompletedCallback callback);

/**
Expand Down Expand Up @@ -214,6 +217,8 @@ class WasapiPlayer {
HRESULT getPreferredDevice(CComPtr<IMMDevice>& preferredDevice);
bool didPreferredDeviceBecomeAvailable();

HRESULT disableCommunicationDucking(IMMDevice* device);

enum class PlayState {
stopped,
playing,
Expand All @@ -225,7 +230,7 @@ class WasapiPlayer {
CComPtr<IAudioClock> clock;
// The maximum number of frames that will fit in the buffer.
UINT32 bufferFrames;
std::wstring deviceName;
std::wstring endpointId;
WAVEFORMATEX format;
ChunkCompletedCallback callback;
PlayState playState = PlayState::stopped;
Expand All @@ -242,9 +247,9 @@ class WasapiPlayer {
bool isUsingPreferredDevice = false;
};

WasapiPlayer::WasapiPlayer(wchar_t* deviceName, WAVEFORMATEX format,
WasapiPlayer::WasapiPlayer(wchar_t* endpointId, WAVEFORMATEX format,
ChunkCompletedCallback callback)
: deviceName(deviceName), format(format), callback(callback) {
: endpointId(endpointId), format(format), callback(callback) {
wakeEvent = CreateEvent(nullptr, false, false, nullptr);
}

Expand All @@ -262,7 +267,7 @@ HRESULT WasapiPlayer::open(bool force) {
}
CComPtr<IMMDevice> device;
isUsingPreferredDevice = false;
if (deviceName.empty()) {
if (endpointId.empty()) {
hr = enumerator->GetDefaultAudioEndpoint(eRender, eConsole, &device);
} else {
hr = getPreferredDevice(device);
Expand Down Expand Up @@ -303,6 +308,11 @@ HRESULT WasapiPlayer::open(bool force) {
return hr;
}
playState = PlayState::stopped;
hr = disableCommunicationDucking(device);
if (FAILED(hr)) {
// Gracefully ignore failure, as disabling ducking isn't critical.
LOG_DEBUGWARNING(L"Couldn't disable communication ducking: " << hr);
}
return S_OK;
}

Expand Down Expand Up @@ -482,48 +492,47 @@ HRESULT WasapiPlayer::getPreferredDevice(CComPtr<IMMDevice>& preferredDevice) {
if (FAILED(hr)) {
return hr;
}
CComPtr<IMMDeviceCollection> devices;
hr = enumerator->EnumAudioEndpoints(eRender, DEVICE_STATE_ACTIVE, &devices);
CComPtr<IMMDevice> device;
hr = enumerator->GetDevice(endpointId.c_str(), &device);
if (FAILED(hr)) {
return hr;
}
UINT count = 0;
devices->GetCount(&count);
for (UINT d = 0; d < count; ++d) {
CComPtr<IMMDevice> device;
hr = devices->Item(d, &device);
if (FAILED(hr)) {
return hr;
}
CComPtr<IPropertyStore> props;
hr = device->OpenPropertyStore(STGM_READ, &props);
if (FAILED(hr)) {
return hr;
}
PROPVARIANT val;
hr = props->GetValue(PKEY_Device_FriendlyName, &val);
if (FAILED(hr)) {
return hr;
}
// WinMM device names are truncated to MAXPNAMELEN characters, including the
// null terminator.
constexpr size_t MAX_CHARS = MAXPNAMELEN - 1;
if (wcsncmp(val.pwszVal, deviceName.c_str(), MAX_CHARS) == 0) {
PropVariantClear(&val);
preferredDevice = std::move(device);
return S_OK;
}
PropVariantClear(&val);

// We only want to use the device if it is plugged in and enabled.
DWORD state;
hr = device->GetState(&state);
if (FAILED(hr)) {
return hr;
} else if (state != DEVICE_STATE_ACTIVE) {
return E_NOTFOUND;
}
return E_NOTFOUND;

// We only want to use the device if it is an output device.
IMMEndpoint* endpoint;
hr = device->QueryInterface(IID_IMMEndpoint, (void**)&endpoint);
if (FAILED(hr)) {
return hr;
}
EDataFlow dataFlow;
hr = endpoint->GetDataFlow(&dataFlow);
if (FAILED(hr)) {
return hr;
} else if (dataFlow != eRender) {
return E_NOTFOUND;
}
preferredDevice = std::move(device);
endpoint->Release();
device.Release();
enumerator.Release();
return S_OK;
}

bool WasapiPlayer::didPreferredDeviceBecomeAvailable() {
if (
// We're already using the preferred device.
isUsingPreferredDevice ||
// A preferred device was not specified.
deviceName.empty() ||
endpointId.empty() ||
// A device hasn't recently changed state.
deviceStateChangeCount == notificationClient->getDeviceStateChangeCount()
) {
Expand Down Expand Up @@ -634,14 +643,37 @@ HRESULT WasapiPlayer::setChannelVolume(unsigned int channel, float level) {
return volume->SetChannelVolume(channel, level);
}

HRESULT WasapiPlayer::disableCommunicationDucking(IMMDevice* device) {
// Disable the default ducking experience used when a communication audio
// session is active, as we never want NVDA's audio to be ducked.
// https://learn.microsoft.com/en-us/windows/win32/coreaudio/stream-attenuation
// https://learn.microsoft.com/en-us/windows/win32/coreaudio/disabling-the-ducking-experience
CComPtr<IAudioSessionManager2> manager;
HRESULT hr = device->Activate(IID_IAudioSessionManager2, CLSCTX_ALL, nullptr,
(void**)&manager);
if (FAILED(hr)) {
return hr;
}
CComPtr<IAudioSessionControl> control;
hr = manager->GetAudioSessionControl(nullptr, 0, &control);
if (FAILED(hr)) {
return hr;
}
CComQIPtr<IAudioSessionControl2, &IID_IAudioSessionControl2> control2(control);
if (!control2) {
return E_NOINTERFACE;
}
return control2->SetDuckingPreference(TRUE);
}

/**
* Asynchronously play silence for requested durations.
* Silence is played in a background thread. The duration can be adjusted from
* any thread.
*/
class SilencePlayer {
public:
SilencePlayer(wchar_t* deviceName);
SilencePlayer(wchar_t* endpointId);
HRESULT init();
// Play silence for the specified duration.
void playFor(DWORD ms, float volume);
Expand All @@ -666,8 +698,8 @@ class SilencePlayer {
std::vector<INT16> whiteNoiseData;
};

SilencePlayer::SilencePlayer(wchar_t* deviceName):
player(deviceName, getFormat(), nullptr),
SilencePlayer::SilencePlayer(wchar_t* endpointId):
player(endpointId, getFormat(), nullptr),
whiteNoiseData(
SILENCE_BYTES / (
sizeof(INT16) / sizeof(unsigned char)
Expand Down Expand Up @@ -759,10 +791,10 @@ void SilencePlayer::terminate() {
* WasapiPlayer or SilencePlayer, with the exception of wasPlay_startup.
*/

WasapiPlayer* wasPlay_create(wchar_t* deviceName, WAVEFORMATEX format,
WasapiPlayer* wasPlay_create(wchar_t* endpointId, WAVEFORMATEX format,
WasapiPlayer::ChunkCompletedCallback callback
) {
return new WasapiPlayer(deviceName, format, callback);
return new WasapiPlayer(endpointId, format, callback);
}

void wasPlay_destroy(WasapiPlayer* player) {
Expand Down Expand Up @@ -823,9 +855,9 @@ HRESULT wasPlay_startup() {

SilencePlayer* silence = nullptr;

HRESULT wasSilence_init(wchar_t* deviceName) {
HRESULT wasSilence_init(wchar_t* endpointId) {
assert(!silence);
silence = new SilencePlayer(deviceName);
silence = new SilencePlayer(endpointId);
return silence->init();
}

Expand Down
Loading

0 comments on commit a1b1ae6

Please sign in to comment.