Stepan Podoskin
2013-09-20 16:29:48 UTC
I commited support for sound. It works with both software and OpenAL renderers and also with realtime and non-realtime recoding. Its main drawback is that no sound is played, it is only recorded. There is ‘SndSys.Loopback’ boolean config variable to enable/disable it.
I moved FillDriverBuffer(…) from iSndSysRendererSoftware to iSndSysRenderer. Videorecorder then calls FillDriverBuffer directly to get sound samples.
In software renderer implementation is simple: it checks if ‘SndSys.Loopback’ is set to true and doesn’t load any audio driver in that case.
In OpenAL renderer ALC_SOFT_loopback extension is used: if ‘SndSys.Loopback’ is set to true then loopback device is created instead of usual one and alcRenderSamplesSOFT is called in FillDriverBuffer(…)
FillDriverBuffer should be renamed to something like FillSoundBuffer, because it is now used not only by sound drivers.
I tested software renderer on Windows and OpenAL renderer on Kubuntu 13.04. OpenAL that comes with CS on Windows doesn’t have necessary extension and software renderer crashes for me on Linux.
My previous implementation which uses output filters is still there. It works only with software renderer and only in realtime mode but it have the advant
I moved FillDriverBuffer(…) from iSndSysRendererSoftware to iSndSysRenderer. Videorecorder then calls FillDriverBuffer directly to get sound samples.
In software renderer implementation is simple: it checks if ‘SndSys.Loopback’ is set to true and doesn’t load any audio driver in that case.
In OpenAL renderer ALC_SOFT_loopback extension is used: if ‘SndSys.Loopback’ is set to true then loopback device is created instead of usual one and alcRenderSamplesSOFT is called in FillDriverBuffer(…)
FillDriverBuffer should be renamed to something like FillSoundBuffer, because it is now used not only by sound drivers.
I tested software renderer on Windows and OpenAL renderer on Kubuntu 13.04. OpenAL that comes with CS on Windows doesn’t have necessary extension and software renderer crashes for me on Linux.
My previous implementation which uses output filters is still there. It works only with software renderer and only in realtime mode but it have the advant