Advertisement
Guest User

Untitled

a guest
Feb 11th, 2016
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.23 KB | None | 0 0
  1. /*
  2. * create fast path audio player: SL_IID_BUFFERQUEUE and SL_IID_VOLUMEinterfaces ok,
  3. * NO others!
  4. */
  5.  
  6. SLInterfaceID ids[3] = { SL_IID_BUFFERQUEUE, SL_IID_VOLUME,
  7. SL_IID_ANDROIDCONFIGURATION};
  8. SLboolean req[3] = {SL_BOOLEAN_TRUE, SL_BOOLEAN_TRUE,SL_BOOLEAN_TRUE};
  9. result = (*slEngine)->CreateAudioPlayer(slEngine,
  10. &playerObjectItf_, &audioSrc, &audioSnk,(ids)/sizeof(ids[0]), ids, req);
  11. SLASSERT(result);
  12.  
  13. // Force the use of the earspeaker
  14. SLAndroidConfigurationItf playerConfig;
  15. result = (*playerObjectItf_)->GetInterface(playerObjectItf_,
  16. SL_IID_ANDROIDCONFIGURATION, (void*)&playerConfig);
  17. SLASSERT(result);
  18.  
  19. SLint32 streamType = SL_ANDROID_STREAM_VOICE;
  20. result = (*playerConfig)->SetConfiguration(playerConfig,
  21. SL_ANDROID_KEY_STREAM_TYPE,streamType, sizeof(SLint32));
  22. SLASSERT(result);
  23.  
  24. // Output thread
  25. ...
  26. 4 Tracks of which 1 are active
  27. Name Active Client Type Fmt Chn mask Session fCount S F SRate L dB R dB Server Main buf Aux Buf Flags UndFrmCnt
  28. F 5 no 701 1 00000001 00000003 36 9065 S 1 48000 -inf -inf 00002369 0xb8caf900 0x0 0x600 0
  29. F 3 yes 4015 0 00000001 00000001 51 480 A 1 48000 0 0 00063F60 0xb8caf900 0x0 0x400 0
  30. F 1 no 547 1 00000001 00000003 49 4512 S 1 48000 -inf -inf 000011A0 0xb8caf900 0x0 0x600 0
  31. F 2 no 547 1 00000001 00000003 52 4512 S 1 48000 -inf -inf 000011A0 0xb8caf900 0x0 0x600 0
  32. 0 Effect Chains
  33.  
  34. // Input Thread
  35. Buffer size: 480 bytes
  36. Fast capture thread: yes
  37. Fast track available: no
  38. ...
  39. 1 Tracks of which 1 are active
  40. Active Client Fmt Chn mask Session S Server fCount SRate
  41. yes 4015 1 00000010 53 6 00064AA0 2048 48000
  42. 0 Effect Chains
  43.  
  44. 01-15 01:07:05.805 9722-11421/com.google.sample.echo D/AUDIO-ECHO: RECORDER CALLBACK
  45. 01-15 01:07:05.825 9722-11421/com.google.sample.echo D/AUDIO-ECHO: RECORDER CALLBACK
  46. 01-15 01:07:05.845 9722-11421/com.google.sample.echo D/AUDIO-ECHO: RECORDER CALLBACK
  47. 01-15 01:07:05.855 9722-11419/com.google.sample.echo D/AUDIO-ECHO: PLAYER CALLBACK
  48. 01-15 01:07:05.855 9722-11419/com.google.sample.echo D/AUDIO-ECHO: PLAYER CALLBACK
  49. 01-15 01:07:05.855 9722-11419/com.google.sample.echo D/AUDIO-ECHO: PLAYER CALLBACK
  50. 01-15 01:07:05.865 9722-11421/com.google.sample.echo D/AUDIO-ECHO: RECORDER CALLBACK
  51. 01-15 01:07:05.885 9722-11421/com.google.sample.echo D/AUDIO-ECHO: RECORDER CALLBACK
  52. 01-15 01:07:05.905 9722-11421/com.google.sample.echo D/AUDIO-ECHO: RECORDER CALLBACK
  53. 01-15 01:07:05.925 9722-11421/com.google.sample.echo D/AUDIO-ECHO: RECORDER CALLBACK
  54. 01-15 01:07:05.945 9722-11421/com.google.sample.echo D/AUDIO-ECHO: RECORDER CALLBACK
  55. 01-15 01:07:05.975 9722-11421/com.google.sample.echo D/AUDIO-ECHO: RECORDER CALLBACK
  56. 01-15 01:07:05.985 9722-11421/com.google.sample.echo D/AUDIO-ECHO: RECORDER CALLBACK
  57. 01-15 01:07:06.005 9722-11421/com.google.sample.echo D/AUDIO-ECHO: RECORDER CALLBACK
  58. 01-15 01:07:06.025 9722-11421/com.google.sample.echo D/AUDIO-ECHO: RECORDER CALLBACK
  59. 01-15 01:07:06.045 9722-11421/com.google.sample.echo D/AUDIO-ECHO: RECORDER CALLBACK
  60. 01-15 01:07:06.065 9722-11421/com.google.sample.echo D/AUDIO-ECHO: RECORDER CALLBACK
  61. 01-15 01:07:06.085 9722-11421/com.google.sample.echo D/AUDIO-ECHO: RECORDER CALLBACK
  62. 01-15 01:07:06.105 9722-11421/com.google.sample.echo D/AUDIO-ECHO: RECORDER CALLBACK
  63. 01-15 01:07:06.125 9722-11421/com.google.sample.echo D/AUDIO-ECHO: RECORDER CALLBACK
  64. 01-15 01:07:06.175 9722-11421/com.google.sample.echo D/AUDIO-ECHO: RECORDER CALLBACK
  65. 01-15 01:07:06.175 9722-11421/com.google.sample.echo D/AUDIO-ECHO: RECORDER CALLBACK
  66.  
  67. // Output thread
  68. ...
  69. 2 Tracks of which 0 are active
  70. Name Active Client Type Fmt Chn mask Session fCount S F SRate L dB R dB Server Main buf Aux Buf Flags UndFrmCnt
  71. 1 no 1218 5 1 00000003 12619 3528 S 1 44100 0 0 00007A56 0xb214a000 0x0 0x400 1768
  72. 0 no 6326 0 1 00000001 12718 3840 S 1 48000 0 0 00000000 0xb214a000 0x0 0x200 0
  73. 0 Effect Chains
  74.  
  75. // Input thread
  76. No active record clients
  77. Fast capture thread: no
  78. Fast track available: no
  79. ...
  80. 1 Tracks of which 0 are active
  81. Active Client Fmt Chn mask Session S Server fCount SRate
  82. no 6326 1 00000010 12720 7 00004B00 2880 48000
  83. 0 Effect Chains
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement