David, who died on Saturday, suffered a major stroke in March and was struck again on Tuesday, according to his wife. She said that "even at the end," her husband "always had a song in his head."
David penned dozens of timeless songs with Burt Bacharach that were featured in movies and television. Their tunes were also sung by a variety of recording artists in the 1960s and beyond.
The two won an Oscar for "Raindrops Keep Fallin' On My Head" when it was featured in the movie "Butch Cassidy and the Sundance Kid."
Several of their other hits were recorded by Dionne Warwick, including "Walk On By," "I Say a Little Prayer," Do You Know the Way to San Jose" and "Always Something There to Remind Me."
The pair's song for the movie "What's New, Pussycat" was a hit for Tom Jones.
In May, Bacharach and David received the Library of Congress Gershwin Prize for Popular Song during a White House tribute concert attended by President Barack Obama. David wasn't able to attend because of the stroke he had suffered.
The Associated Press contributed to this report.