The challenge is: generate an audio file made of white noise.
Requirements and instructions:
- Your program must generate an audio file containing only white noise, meaning its intensity is the same for all (reasonable) frequencies and nonzero [see an example plot];
- One must be able to play the audio file on the latest version of VLC [at the time of writing your answer];
- The program doesn't need cryptographically-strong randomness,
rand
functions or reading from/dev/rand
is okay; - The program must be able to generate at least 1 hour of audio, at least in theory (meaning system limitations like maximum filesize don't apply);
- Your score is the number of bytes in your source code, plus all bonuses that apply;
- Using any third-party, external library is okay;
- The program must work without access to the Internet.
Bonuses are:
- -15%: Allow to specify the format of the audio file (at least two choices; the number of possible choices doesn't change the score);
- -10%: Allow to specify the duration of the audio file;
- -5%: Allow to specify the bitrate of the audio file.
The settings can be stored in variables, files, or given as command line parameters, your choice. Percentages are calculated from the original number of bytes, before any bonus is applied.