录音作为iphone WAV [英] Recording sound as WAV on iphone

查看:281
本文介绍了录音作为iphone WAV的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我提出,需要提交声音文件作为一个.wav到外部服务器的iPhone应用程序记录

I am making an iPhone recording app that needs to submit the sound file as a .wav to an external server.

从SpeakHere例子开始,我能记录声音为一个文件,但只是作为.caf

Starting from the SpeakHere example, I am able to record sound as a file, but only as .caf

有谁知道如何把它录制为WAV呢?或如何从.caf转换为.wav的iphone? (转换必须发生在手机上)

Does anyone know how to record it as a wav instead? Or how to convert from .caf to .wav on the iphone? (The conversion must happen on the phone)

编辑:

我不知道什么可以在AudioFileCreateWithURL使用kAudioFileWAVEType代替kAudioFileCAFType完成

I'm wondering if anything can be done with using kAudioFileWAVEType instead of kAudioFileCAFType in AudioFileCreateWithURL

推荐答案

没错,关键是kAudioFileWAVEType

Yup, the key is kAudioFileWAVEType

AudioFileCreateWithURL (
    		audioFileURL,
    		kAudioFileWAVEType,
    		&audioFormat,
    		kAudioFileFlags_EraseFile,
    		&audioFileID
    	);

修改为CAF在SpeakHere例如WAVE使记录是为WAV。我还可以编辑在播放类同样的事情,并改变了文件名必须为recording.wav

Changing to WAVE from CAF in the SpeakHere example causes the recording to be as wav. I also edit the same thing in the playback class, and changed the filename to be Recording.wav

这篇关于录音作为iphone WAV的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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