菜鸟教程小白 发表于 2022-12-11 20:21:52

ios - iOS上的AVCaptureAudioFileOutput在哪里?


                                            <p><p>互联网似乎没有这个问题的答案。</p>

<p>在 <a href="http://developer.apple.com/library/ios/#DOCUMENTATION/AVFoundation/Reference/AVCaptureFileOutput_Class/Reference/Reference.html" rel="noreferrer noopener nofollow">this reference page for AVCaptureFileOutput</a> ,他们声明:</p>

<blockquote>
<p>The concrete subclasses of AVCaptureFileOutput are
AVCaptureMovieFileOutput, which records media to a QuickTime movie
file, and AVCaptureAudioFileOutput, which writes audio media to a
variety of audio file formats.</p>
</blockquote>

<p>碰巧我有一个应用程序可以在一个功能中捕获视频,而在另一个功能中仅捕获音频。所以我正在尝试设置一个 AVCaptureAudioFileOutput 的实例来实现这一点。但是,它在 iOS 中不可用! AVCaptureMovieFileOutput 存在并被解释;我应该怎么做才能只录制音频?</p></p>
                                    <br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
                                            <p><p>忘记 AVCaptureFileOutput 及其后代,而是使用 AVCaptureAudioDataOutput 来捕获音频缓冲区,然后使用 AVAssetWriter 将其写入音频文件(例如 M4A 或 WAV)。</p></p>
                                   
                                                <p style="font-size: 20px;">关于ios - iOS上的AVCaptureAudioFileOutput在哪里?,我们在Stack Overflow上找到一个类似的问题:
                                                        <a href="https://stackoverflow.com/questions/7802050/" rel="noreferrer noopener nofollow" style="color: red;">
                                                                https://stackoverflow.com/questions/7802050/
                                                        </a>
                                                </p>
                                       
页: [1]
查看完整版本: ios - iOS上的AVCaptureAudioFileOutput在哪里?