ma_node_set_state(pSound,ma_node_get_state(pSound)&~ma_node_state_started);/* Don't set to ma_node_state_stopped directly because we want to maintain the ma_node_state_muted flag. Instead just clear the started flag. */
c89atomic_exchange_32(&pSound->isPlaying,MA_FALSE);/* TODO: Delete this once the ma_node integration is done. */
/* Slow path. Need to do sample format conversion to f32. If we give the f32 buffer the same count as the first temp buffer, we're guaranteed it'll be large enough. */
floattempf32[MA_DATA_CONVERTER_STACK_BUFFER_SIZE];/* Do not do `MA_DATA_CONVERTER_STACK_BUFFER_SIZE/sizeof(float)` here like we've done in other places. */
returnMA_INVALID_ARGS;/* Config must be specified. */
}
if(pConfig->pEngine==NULL){
returnMA_INVALID_ARGS;/* An engine must be specified. */
}
if(pConfig->type==ma_engine_node_type_sound){
/* Sound. */
baseNodeConfig=ma_node_config_init(&g_ma_engine_node_vtable__sound,pConfig->channelsIn,pConfig->pEngine->channels);/* The processing function will convert from the data source's channel count to the engine's. */
/* We need to initialize the engine effect. This is what will be applying our pan/pitch/fade/etc. This is temporary until we migrate away from the old ma_engine stuff. */
/* The effect needs to be reset. This is temporary while we're in the process of migrating away from ma_effect. Later on it'll be a more streamlined reset. */