# iOS AudioSession Category

**URL:** <https://qa.fmod.com/t/ios-audiosession-category/11392>\
**Category:** FMOD Studio\
**Created:** [April 8, 2014, 9:51pm UTC](https://qa.fmod.com/t/ios-audiosession-category/11392 "2014-04-08T21:51:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![c0diq](https://avatars.discourse-cdn.com/v4/letter/c/278dde/32.png) [@c0diq](https://qa.fmod.com/u/c0diq)\
**Post date:** [April 8, 2014, 9:51pm UTC](https://qa.fmod.com/t/ios-audiosession-category/11392/1 "2014-04-08T21:51:23Z")

</div>

How do I control the audio session category with FMOD?  
In other words, I want my app to record or play in the background. This is configured by setting the proper audio session category.

Also, is there a way to record data with FMOD on iOS and get access to samples directly without going through a file?

Thanks

-s

---

<div class="post-metadata">

**Author:** ![mathew](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/mathew/32/431_2.png) [@mathew](https://qa.fmod.com/u/mathew)\
**Post date:** [April 8, 2014, 10:28pm UTC](https://qa.fmod.com/t/ios-audiosession-category/11392/2 "2014-04-08T22:28:07Z")

</div>

The AudioCategory is set up using the normal iOS native SDK before initializing FMOD (this is different from FMOD 4 where we internally handled it).

See “[working with categories](https://developer.apple.com/library/ios/documentation/Audio/Conceptual/AudioSessionProgrammingGuide/AudioSessionBasics/AudioSessionBasics.html)”

To get access to recorded samples, use System::recordStart to begin recording, monitor System::getRecordPosition and use Sound::lock / Sound::unlock to access the data.
