:radio: Analog radio emulator
About
This package distorts the online audio stream so it sounds like a radio broadcast. You can adjust the volume so it's very soft with a lot of noise. The AudioContext API is used, so it only works in your browser.
Portable radio
This web app uses that plugin.
Install
dart pub add analog_radio
Using
// Creating radio instance. Will be created audiocontext with audio processing.
var radio = AnalogRadio();
// Start playing sound. You will be able to hear the radio noise
radio.turnOn();
// You set up the "radio receiver" for a specific audio stream with a signal level of 0.9.
// You will hear an audio stream with a slight addition of noise and distortion.
radio.tune('https://vip2.fastcast4u.com/proxy/classicrockdoug?mp=/1', 0.9);
// With a signal level of 0.3, the audio stream will be heard very poorly with a high level of interference
radio.tune('https://vip2.fastcast4u.com/proxy/classicrockdoug?mp=/1', 0.3);
// Stop playing sound
radio.turnOff();
Developing
dart pub global activate webdev
dart pub get
webdev serve --release