VoIP/SIP to make calls with background music - iphone

I'm looking to create an app where two users can chat to each other while one of them plays music in the background. The music will be played from a file and will need to be mixed with the input from the microphone so that the other user can hear it too.
I've been looking at PJSIP which looks like it can do this but I was just wondering if there where any easy to implement alternatives that were more objective c and less plain c?

PJSIP can do this. A colleague of mine did it and followed
http://www.pjsip.org/pjsip/docs/html/page_pjsip_sample_simple_pjsuaua_c.htm
He had to convert the music to wav to lower the bitrate.
Hope that help.

Related

accessing itunes music data

If it helps, I am using Xcode 4.3.1 and objective-c to program simple apps on an iPhone 4s running iOS 5.1.
I would like to find the documentation for a class with methods to capture the digital music signal that iTunes sends to an output device (speaker, headphones). I assume it must be accessible since it exists in the phone prior to reaching the speakers. I am not attempting a pirating move, but rather would like to route this music signal to the phone's outgoing wireless signal so that it can be heard clearly by someone on the other end of a call (ex. a method to play a favorite song, with decent sound quality, for a friend out of town). Can anyone point me in a general direction (if that direction exists) so that I can begin learning more?
Thanks,
Seth
One, I'm pretty sure there's no way to get the raw audio samples from a song in the library. You can get a list of the tracks and tell the system to play one, but that all happens outside your app. Two, apps can't access the cell phone—there's no way to send audio from your app to a phone call. Three, even if the first two did work, calls are heavily compressed and tuned to voice data. Call a friend and have them play a song through the phone, see how it sounds. Not very good, I'll bet.

Is it possible to convert audio file with some music notes?

I have a music file with a particular tone(music.mp4). I want to convert existing sound file (speech.mp4) into the tone which is specified in music.mp4. Its like converting a speech into some particular tone. I do not want to play both files simultaneously. I want to convert source file with help of some music file. So, output file will be converted file.
Is it possible? I searched for Audio Unit Hosting and Multimedia guide. But do not get any clue.
Thanks in advance.
The answer is: it sounds (no pun intended) like it would be possible with the iOS. You just need to find someone who knows how to program that specific functionality. I do not know why you would think to find the answer in the Apple Docs. I want to know if it's possible to program music that plays backwards. I want to know if I can program a sound that converts my words into something my dog understands. I can't imagine the documentation could possibly cover everything everyone ever wants to program an iPhone to do.
There are no iOS public APIs for frequency analysis of audio files. You would have to write your own DSP code for that. The AVFoundation and Accelerate frameworks have some audio file conversion and math functions that may help, but that is only a small portion of the code needed.

voice changer, how is made?

I'm looking to implement a voice changer into my iPhone app. Something a bit like Talking Friends. I have 5 different voice styles.
anyone can give a hint
any info much appreciated
thx.
Unfortunately there is no UIDarthVaderify() object. There's an open source project called Skype Voice Changer, it's in C# so you obviously can't use it directly in a Cocoa Touch project but you can learn how voice changing works. Essentially you're looking to change the frequency distribution of the output signal without changing the envelope that represents the phonemes being made by the speaker.

Recording sounds created within an iPhone app

I'm new to programming in Objective-c and the iPhone but I am working on an app to teach myself. I have been trying to figure out how to record sounds on the iPhone. Apple provides excellent documentation for recording from the microphone with AVAudioRecorder but I want to record sounds made by my app, or even just record sounds when buttons are pressed (button is pressed, certain audio gets recorded).
I have no clue how to do this and can't seem to find anything that would help me along this path, only microphone stuff.
Can anyone share ideas or code that would make this possible?
Thanks
Once you move beyond the convenience classes like AVAudioRecorder, you've got a lot of studying to do.
I would start with:
Getting Started with Audio and Video
Multimedia Programming Guide:Audio
Core Audio Overview
Audio programming is a very large and complex subject. If you want to customize, be prepared to spend some time learning it.
I've made a sample app that records sounds/audio and has a playback. Hope this helps! https://github.com/casspangell/AudioMic

Is it possible to both play a sound and record from the microphone at the same time on the iPhone?

I want to both play sound and record sound at the same time on the iPhone.
All the apps which record sound first disable any music playing. However as music would disrupt their purpose I don't know if they're doing this deliberately or whether the iPhone does it automatically when you record from the microphone.
Does anyone have experience with this?
Refer to this page. Good luck!
I've heard something about this on one episode of the mobile orchard podcast - the one with Michael Tyson, the creator of Loopy. During the discussion, Michael explained that he had to include some code to filter out the sounds that were coming in through the microphone in realtime as other sounds were being played on the speaker.
Based on that discussion, it seems entirely possible to both play and record at the same time, but I'm sure you'll have to do your own filtering to avoid recording the sounds your playing.
You can use either a core audio unit or an audio queue, and
you need to make sure that your audio session category is set to kAudioSessionCategory_PlayAndRecord.
Beware that sound output when you use this session is much quieter
than the normal solo session (observed on 3.0).