Said film was Sleeper (1973) which is a completely barmy comedy about Miles Monroe (played by Woody Allen), a man who is frozen after ulcer surgery goes wrong, and is then woken 200 years later in a very different world.
I loved the New Orleans jazz music so much that I recorded bits of the film onto cassette, and would listen to it on my Walkman (remember those?). Woody Allen played the clarinet with the Preservation Hall Jazz Band for the soundtrack. Unfortunately you still cannot seem to get any form of the soundtrack, but I might try a digital version of that same soundtrack edit, as I've not found any New Orleans jazz that has the same feel.
Allen only really did a couple of other slapstick type films, that weren't as good as Sleeper IMO. And his other comedy films are of a different type.
And despite Allen's rather odd life, more so in his later years, I still love Sleeper.