{"action":"created","issue":{"url":"https://api.github.com/repos/EricssonResearch/openwebrtc/issues/144","labels_url":"https://api.github.com/repos/EricssonResearch/openwebrtc/issues/144/labels{/name}","comments_url":"https://api.github.com/repos/EricssonResearch/openwebrtc/issues/144/comments","events_url":"https://api.github.com/repos/EricssonResearch/openwebrtc/issues/144/events","html_url":"https://github.com/EricssonResearch/openwebrtc/issues/144","id":55847117,"number":144,"title":"Improve performance hit caused by conversion and resampling on iOS","user":{"login":"ikonst","id":1186084,"avatar_url":"https://avatars.githubusercontent.com/u/1186084?v=3","gravatar_id":"","url":"https://api.github.com/users/ikonst","html_url":"https://github.com/ikonst","followers_url":"https://api.github.com/users/ikonst/followers","following_url":"https://api.github.com/users/ikonst/following{/other_user}","gists_url":"https://api.github.com/users/ikonst/gists{/gist_id}","starred_url":"https://api.github.com/users/ikonst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ikonst/subscriptions","organizations_url":"https://api.github.com/users/ikonst/orgs","repos_url":"https://api.github.com/users/ikonst/repos","events_url":"https://api.github.com/users/ikonst/events{/privacy}","received_events_url":"https://api.github.com/users/ikonst/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-01-29T02:22:12Z","updated_at":"2015-01-29T16:40:54Z","closed_at":null,"body":"A loopback test app takes considerable CPU time on iOS (iPhone 5s) due to performance hit caused by audio sample conversion (F32LE to S16LE) and resampling (44,100 to 48,000 for Opus, 44,100 to 8,000 for PCM). Xcode profiler confirms these elements to be the offenders.\r\n\r\nI've narrowed it down by transmitting only audio, disabling DTLS and using the PCMA codec with 8000 clock-rate. One would think loopback of 8KHz PCM would be an easy task for modern hardware."},"comment":{"url":"https://api.github.com/repos/EricssonResearch/openwebrtc/issues/comments/72057753","html_url":"https://github.com/EricssonResearch/openwebrtc/issues/144#issuecomment-72057753","issue_url":"https://api.github.com/repos/EricssonResearch/openwebrtc/issues/144","id":72057753,"user":{"login":"ikonst","id":1186084,"avatar_url":"https://avatars.githubusercontent.com/u/1186084?v=3","gravatar_id":"","url":"https://api.github.com/users/ikonst","html_url":"https://github.com/ikonst","followers_url":"https://api.github.com/users/ikonst/followers","following_url":"https://api.github.com/users/ikonst/following{/other_user}","gists_url":"https://api.github.com/users/ikonst/gists{/gist_id}","starred_url":"https://api.github.com/users/ikonst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ikonst/subscriptions","organizations_url":"https://api.github.com/users/ikonst/orgs","repos_url":"https://api.github.com/users/ikonst/repos","events_url":"https://api.github.com/users/ikonst/events{/privacy}","received_events_url":"https://api.github.com/users/ikonst/received_events","type":"User","site_admin":false},"created_at":"2015-01-29T16:40:54Z","updated_at":"2015-01-29T16:40:54Z","body":"It appears that osxaudio retrieves zero sampling rate from AU (at least on Remote IO), and so sampling rate ends up being GST_AUDIO_DEF_RATE (= 44100).\r\n\r\nFollowing IRC discussion:\r\n* @ford-prefect will implement real probing (\"preferred_caps\") for Remote IO, based on kAudioSessionProperty_CurrentHardwareSampleRate etc.\r\n\r\n* It should be documented that OS X and iOS developers should set up AVAudioSession in their app code.\r\n\r\n* owr should **warn** when conversion and/or resampling would occur on OS X and iOS, and recommend setting up AVAudioSession."}}