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.
Sound perfectly works for me.
In that example code [soundstream.d], there's a MySoundStream class that inherits from the abstract class SoundStream.
Well most of the code in audio is still from old DSFML1 times because I've only used sound and music so far.
The soundstream example compiles now but doesn't play anything. Probably need to fix the whole dsfml soundstream module.
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.
The second comment belongs to onGetData.
Here's the sample modules which I've edited so they compile:
pong.d
Thanks. I've edited them to really account for the property syntax though. Check my commit.
End.characterSize = 60;
and so on