Skip to content

Fill out xaudio2_object_flush and fix MinGW64 build - #34

Open
mcarans wants to merge 2 commits into
espeak-ng:masterfrom
mcarans:master
Open

Fill out xaudio2_object_flush and fix MinGW64 build#34
mcarans wants to merge 2 commits into
espeak-ng:masterfrom
mcarans:master

Conversation

@mcarans

@mcarans mcarans commented Sep 21, 2025

Copy link
Copy Markdown

This PR makes a few changes in configure.am and Makefile.am to allow the build to complete successfully on MinGW64.

It populates the xaudio2_object_flush function to enable cancelling of a playing sound.

A test program is here: https://github.com/mcarans/AudioTest/blob/main/testpcaudiolib.cpp. It loads a long wav and then using pcaudiolib, plays it then cancels it after 2 seconds. It works fine on Windows MinGW64.

For this cancellation to work in espeak-ng, this PR that performs the audio_object_flush step before fifo_stop is required otherwise the playing speech is not cancelled at all: espeak-ng/espeak-ng#2288

This library along with espeak-ng have been tested within the Oolite game on Windows MinGW64 and the ability to cancel playing speech works well in the game (and is essential for smooth play).

The updated pcaudiolib was also tested on Ubuntu to ensure nothing has been broken.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant