Stream Audio from PC to Phone(Android) using SCO over Bluetooth -


on phone:

// configure audio: bluetoothaudio = (audiomanager)this.getsystemservice(context.audioservice); bluetoothaudio.mode = mode.incall; bluetoothaudio.bluetoothscoon = true; bluetoothaudio.startbluetoothsco(); 

on pc:

public byte[] audiobytedata { get; set; }  public int streamstartposition { get; set; }  public int streamendposition { get; set; }  public streamaudio(byte[] audiodata) { this.audiobytedata = audiodata;  audiotimer.elapsed += audiotimer_elapsed; audiotimer.interval = 20; audiotimer.enabled = true; audiotimer.start(); }  private void audiotimer_elapsed(object sender, system.timers.elapsedeventargs e) { throw new notimplementedexception(); } 

according documentation have read, article: creating audio applications bluetooth example, sending byte chunks on period of time, way 'stream' if audio on bluetooth:

in mp3 application, suppose device sending mp3 stream file encoded @ 128 kbit/sec , 48 khz sample frequency. means mp3 audio frame 384 bytes long sent every 24.0 msec. so, if device sets periodic timer 24.0 msec , sends packet when timer expires constant bit rate maintained.

my question is, there better way this?


Comments

Popular posts from this blog

PySide and Qt Properties: Connecting signals from Python to QML -

c# - DevExpress.Wpf.Grid.InfiniteGridSizeException was unhandled -

scala - 'wrong top statement declaration' when using slick in IntelliJ -