Some new code considering wav format