<div dir="ltr">Hi everyone,<div><br></div><div>I am looking for help with a rather unusual problem.</div><div>For a reinforcement learning project, we want to run a computer game much faster than realtime, and on top of capturing the rendered output, we also want to capture the sound that the player perceives.</div><div><br></div><div>Naturally, the game uses OpenAL, which I have very little experience with. I understand that the game defines multiple emitters, filters, there's Doppler shift depending on object velocities, etc. So, the sound pipeline is rather complicated and the final sound is highly non-trivial. I cannot just rewrite everything without using OpenAL.</div><div><br></div><div>My question is, is it possible to get programmatic access to the sounds played during every particular frame of the game?</div><div><br></div><div>An example to be more concrete. Let's say the normal framerate of the game is 60FPS. I am running the game 10 times faster than realtime, so at 600FPS (10x is not important, I want to run the game as fast as hardware allows, the exact speedup is not known). At some point, a game event triggers a sound that under normal circumstances would play for 1 second, so for 60 game ticks. In my fast simulation it only lasts 0.1 seconds, and the same 60 game ticks.</div><div><br></div><div>Can I record the sound samples that would have been played during every game tick if it ran normally, such that if I record everything and play it back at the normal speed, it would be indistinguishable from normal sounds?</div><div><br></div><div>This question on SO didn't get much attention: <a href="https://urldefense.com/v3/__https://stackoverflow.com/questions/62945506/programmatic-access-to-a-sound-played-through-openal__;!!LIr3w8kk_Xxm!5zD0XPJENUmu2H1nDIKTLu7b6izQvainqM5bIciOFWAaCUHNL4r6xTAc2XleU4g$" target="_blank">https://stackoverflow.com/questions/62945506/programmatic-access-to-a-sound-played-through-openal</a></div></div>