MCPcopy Create free account
hub / github.com/SFML/SFML / stop

Method stop

src/SFML/Audio/SoundRecorder.cpp:324–339  ·  view source on GitHub ↗

///////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

322
323////////////////////////////////////////////////////////////
324void SoundRecorder::stop()
325{
326 // Stop the capturing device if one is started
327 if (m_impl->captureDevice && ma_device_is_started(&*m_impl->captureDevice))
328 {
329 // Stop the capture
330 if (const auto result = ma_device_stop(&*m_impl->captureDevice); result != MA_SUCCESS)
331 {
332 err() << "Failed to stop audio capture device: " << ma_result_description(result) << std::endl;
333 return;
334 }
335
336 // Notify derived class
337 onStop();
338 }
339}
340
341
342////////////////////////////////////////////////////////////

Callers

nothing calls this directly

Calls 1

onStopFunction · 0.85

Tested by

no test coverage detected