Whine in engine, at 40 mph, not exhaust leak?
Try to isolate the noise, by having someone rev the engine while you put your ear under the hood. You may have a bad drive pulley or belt tensioner or idler pulley. Without more info it's hard to suggest where to look.
Is the whine actually radio noise? If so you may need to install a radio noise suppressor.
Noise is only when car is moving. Unrelated to engine revs. Seems less when bearing right.
Looking for a Used Accent in your area?
CarGurus has 12,630 nationwide Accent listings starting at $1,250.
Search Hyundai Accent Questions
Hyundai Accent Experts