/* Create only a single device. The decoders will be mixed together in the callback. In this example the data format needs to be the same as the decoders. */
We can't stop in the audio thread so we instead need to use an event. We wait on this thread in the main thread, and signal it in the audio thread. This
needs to be done before starting the device. We need a context to initialize the event, which we can get from the device. Alternatively you can initialize
a context separately, but we don't need to do that for this example.
*/
ma_event_init(device.pContext,&g_stopEvent);
/* Now we start playback and wait for the audio thread to tell us to stop. */