implemented flac and mp3 encoding features