mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2025-03-15 07:00:58 +00:00
Merge pull request #570 from raynorpat/fix-classicdoom-music-xaudio2
Fix Classic Doom Music playback with XAudio2 backend
This commit is contained in:
commit
3c80a8de53
2 changed files with 5 additions and 3 deletions
|
@ -833,9 +833,7 @@ void I_InitMusic(void)
|
|||
voiceFormat.cbSize = 0;
|
||||
|
||||
// RB: XAUDIO2_VOICE_MUSIC not available on Windows 8 SDK
|
||||
#if !defined(USE_WINRT) //(_WIN32_WINNT < 0x0602 /*_WIN32_WINNT_WIN8*/)
|
||||
soundSystemLocal.hardware.GetIXAudio2()->CreateSourceVoice( &pMusicSourceVoice, (WAVEFORMATEX *)&voiceFormat, XAUDIO2_VOICE_MUSIC );
|
||||
#endif
|
||||
soundSystemLocal.hardware.GetIXAudio2()->CreateSourceVoice( &pMusicSourceVoice, (WAVEFORMATEX *)&voiceFormat/*, XAUDIO2_VOICE_MUSIC*/ );
|
||||
// RB end
|
||||
|
||||
Music_initialized = true;
|
||||
|
|
|
@ -165,6 +165,10 @@ int Mus2Midi(unsigned char* bytes, unsigned char* out, int* len)
|
|||
|
||||
// current position in read buffer
|
||||
unsigned char* cur = bytes,* end;
|
||||
if( cur[0] != 'M' || cur[1] != 'U' || cur[2] != 'S' )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Midi header(format 0)
|
||||
MidiHeaderChunk_t midiHeader;
|
||||
|
|
Loading…
Reference in a new issue