If you're in the SF Bay Area, you could contact the San Francisco Audiophile Foundation. I don't know if they're actively soliciting donations, but they are a 501c3 organization, so it would be deductible. I haven't been to a meeting in a while, but they always had boxes of donated CDs & LPs for sale. I don't recall any w/o the original packaging, though. They may also accept equipment.
At least you'd know that the first people to get a crack at them would be card-carrying audiophiles!
Also, with respect to the public library, I think they need special licensing from the publishers, and can't use items that were privately purchased. However, there may be an affiliated "friends of the library" group that can accept donations and holds periodic sales locally.