You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
gui/src/main.rs

45 lines
1.4 KiB

#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
// hide console window on Windows in release
pub use crate::player::Player;
pub use crate::app::App;
mod app;
mod player;
mod tor;
mod stats;
mod irc;
// "http://wowradiod6mhb4ignjqy5ghf5l42yh2yeumgeq3yi7gn7yqy3efhe5ad.onion"
// "http://wowradiof5wx62w4avdk5fwbvcoea2z4ul2q3awffn5vmfaa3vhlgiid.onion"
// "http://radio.poysibicsj73uhw7sjrv3fyopoyulrns4nlr5amyqdtafkqzlocd4qad.onion"
// "http://anonyradixhkgh5myfrkarggfnmdzzhhcgoy2v66uf7sml27to5n2tid.onion"
// "http://u2frppcgwqmoca7h3hu5l72upkwhcf2n6umrkqsnvnpahjynkre6sqyd.onion:8300/radio"
// "https://radio.wownero.com/wow.ogg"
pub const TOR_DATA: &str = &"/tmp/tor-rust";
pub const TOR_LOG: &str = &"/tmp/tor-rust/tor.log";
pub const RADIO_STREAM: &str = &"radio.ogg";
fn cleanup() {
let r: std::io::Result<()> = std::fs::remove_file(&RADIO_STREAM);
match r {
_ => ()
}
}
fn main() {
let (_stream, stream_handle) = rodio::OutputStream::try_default().unwrap();
let sink: rodio::Sink = rodio::Sink::try_new(&stream_handle).unwrap();
let player: player::Player = player::Player::new(sink, stream_handle);
let mut app: app::App = app::App::default();
app.player = player;
let options: eframe::NativeOptions = eframe::NativeOptions::default();
eframe::run_native(
"lza gui",
options,
Box::new(|_cc| Box::new(app)),
);
let _ = cleanup();
}