Last active
December 12, 2015 07:01
-
-
Save yorung/3c34e13a4b601ef41a26 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class SL { | |
| SLObjectItf engineObject = nullptr; | |
| SLEngineItf engineEngine = nullptr; | |
| SLObjectItf outputMixObject = nullptr; | |
| public: | |
| SL() { | |
| SLHandleError(slCreateEngine(&engineObject, 0, nullptr, 0, nullptr, nullptr)); | |
| SLCall(engineObject, Realize, SL_BOOLEAN_FALSE); | |
| SLCall(engineObject, GetInterface, SL_IID_ENGINE, &engineEngine); | |
| SLInterfaceID ids = SL_IID_ENVIRONMENTALREVERB; | |
| SLboolean req = SL_BOOLEAN_FALSE; | |
| SLCall(engineEngine, CreateOutputMix, &outputMixObject, 1, &ids, &req); | |
| SLCall(outputMixObject, Realize, SL_BOOLEAN_FALSE); | |
| } | |
| ~SL() { | |
| SafeDestroy(outputMixObject); | |
| SafeDestroy(engineObject); | |
| engineEngine = nullptr; | |
| } | |
| SLEngineItf GetEngine(){ return engineEngine; } | |
| SLObjectItf GetOutputMixObject() { return outputMixObject; } | |
| }; | |
| static SL sl; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment