wav: make sure neither data_size nor sample_count is negative.