mpradio icon indicating copy to clipboard operation
mpradio copied to clipboard

can this recive airwaves from a anntena and transmit via BT?

Open tarbear123 opened this issue 3 years ago • 1 comments

`int play_bt(string device) { string sox_params=""; string output="sudo /usr/local/bin/"+s.implementation+" "+s.opSwitch+"ps 'BLUETOOTH' "+s.opSwitch+"rt 'A2DP BLUETOOTH' "+s.opSwitch+"freq "+s.freq+" "+s.opSwitch+"audio -"; set_output(output); /**< change output device if specified */ set_effects(sox_params);

ps.songName = "Bluetooth";
update_now_playing();

string cmdline="arecord -D bluealsa:HCI=hci0,DEV="+device+" -f cd -c 2 | sox -t raw -v "+s.btGain+" -G -b 16 -e signed -c 2 -r 44100 - -t wav - "+sox_params+" | "+output;
cout<<"CMDLINE: "<<cmdline<<endl;
//string cmdline="arecord -D bluealsa -f cd -c 2 | sox -t raw -v "+s.btGain+" -G -b 16 -e signed -c 2 -r 44100 - -t wav - "+sox_params+" | "+output;  //legacy mode

system(cmdline.c_str());
return 0;`

tarbear123 avatar Jul 30 '21 15:07 tarbear123

`int play_bt(string device) { string sox_params=""; string output="sudo /usr/local/bin/"+s.implementation+" "+s.opSwitch+"ps 'BLUETOOTH' "+s.opSwitch+"rt 'A2DP BLUETOOTH' "+s.opSwitch+"freq "+s.freq+" "+s.opSwitch+"audio -"; set_output(output); /**< change output device if specified */ set_effects(sox_params);

ps.songName = "Bluetooth";
update_now_playing();

string cmdline="arecord -D bluealsa:HCI=hci0,DEV="+device+" -f cd -c 2 | sox -t raw -v "+s.btGain+" -G -b 16 -e signed -c 2 -r 44100 - -t wav - "+sox_params+" | "+output;
cout<<"CMDLINE: "<<cmdline<<endl;
//string cmdline="arecord -D bluealsa -f cd -c 2 | sox -t raw -v "+s.btGain+" -G -b 16 -e signed -c 2 -r 44100 - -t wav - "+sox_params+" | "+output;  //legacy mode

system(cmdline.c_str());
return 0;`

hello?

tarbear123 avatar Aug 06 '21 17:08 tarbear123