MCPcopy Create free account
hub / github.com/bulletphysics/bullet3 / sampleRateChanged

Function sampleRateChanged

examples/TinyAudio/RtAudio.cpp:3908–3930  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3906}
3907
3908static void sampleRateChanged(ASIOSampleRate sRate)
3909{
3910 // The ASIO documentation says that this usually only happens during
3911 // external sync. Audio processing is not stopped by the driver,
3912 // actual sample rate might not have even changed, maybe only the
3913 // sample rate status of an AES/EBU or S/PDIF digital input at the
3914 // audio device.
3915
3916 RtApi *object = (RtApi *)asioCallbackInfo->object;
3917 try
3918 {
3919 object->stopStream();
3920 }
3921 catch (RtAudioError &exception)
3922 {
3923 std::cerr << "\nRtApiAsio: sampleRateChanged() error (" << exception.getMessage() << ")!\n"
3924 << std::endl;
3925 return;
3926 }
3927
3928 std::cerr << "\nRtApiAsio: driver reports sample rate changed to " << sRate << " ... stream stopped!!!\n"
3929 << std::endl;
3930}
3931
3932static long asioMessages(long selector, long value, void * /*message*/, double * /*opt*/)
3933{

Callers

nothing calls this directly

Calls 2

getMessageMethod · 0.60
stopStreamMethod · 0.45

Tested by

no test coverage detected