MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / ossCleanup

Function ossCleanup

extlibs/soloud/src/backend/oss/soloud_oss.cpp:84–109  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82 }
83
84 static void ossCleanup(Soloud *aSoloud)
85 {
86 if (0 == aSoloud->mBackendData)
87 {
88 return;
89 }
90 OSSData *data = static_cast<OSSData*>(aSoloud->mBackendData);
91 data->audioProcessingDone = true;
92 if (data->threadHandle)
93 {
94 Thread::wait(data->threadHandle);
95 Thread::release(data->threadHandle);
96 }
97 ioctl(data->ossDeviceHandle, SNDCTL_DSP_RESET, 0);
98 if (0 != data->sampleBuffer)
99 {
100 delete[] data->sampleBuffer;
101 }
102 if (0 != data->buffer)
103 {
104 delete[] data->buffer;
105 }
106 close(data->ossDeviceHandle);
107 delete data;
108 aSoloud->mBackendData = 0;
109 }
110
111 result oss_init(Soloud *aSoloud, unsigned int aFlags, unsigned int aSamplerate, unsigned int aBuffer, unsigned int aChannels)
112 {

Callers

nothing calls this directly

Calls 2

waitFunction · 0.85
releaseFunction · 0.85

Tested by

no test coverage detected