mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2024-12-11 13:21:03 +00:00
[WINDOWS] Fix declaration of GUIDs (try 2). (#868)
Supersedes and closes #867.
This commit is contained in:
parent
7b3c2b87f7
commit
10510e486b
3 changed files with 7 additions and 13 deletions
|
@ -276,7 +276,7 @@ if ( WIN32 )
|
|||
endif ( enable-network )
|
||||
|
||||
if ( enable-dsound AND HAVE_DSOUND_H )
|
||||
set ( WINDOWS_LIBS "${WINDOWS_LIBS};dsound" )
|
||||
set ( WINDOWS_LIBS "${WINDOWS_LIBS};dsound;ksuser" )
|
||||
set ( DSOUND_SUPPORT 1 )
|
||||
endif ()
|
||||
|
||||
|
@ -286,7 +286,7 @@ if ( WIN32 )
|
|||
endif ()
|
||||
|
||||
if ( enable-waveout AND HAVE_MMSYSTEM_H )
|
||||
set ( WINDOWS_LIBS "${WINDOWS_LIBS};winmm" )
|
||||
set ( WINDOWS_LIBS "${WINDOWS_LIBS};winmm;ksuser" )
|
||||
set ( WAVEOUT_SUPPORT 1 )
|
||||
endif ()
|
||||
|
||||
|
|
|
@ -227,22 +227,20 @@ new_fluid_dsound_audio_driver2(fluid_settings_t *settings, fluid_audio_func_t fu
|
|||
{
|
||||
if(fluid_settings_str_equal(settings, "audio.sample-format", "float"))
|
||||
{
|
||||
GUID guid_float = {DEFINE_WAVEFORMATEX_GUID(WAVE_FORMAT_IEEE_FLOAT)};
|
||||
FLUID_LOG(FLUID_DBG, "Selected 32 bit sample format");
|
||||
dev->write = fluid_synth_write_float_channels;
|
||||
/* sample container size in bits: 32 bits */
|
||||
format.Format.wBitsPerSample = 8 * sizeof(float);
|
||||
format.SubFormat = guid_float;
|
||||
format.SubFormat = KSDATAFORMAT_SUBTYPE_IEEE_FLOAT;
|
||||
format.Format.wFormatTag = WAVE_FORMAT_IEEE_FLOAT;
|
||||
}
|
||||
else if(fluid_settings_str_equal(settings, "audio.sample-format", "16bits"))
|
||||
{
|
||||
GUID guid_pcm = {DEFINE_WAVEFORMATEX_GUID(WAVE_FORMAT_PCM)};
|
||||
FLUID_LOG(FLUID_DBG, "Selected 16 bit sample format");
|
||||
dev->write = fluid_synth_write_s16_channels;
|
||||
/* sample container size in bits: 16bits */
|
||||
format.Format.wBitsPerSample = 8 * sizeof(short);
|
||||
format.SubFormat = guid_pcm;
|
||||
format.SubFormat = KSDATAFORMAT_SUBTYPE_PCM;
|
||||
format.Format.wFormatTag = WAVE_FORMAT_PCM;
|
||||
}
|
||||
else
|
||||
|
@ -253,12 +251,11 @@ new_fluid_dsound_audio_driver2(fluid_settings_t *settings, fluid_audio_func_t fu
|
|||
}
|
||||
else
|
||||
{
|
||||
GUID guid_float = {DEFINE_WAVEFORMATEX_GUID(WAVE_FORMAT_IEEE_FLOAT)};
|
||||
FLUID_LOG(FLUID_DBG, "Selected 32 bit sample format");
|
||||
dev->write = fluid_dsound_write_processed_channels;
|
||||
/* sample container size in bits: 32 bits */
|
||||
format.Format.wBitsPerSample = 8 * sizeof(float);
|
||||
format.SubFormat = guid_float;
|
||||
format.SubFormat = KSDATAFORMAT_SUBTYPE_IEEE_FLOAT;
|
||||
format.Format.wFormatTag = WAVE_FORMAT_IEEE_FLOAT;
|
||||
dev->drybuf = FLUID_ARRAY(float*, audio_channels * 2);
|
||||
if(dev->drybuf == NULL)
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
#if WAVEOUT_SUPPORT
|
||||
|
||||
#include <mmsystem.h>
|
||||
|
||||
#include <mmreg.h>
|
||||
|
||||
/* Those two includes are required on Windows 9x/ME */
|
||||
|
@ -300,22 +299,20 @@ new_fluid_waveout_audio_driver2(fluid_settings_t *settings, fluid_audio_func_t f
|
|||
/* check the format */
|
||||
if(fluid_settings_str_equal(settings, "audio.sample-format", "float") || func)
|
||||
{
|
||||
GUID guid_float = {DEFINE_WAVEFORMATEX_GUID(WAVE_FORMAT_IEEE_FLOAT)};
|
||||
FLUID_LOG(FLUID_DBG, "Selected 32 bit sample format");
|
||||
|
||||
sample_size = sizeof(float);
|
||||
write_ptr = func ? fluid_waveout_write_processed_channels : fluid_synth_write_float_channels;
|
||||
wfx.SubFormat = guid_float;
|
||||
wfx.SubFormat = KSDATAFORMAT_SUBTYPE_IEEE_FLOAT;
|
||||
wfx.Format.wFormatTag = WAVE_FORMAT_IEEE_FLOAT;
|
||||
}
|
||||
else if(fluid_settings_str_equal(settings, "audio.sample-format", "16bits"))
|
||||
{
|
||||
GUID guid_pcm = {DEFINE_WAVEFORMATEX_GUID(WAVE_FORMAT_PCM)};
|
||||
FLUID_LOG(FLUID_DBG, "Selected 16 bit sample format");
|
||||
|
||||
sample_size = sizeof(short);
|
||||
write_ptr = fluid_synth_write_s16_channels;
|
||||
wfx.SubFormat = guid_pcm;
|
||||
wfx.SubFormat = KSDATAFORMAT_SUBTYPE_PCM;
|
||||
wfx.Format.wFormatTag = WAVE_FORMAT_PCM;
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue