In musical theatre diegetic music has the same meaning. It is music in the narrative of the story. This is not necessarily when characters sing and are unaware. However, it is when there is a song literarily in the plot. For instance, in the "Sound of Music" the song Edelweiss is diegetic. Captain von Trapp is performing it in the story for others in the story.