I have a microphone with a 3,5mm male audio plug and I want to simultaneously listen to it with headphones and also record it on an audio recorder. Would a simple Y-connection like

Y

work?