implemented audio buffer validation