STM32 I2S Interupt Usage
the interupts were generated too quickly and the code in the main loop never executed


This is always the case when you forgot to clear an interrupt flag - the Handler gets executed again and again.

The code above does not clear the SPI_I2S_FLAG_TXE flag in the CODEC_I2S register. There may be other flags you need to clear - look in the datasheet/manual.