Unfortunately, once you've been friends with someone for a while, they start to think of you in a certain way and it's very hard to change their point of view if you develop feelings for them (resulting in "I just don't think of you in that way" type of responses).
However, for me, the constant wondering/hoping is much, much worse than being sure of how the other person feels, even if you get bad news. Once you know, you can decide what to do.
If they don't reciprocate, neither of your choices are good. You basically have to pick between experiencing constant bits of pain over a long time, or intense pain for a relatively short time and then being able to move on.
If you decide to stay friends you'll have to constantly remind yourself they're not for you. It might stay fun at first, but time spent together will be bittersweet (becoming more bitter than sweet as time goes by). Be prepared to feel a little part of yourself die every time they show interest in someone else. It's torture to be in close proximity to someone you want but can't have.
If you walk away it will hurt like hell, maybe for weeks (depending on how close you are). However, as long as you're willing to feel the pain to work through it, (while treating yourself gently), as time passes it will hurt less and less. Pain is temporary - unless you are unable to let go of it.
Eventually, though, you'll get to the point where you've let go and are able to move on.
Once you get to that point, you may be able to pick up the friendship again, without those messy non-platonic feelings interfering.
Good luck, either way.