It seems to be an issue with OpenAl:
First-chance exception at 0x6b6252ba (openal32.dll) in pong.exe: 0xC0000005: Access violation reading location 0x01b2b7f0.
Unhandled exception at 0x6b6252ba (openal32.dll) in pong.exe: 0xC0000005: Access violation reading location 0x01b2b7f0.
Removing audio-related code in Pong will stop the app from crashing at exit. I couldn't hear the sound anyway so there's definitely something broken somewhere.
The same thing happens with the soundstream.d example, which compiles and runs but doesn't output any sound and crashes at exit.
In that example code [soundstream.d], there's a MySoundStream class that inherits from the abstract class SoundStream. I had to add the following method because I couldn't instantiate the class:
void onSeek()
{
}
The module import/dsfml/audio/soundstream.d defines the abstract SoundStream and the onSeek() method has these comments:
/**
* Called each time the stream is seeked
*/
abstract void onSeek();
/**
* Called each time the stream needs new data.
* This method will be call by an other thread, take care of possible synchronisation issues.
*
* Params:
* data = array of samples to stream
*
* Returns:
* true to continue streaming, false to stop
*/
If it returns a bool, it can't have a void return type. I had to make the implementing class define this method as a void because I can't redefine the return value of a method, since that is an error.
Here's the sample modules which I've edited so they compile:
pong.dsoundstream.dI've compiled with:
xfbuild FILE.d +v +xcore +xstd +o..\bin\ -release -O -inline -I..\..\..\import
Hope that helps..