MCPcopy Create free account
hub / github.com/LabSound/LabSound / sampleRateChanged

Function sampleRateChanged

src/backends/RtAudio/RtAudio.cpp:4030–4052  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4028}
4029
4030static void sampleRateChanged(ASIOSampleRate sRate)
4031{
4032 // The ASIO documentation says that this usually only happens during
4033 // external sync. Audio processing is not stopped by the driver,
4034 // actual sample rate might not have even changed, maybe only the
4035 // sample rate status of an AES/EBU or S/PDIF digital input at the
4036 // audio device.
4037
4038 RtApi * object = (RtApi *) asioCallbackInfo->object;
4039 try
4040 {
4041 object->stopStream();
4042 }
4043 catch (RtAudioError & exception)
4044 {
4045 std::cerr << "\nRtApiAsio: sampleRateChanged() error (" << exception.getMessage() << ")!\n"
4046 << std::endl;
4047 return;
4048 }
4049
4050 std::cerr << "\nRtApiAsio: driver reports sample rate changed to " << sRate << " ... stream stopped!!!\n"
4051 << std::endl;
4052}
4053
4054static long asioMessages(long selector, long value, void * /*message*/, double * /*opt*/)
4055{

Callers

nothing calls this directly

Calls 1

stopStreamMethod · 0.45

Tested by

no test coverage detected