Commit ce0a985f authored by Alexandre Julliard's avatar Alexandre Julliard

faudio: Import upstream release 22.08.

parent 2dd90388
...@@ -485,7 +485,7 @@ extern FAudioGUID DATAFORMAT_SUBTYPE_IEEE_FLOAT; ...@@ -485,7 +485,7 @@ extern FAudioGUID DATAFORMAT_SUBTYPE_IEEE_FLOAT;
#define FAUDIO_ABI_VERSION 0 #define FAUDIO_ABI_VERSION 0
#define FAUDIO_MAJOR_VERSION 22 #define FAUDIO_MAJOR_VERSION 22
#define FAUDIO_MINOR_VERSION 7 #define FAUDIO_MINOR_VERSION 8
#define FAUDIO_PATCH_VERSION 0 #define FAUDIO_PATCH_VERSION 0
#define FAUDIO_COMPILED_VERSION ( \ #define FAUDIO_COMPILED_VERSION ( \
......
...@@ -582,7 +582,7 @@ FAudioThread FAudio_PlatformCreateThread( ...@@ -582,7 +582,7 @@ FAudioThread FAudio_PlatformCreateThread(
void FAudio_PlatformWaitThread(FAudioThread thread, int32_t *retval) void FAudio_PlatformWaitThread(FAudioThread thread, int32_t *retval)
{ {
WaitForSingleObject(thread, INFINITE); WaitForSingleObject(thread, INFINITE);
GetExitCodeThread(thread, (DWORD *)retval); if (retval != NULL) GetExitCodeThread(thread, (DWORD *)retval);
} }
void FAudio_PlatformThreadPriority(FAudioThreadPriority priority) void FAudio_PlatformThreadPriority(FAudioThreadPriority priority)
......
/* This was generated by making 8 sources and 8 submixes, then assigning each /* This was generated by making 8 sources and 8 submixes, then assigning each
* submix to each voice and dumping the output matrix. Terrible, but it worked! * submix to each voice and dumping the output matrix. Terrible, but it worked!
*/ */
/*
int main(int argc, char **argv)
{
CoInitialize(NULL);
IXAudio2 *engine;
XAudio2Create(&engine);
IXAudio2MasteringVoice *master;
engine->CreateMasteringVoice(&master);
FILE *fileOut = fopen("matrix_defaults.inl", "w");
for (int srcChans = 1; srcChans < 9; srcChans += 1)
{
fprintf(fileOut, "{\n");
for (int dstChans = 1; dstChans < 9; dstChans += 1)
{
IXAudio2SubmixVoice *submix;
engine->CreateSubmixVoice(&submix, dstChans, 48000);
XAUDIO2_SEND_DESCRIPTOR sendDesc;
sendDesc.Flags = 0;
sendDesc.pOutputVoice = submix;
XAUDIO2_VOICE_SENDS sends;
sends.SendCount = 1;
sends.pSends = &sendDesc;
WAVEFORMATEX fmt;
fmt.wFormatTag = 1;
fmt.nChannels = srcChans;
fmt.nSamplesPerSec = 48000;
fmt.wBitsPerSample = 16;
fmt.nBlockAlign = srcChans * (fmt.wBitsPerSample / 8);
fmt.nAvgBytesPerSec = fmt.nBlockAlign * fmt.nSamplesPerSec;
fmt.cbSize = 0;
IXAudio2SourceVoice *source;
engine->CreateSourceVoice(&source, &fmt, 0, 2.0f, NULL, &sends);
float matrix[8 * 8];
source->GetOutputMatrix(submix, srcChans, dstChans, matrix);
fprintf(fileOut, "\t{ ");
for (int i = 0; i < srcChans * dstChans; i += 1)
{
fprintf(fileOut, "%.9f%s ", matrix[i], (i == ((srcChans * dstChans) - 1)) ? "" : ",");
}
fprintf(fileOut, "}%s\n", (dstChans == 8) ? "" : ",");
source->DestroyVoice();
submix->DestroyVoice();
}
fprintf(fileOut, "}%s\n", (srcChans == 8) ? "" : ",");
}
fclose(fileOut);
master->DestroyVoice();
engine->Release();
CoUninitialize();
return 0;
}
*/
{ {
/* 1 x 1 */ /* 1 x 1 */
{ 1.000000000f }, { 1.000000000f },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment