Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/antitim/analog_radio
Analog radio emulator
https://github.com/antitim/analog_radio
dart flutter
Last synced: about 1 month ago
JSON representation
Analog radio emulator
- Host: GitHub
- URL: https://github.com/antitim/analog_radio
- Owner: antitim
- License: bsd-3-clause
- Created: 2022-06-19T18:23:20.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-09-29T20:20:38.000Z (3 months ago)
- Last Synced: 2024-11-23T12:34:44.057Z (about 2 months ago)
- Topics: dart, flutter
- Language: Dart
- Homepage:
- Size: 27.3 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# :radio: Analog radio emulator
[![pub package](https://img.shields.io/pub/v/analog_radio.svg)](https://pub.dev/packages/analog_radio)
[![Web Demo](https://img.shields.io/badge/Radio-Demo-FFB300.svg)](https://analog-radio-example.web.app/)## 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.
[Example](https://analog-radio-example.web.app/)
## Portable radio
This web app uses that plugin.
[![](https://portable-radio.tim-v.com/icons/Icon-192.png)](https://portable-radio.tim-v.com)
## Install
```sh
dart pub add analog_radio
```## Using
```dart
// 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
```sh
dart pub global activate webdev
dart pub get
webdev serve --release
```