KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I'm trying to implement a low-pass filter for an iphone app where I record a sound and then it gets played back slightly muffled; like the voice is coming from another room. I've looked into the different options for audio recording and manipulation and have found it a bit confusing...digital signal processing isn't a strong point at all. I've mainly looked into OpenAL and inside the EFX library there is a filter that specifically does what I need, but EFX is not included on the iPhone. Is there a way of replicating that behaviour using OpenAL for the iPhone? Is there another option such as Audio Units that could provide a solution? Thanks for your help EDIT: So after Tom's answer and links, I've come up with what I think is a correct implementation. However, I'm not getting a muffling effect at all, rather just a decrease in volume. Here's the (summarised) code I have currently: File is recorded using AVAudioRecorder and the following settings: [recordSetting setValue :[NSNumber numberWithInt:kAudioFormatLinearPCM] forKey:AVFormatIDKey]; [recordSetting setValue:[NSNumber numberWithFloat:44100] forKey:AVSampleRateKey]; [recordSetting setValue:[NSNumber numberWithInt: 1] forKey:AVNumberOfChannelsKey]; [recordSetting setValue :[NSNumber numberWithInt:16] forKey:AVLinearPCMBitDepthKey]; [recordSetting setValue :[NSNumber numberWithBool:NO] forKey:AVLinearPCMIsBigEndianKey]; [recordSetting setValue :[NSNumber numberWithBool:NO] forKey:AVLinearPCMIsFloatKey]; I then read in the file and transform it with the code below: // Read in the file using AudioFileOpenURL AudioFileID fileID = [self openAudioFile:filePath]; // find out how big the actual audio data is UInt32 fileSize = [self audioFileSize:fileID]; // allocate the memory to hold the file SInt16 * outData = (SInt16 *)malloc(fileSize); // Read in the file to outData OSStatus result = noErr; result = AudioFileReadBytes(fi
Tags (comma-separated)
Save Edits
Cancel