GerbilSoft / gens-gs-ii

Gens/GS II - an improved Gens/GS rewrite.
31 stars 9 forks source link

Choppy audio on gens-qt4 (Windows 7) #58

Open wyrex opened 8 years ago

wyrex commented 8 years ago

Hi. I tried to build gens and got it work with MSVC 2010 and NMake (other msvc toolsets fail and can't compile in visual studio because starscream fails). It seems to work otherwise well but sounds lag badly in Qt GUI, in SDL it works normally. It might be just my version, or should this happen with https://github.com/GerbilSoft/gens-gs-ii/commit/a1b633b2e52622ebcc6a2624b43356122c12e8b4 ?

D:\gens>mkdir build && cd build
D:\gens\build>E:\VisualStudio2010\VC\vcvarsall.bat

D:\gens\build>cmake -G "NMake Makefiles" -DSDL2_LIBRARY=E:\SDL2\lib\x86\SDL2.lib
 -DSDL2_INCLUDE_DIR=E:\SDL2\include -DENABLE_GENS_QT4=1 -DCMAKE_BUILD_TYPE=Release
 -DPORTAUDIO_INCLUDE_DIR=..\extlib\portaudio\include -DPORTAUDIO_LIBRARY=..\extlib\
 portaudio\lib\portaudio_x86.lib ..
portaudio v19
(rest from about window)
Internal copy of zlib-1.2.8
Internal copy of MiniZip 1.1.
Internal copy of the LZMA SDK 9.20.
Internal copy of GLEW 1.13.0.

Compiled using Qt 4.8.6.
Using Qt 4.8.6.
CPU flags: (none)
Timing method: QueryPerformanceCounter()

Save directory:
C:\Users\me\AppData\Roaming\gens-gs-ii\
System ANSI code page: 932 (ANSI/OEM - Japanese Shift-JIS)
System OEM code page: 932 (ANSI/OEM - Japanese Shift-JIS)
Using Unicode strings for Win32 API.

OpenGL vendor string: ATI Technologies Inc.
OpenGL renderer string: AMD Radeon R9 200 Series
OpenGL version string: 4.5.13431 Compatibility Profile Context 16.150.0.0
GLSL version string: 4.50

GLEW version: 1.13.0
Using GL extensions:
• GL_EXT_bgra
• GL_EXT_packed_pixels
• GL_ARB_fragment_program

build gives some of these in SoundMgr.cpp

warning C4744: 'static int * LibGens::SoundMgr::ms_SegBufL' has different type in 'D:\gens\src\libgens\sound\SoundMgr.cpp' and 'D:\gens\src\libgens\sound\SoundMgr_write.cpp': '__declspec(align(16)) array (3840 bytes)' and 'array (3840 bytes)'
warning C4742: 'static int * LibGens::SoundMgr::ms_SegBufR' has different alignment in 'D:\gens\src\libgens\EmuContext\EmuMD.cpp' and 'D:\gens\src\libgens\sound\SoundMgr.cpp': 4 and 16
GerbilSoft commented 8 years ago

This is a known issue. PortAudio is apparently rather awful, and my sound code in the Qt build is a mess.

I mostly started the SDL build to get video/audio sync working; sometime after the initial tech preview (which should be soon, hopefully...), I'll be backporting the improved code to the Qt4 frontend.

Not sure about the SoundMgr issues; I'll take a look at that later.