I just removed it when trying simplest case and it worked without.
Not sure, there might be cases where it would be required, so you might want to add it into the pipeline, it shouldn’t result into a significant overhead if there is no resampling to be done.
Not all audio sinks (e.g. soundcards) can handle all sample rates. If there is a mismatch between what the sink can handle and what the rest of the pipeline is using, you need the audioresample. Same principle for audioconvert. Usually you want to keep these elements in and ensure your pipeline is robust, as mentioned, there’s no perf penalty in the cases they’re not needed.
I’ve encountered a problem with decodebin. As soon as I use it, GST_STATE_READY and GST_STATE_PLAYING no longer work.
If I upload my piece of music like this, I can do READY, PLAYING and PAUSED as much as I want. Even when the piece has finished playing, I can go to READY and then PLAYING and it starts again from the beginning.