AVCaptureSession取消背景音乐 [英] AVCaptureSession cancels background audio

查看:182
本文介绍了AVCaptureSession取消背景音乐的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每当我开始与麦克风,因为它消除输入任何背景音乐正在运行(iPod中的音乐,例如)运行AVCaptureSession。如果我注释掉线添加音频输入,背景声频仍。

Whenever I start an AVCaptureSession running with the microphone as an input it cancels whatever background music is currently running (iPod music for instance). If I comment out the line adding the audio input, the background audio continues.

有谁知道的方式来录制视频短片麦克风,同时继续让背景音乐播放?我看了看周围很多,似乎并不能找到这种行为的任何引用。

Does anyone know of a way to record video clips with the microphone while continuing to allow background audio to play? I've looked around a lot, and can't seem to find any references to this behavior.

感谢您的帮助!

推荐答案

尝试设置kAudioSessionProperty_OverrideCategoryMixWithOthers如 http://stackoverflow.com / A /一万六千五百七十二分之七百四十二万六千四百零六

Try setting kAudioSessionProperty_OverrideCategoryMixWithOthers as seen in http://stackoverflow.com/a/7426406/16572

这篇关于AVCaptureSession取消背景音乐的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆