Android > 4.0 : Ideas how to record/capture internal audio (e.g. STREAM_MUSIC)?

前端 未结 1 570
不知归路
不知归路 2020-12-23 09:29

Some months ago, with Android ICS (4.0), I developed an android kernel module which intercepted the \"pcmC0D0p\"-module to fetch all system audio.

My target is to st

相关标签:
1条回答
  • 2020-12-23 10:28

    You must pass audio traffic through your local socket server:

    1. Create local socket server

    2. Modify audio http stream address to path is thru your local socket server, for example for address

      http://example.com/stream.mp3  ->
      
      http://127.0.0.1:8888/http://example.com/stream.mp3
      

      where 8888 is your socket port.

    3. Play

      http://127.0.0.1:8888/http://example.com/stream.mp3 
      

      with default media player

    4. Read all incoming requests to port 8888 in your local socket server, analyze it and pass to example.com server.

    5. Read response from example.com and pass it to local client (media player). HERE you can capture audio stream!

    0 讨论(0)
提交回复
热议问题