Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Java
  4. how to send live recording audio

how to send live recording audio

Scheduled Pinned Locked Moved Java
helptutorial
1 Posts 1 Posters 2 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    manju23reddy
    wrote on last edited by
    #1

    hi i have a below code which was supposed to record every 100ms and send the data to pc via bluetooth but every time the loop starts i asks for permission to access mic and also permission to store the recorded data but i need to supress this message is it possible if so please help me this is my code public void recordData() { dips = Display.getDisplay(this); m_CmdStop = new Command("stop", Command.SCREEN, 1); form = new Form("record"); form.addCommand(m_CmdStop); dips.setCurrent(form); try { DataOutputStream dos = m_Con.openDataOutputStream(); Player p = Manager.createPlayer("capture://audio"); p.realize(); p.prefetch(); RecordControl rc = (RecordControl)p.getControl("RecordControl"); p.start(); while(m_EndNow != true) { ByteArrayOutputStream output = new ByteArrayOutputStream(); rc.setRecordStream(output); rc.startRecord(); //p.start(); Thread.sleep(100); rc.commit(); //p.stop(); rc.stopRecord(); dos.writeUTF(output.toString()); } p.stop(); dos.close(); } catch(Exception e) { Log.log(e.getMessage()); } }

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups