# How is the bufferSwitch() timed/synced

**URL:** <https://forums.steinberg.net/t/how-is-the-bufferswitch-timed-synced/201923>\
**Category:** ASIO\
**Created:** [September 14, 2019, 9:50am UTC](https://forums.steinberg.net/t/how-is-the-bufferswitch-timed-synced/201923 "2019-09-14T09:50:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![audiomania](https://avatars.discourse-cdn.com/v4/letter/a/b782af/32.png) [@audiomania](https://forums.steinberg.net/u/audiomania)\
**Post date:** [September 14, 2019, 9:50am UTC](https://forums.steinberg.net/t/how-is-the-bufferswitch-timed-synced/201923/1 "2019-09-14T09:50:49Z")

</div>

Hello,  
I want to make my own virtual ASIO device. For this I would like to understand how clocking/syncing for ASIO works.

Is it correct that each ASIO device generates its own bufferSwitch() timing according to the connected hardware?  
If so, how are two different ASIO devices synced?  
If I connect two cards with ASIO output for instance, they will generate each their own bufferSwitch() calls. Right?  
But the applications that wants to output to both these devices, how does it handle that? The buffer filling will shift slowly in time and at some point a buffer will need to be skipped or repeated.

---

<div class="post-metadata">

**Author:** ![robertopisa](https://avatars.discourse-cdn.com/v4/letter/r/d26b3c/32.png) [@robertopisa](https://forums.steinberg.net/u/robertopisa)\
**Post date:** [February 23, 2021, 7:17pm UTC](https://forums.steinberg.net/t/how-is-the-bufferswitch-timed-synced/201923/2 "2021-02-23T19:17:04Z")

</div>

ASIO was initially conceived to have exclusive access. So you could handle only one ASIO driver. Now there are implementations that are more flexible. For example, see

> **[GitHub - dechamps/FlexASIO: A flexible universal ASIO driver that uses the...](https://github.com/dechamps/FlexASIO)**
>
> A flexible universal ASIO driver that uses the PortAudio sound I/O library. Supports WASAPI (shared and exclusive), KS, DirectSound and MME. - GitHub - dechamps/FlexASIO: A flexible universal ASIO ...

Cheers  
-R
